/* ============================================================
   Lefkoşa Maratonu 10K — Veri Merkezi
   ============================================================ */

/* --------------------------------------------------------------------------
   Renk sistemi — Nicosia Marathon / Lefkoşa Belediyesi resmî paleti
   Kaynak (resmî siteden çıkarılan baskın renkler):
     #132D5E lacivert · #ECEDEE açık gri · #725661 mürdüm
     #8296AE arduvaz  · #94B257 yeşil    · #0CAAE3 camgöbeği
   Eşleme: lacivert → yüzeyler, açık gri → ana metin, arduvaz → ikincil metin,
           camgöbeği → birincil vurgu, yeşil → ikincil vurgu.
   -------------------------------------------------------------------------- */

:root {
  /* marka renkleri (ham) */
  --brand-navy: #132D5E;
  --brand-cyan: #0CAAE3;
  --brand-green: #94B257;
  --brand-slate: #8296AE;
  --brand-mauve: #725661;
  --brand-light: #ECEDEE;

  /* yüzeyler — lacivertten türetilmiş koyu tonlar */
  --bg: #070d1a;
  --bg-2: #0b1424;
  --card: #0e1a30;
  --card-2: #14243f;
  --line: #24395c;
  --line-soft: #1a2b47;

  /* metin */
  --txt: #ECEDEE;
  --txt-2: #8296AE;
  --txt-3: #5d6f8b;

  /* vurgular */
  --acc: #0CAAE3;
  --acc-rgb: 12, 170, 227;
  --acc-2: #94B257;
  --acc-2-rgb: 148, 178, 87;

  /* grafik serileri — iki resmî parlak renk + arduvaz, üç tamamlayıcı ton */
  --c-cyan: #0CAAE3;
  --c-green: #94B257;
  --c-lav: #9B8BD4;
  --c-amber: #E0A93F;
  --c-rose: #D9768F;
  --c-slate: #8296AE;
  --c-steel: #4A6C93;

  /* durum */
  --pos: #94B257;
  --neg: #E05C4A;

  --radius: 14px;
  --maxw: 1240px;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (max-width: 900px) { html { scroll-padding-top: 112px; } }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------- nav */

nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 26, .84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
nav .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 14px var(--acc); }
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--txt-3); letter-spacing: .12em; text-transform: uppercase; line-height: 1; }
nav ul { display: flex; gap: 4px; list-style: none; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav ul::-webkit-scrollbar { display: none; }
nav a {
  color: var(--txt-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px; white-space: nowrap; transition: .16s;
}
nav a:hover { color: var(--txt); background: var(--card); }
nav a.on { color: var(--acc); background: rgba(var(--acc-rgb), .12); }

/* ---------------------------------------------------------- hero */

.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 30% 40% -10%;
  background: radial-gradient(closest-side, rgba(var(--acc-rgb), .20), transparent);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: -20% -20% 30% 45%;
  background: radial-gradient(closest-side, rgba(var(--acc-2-rgb), .13), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--acc);
  border: 1px solid rgba(var(--acc-rgb), .32); background: rgba(var(--acc-rgb), .08);
  padding: 6px 13px; border-radius: 100px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 6.2vw, 66px); line-height: 1.03; font-weight: 800;
  letter-spacing: -.035em; max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--c-cyan), #6fd0f0 42%, var(--c-green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { margin-top: 20px; max-width: 62ch; font-size: 17px; color: var(--txt-2); }

/* ---------------------------------------------------------- kpi */

.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px; margin-top: 44px;
}
.kpi {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--acc), transparent);
}
.kpi .v { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12.5px; color: var(--txt-2); margin-top: 5px; }
.kpi .sub { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }

/* ---------------------------------------------------------- sections */

section { padding: 68px 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }
.shead { margin-bottom: 30px; max-width: 74ch; }
.shead .num {
  font-family: var(--mono); font-size: 12px; color: var(--acc);
  letter-spacing: .1em; display: block; margin-bottom: 8px;
}
.shead h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
.shead p { margin-top: 11px; color: var(--txt-2); font-size: 15.5px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g23 { grid-template-columns: 1.55fr 1fr; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; min-width: 0;
}
.card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.card .hint { font-size: 12.5px; color: var(--txt-3); margin-top: 4px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------- controls */

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  background: none; border: 0; color: var(--txt-2); font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 5px 11px; border-radius: 6px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.seg button:hover { color: var(--txt); }
.seg button.on { background: var(--acc); color: #06131f; }

input[type=text], input[type=search], select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--txt);
  font: inherit; font-size: 14px; padding: 10px 13px; border-radius: 9px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .16); }
input::placeholder { color: var(--txt-3); }
label.fld { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 6px; font-weight: 550; }

.btn {
  background: var(--acc); color: #06131f; border: 0; font: inherit; font-size: 13.5px; font-weight: 650;
  padding: 10px 18px; border-radius: 9px; cursor: pointer; transition: .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt-2); }
.btn.ghost:hover { border-color: var(--acc); color: var(--acc); filter: none; }

/* ---------------------------------------------------------- charts */

.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; }
svg text { font-family: inherit; }
.gridline { stroke: var(--line-soft); stroke-width: 1; }
.axis-t { fill: var(--txt-3); font-size: 11px; }
.axis-t.b { fill: var(--txt-2); font-weight: 600; }
.val-t { fill: var(--txt); font-size: 11px; font-weight: 650; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--txt-2); }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

/* ---------------------------------------------------------- tables */

.tw { overflow-x: auto; border-radius: 11px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 13px; text-align: left; white-space: nowrap; }
thead th {
  background: var(--bg-2); color: var(--txt-2); font-size: 11.5px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
thead th.s { cursor: pointer; user-select: none; }
thead th.s:hover { color: var(--acc); }
thead th .arr { color: var(--acc); font-size: 9px; margin-left: 3px; }
tbody tr { border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--card-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
td.nm { font-weight: 600; }
.medal { display: inline-block; width: 21px; text-align: center; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 100px; background: var(--card-2); color: var(--txt-2); border: 1px solid var(--line);
}
.pill.m { color: var(--c-cyan); border-color: rgba(var(--acc-rgb), .32); background: rgba(var(--acc-rgb), .10); }
.pill.f { color: var(--c-rose); border-color: rgba(217, 118, 143, .34); background: rgba(217, 118, 143, .11); }
.up { color: var(--pos); font-weight: 650; }
.down { color: var(--neg); font-weight: 650; }

.tfoot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; color: var(--txt-2); }

/* ---------------------------------------------------------- runner profile */

.rsearch { position: relative; }
.sugg {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 11px;
  max-height: 300px; overflow-y: auto; box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.sugg:empty { display: none; }
.sugg div { padding: 10px 14px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.sugg div:hover, .sugg div.hi { background: var(--acc); color: #06131f; }
.sugg div span { color: var(--txt-3); font-size: 12px; }
.sugg div:hover span, .sugg div.hi span { color: rgba(6, 19, 31, .68); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: var(--card-2); border: 1px solid var(--line); color: var(--txt-2);
  font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 100px; cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--acc); color: var(--acc); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 18px 0; }
.stat-row div { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 13px 15px; }
.stat-row .v { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.stat-row .l { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

.empty { text-align: center; padding: 40px 20px; color: var(--txt-3); font-size: 14px; }

/* ---------------------------------------------------------- misc */

.note {
  border-left: 3px solid var(--acc-2); background: rgba(var(--acc-2-rgb), .07);
  padding: 13px 17px; border-radius: 0 9px 9px 0; font-size: 13.5px; color: var(--txt-2); margin-top: 16px;
}
.note b { color: var(--txt); }

.method { display: grid; gap: 14px; }
.method details {
  background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 0 20px;
}
.method summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 14.5px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.method summary::-webkit-details-marker { display: none; }
.method summary::after { content: "+"; color: var(--acc); font-size: 20px; font-weight: 400; }
.method details[open] summary::after { content: "−"; }
.method details > div { padding-bottom: 18px; color: var(--txt-2); font-size: 14px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.method code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-2); padding: 2px 6px; border-radius: 5px; color: var(--acc-2); }
.method ul { margin: 8px 0 0 18px; }
.method li { margin-bottom: 5px; }

footer { border-top: 1px solid var(--line-soft); padding: 34px 0 50px; color: var(--txt-3); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--txt-2); }

.tip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: #050b16; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.5; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); max-width: 250px;
}
.tip.on { opacity: 1; }
.tip b { color: var(--acc); }

.filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.filters .btn { width: 100%; }

@media (max-width: 900px) {
  .g23, .g3 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters > :first-child, .filters > :last-child { grid-column: 1 / -1; }
  /* Menüyü gizlemek yerine ikinci satıra alıp yatay kaydırılabilir yapıyoruz. */
  nav .wrap { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding-top: 10px; }
  nav ul { margin: 6px -16px 0; padding: 0 16px 8px; }
  .hero { padding: 52px 0 40px; }
  section { padding: 50px 0; }
}
@media (max-width: 620px) {
  .g2 { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .card { padding: 17px; }
}
