/*
 * Ufkon "Yakında" sayfası — tek stil dosyası (satır içi stil yok: CSP style-src 'self').
 * Renkler resources/css/tokens.css'ten, ufuk + cetvel motifi public/og/default.png'den.
 * Dış istek yok: fontlar aynı klasörden (Türkçe alt küme, SIL OFL — lisanslar fonts/ içinde).
 * Font dosyaları 1 yıl "immutable" önbelleğe alınır (_headers): font değişirse dosya adındaki sürümü artırın (.v3…).
 * Brico: genişlik ekseni 100'e sabitlendi (sayfa dar kesimi kullanmıyor); yalnız ağırlık ekseni 600–800 kaldı.
 */

@font-face {
  font-family: "Brico TR";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("fonts/brico-tr.v2.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Next TR";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/atkinson-next-tr.v1.woff2") format("woff2");
}
/* Metrik eşlenmiş yedek yüzler: font gelene kadar satırlar zıplamaz. */
@font-face {
  font-family: "Brico TR Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  ascent-override: 87.4139%; descent-override: 25.3782%; line-gap-override: 0%; size-adjust: 106.3904%;
}
@font-face {
  font-family: "Atkinson Next TR Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  ascent-override: 98.7991%; descent-override: 31.7282%; line-gap-override: 0%; size-adjust: 99.5961%;
}

:root {
  --canvas: #F6F1E7; --surface: #FFFCF5; --grid: #EDE6D8;
  --fg: #14110F; --muted: #5C544B; --line: #D9D0BF; --line-strong: #857B6C;
  --sun: #FFB800; --on-sun: #14110F; --halo: #FFF1C7; --sun-ink: #8A5600;
  --link: #2D2A8C; --focus: #2D2A8C;
  --font-display: "Brico TR", "Brico TR Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Atkinson Next TR", "Atkinson Next TR Fallback", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(1rem, .25rem + 3.2vw, 4rem);
  --ruler-major: 150px; --ruler-minor: 30px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0F0E1C; --surface: #18162B; --grid: #161427;
    --fg: #F3EEE3; --muted: #B0A9BF; --line: #2E2B4A; --line-strong: #757090;
    --halo: #33270A; --sun-ink: #FFB800; --link: #B9B5FF; --focus: #FFB800;
  }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--fg); --line: var(--line-strong); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--canvas);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--ruler-minor) var(--ruler-minor);
  background-position: var(--gutter) 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, p, ul { margin: 0; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* ---- İskelet: üst şerit · sahne (başlık + güneş) · cetvel · kurallar · imza ---- */
.page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }

.top { padding: clamp(1.25rem, .9rem + 1.6vw, 2.5rem) var(--gutter) 0; }
.top a { display: inline-block; }
.logo { display: block; width: clamp(7rem, 5.6rem + 4vw, 9.5rem); height: auto; color: var(--fg); }
.logo .ink { fill: currentColor; }
.logo .dot { fill: var(--sun); }

.main { flex: 1 0 auto; display: flex; flex-direction: column; }

.stage {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, .9fr) auto auto;
  grid-template-areas: "." "status" "title" "." "lead" "sun";
  padding: clamp(1.5rem, .5rem + 4vh, 4rem) var(--gutter) 0;
}

.status {
  grid-area: status;
  justify-self: start;
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: clamp(1rem, .6rem + 1.4vw, 1.75rem);
  padding: .3rem .8rem .3rem .65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8125rem; font-weight: 700; line-height: 1.4;
  letter-spacing: .12em; text-transform: uppercase;
}
.status svg { width: .9rem; height: .45rem; }
.status .dot { fill: var(--sun); }

.title {
  grid-area: title;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 1.1rem + 5.6vw, 6.5rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.title .line { display: block; }
.title .num {
  display: inline-block;
  min-width: .78em;
  padding: 0 .1em;
  border-radius: .08em;
  background: var(--sun);
  color: var(--on-sun);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lead {
  grid-area: lead;
  align-self: end;
  max-width: 34rem;
  margin-top: clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  padding-bottom: clamp(1.75rem, 1rem + 2.4vw, 3rem);
}
.lead p:first-child { font-size: clamp(1.125rem, 1.02rem + .5vw, 1.375rem); line-height: 1.45; text-wrap: pretty; }
.lead .note { margin-top: .9rem; color: var(--muted); font-size: .9375rem; }

/* Güneş: ufuk çizgisinin (cetvelin) üstüne oturur, ufkun altı görünmez.
   align-self: end — satır (.lead) güneşten uzun olsa da güneş satırın dibine, yani cetvele yaslanır. */
.sun {
  grid-area: sun;
  justify-self: end;
  align-self: end;
  display: block;
  width: clamp(14rem, 4rem + 28vw, 30rem);
  height: auto;
  margin-right: calc(var(--gutter) * -.5);
  overflow: hidden;
}
.sun .halo { fill: var(--halo); }
.sun .disc { fill: var(--sun); }
.sun .tick { stroke: var(--sun-ink); stroke-width: 2; stroke-linecap: round; opacity: .55; }

@media (min-width: 44rem) {
  .stage {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto auto minmax(0, .9fr) auto;
    grid-template-areas: ". ." "status status" "title title" ". ." "lead sun";
    column-gap: clamp(1.5rem, 4vw, 3rem);
  }
  .lead { padding-bottom: clamp(2rem, 1rem + 2.4vw, 3.25rem); }
}

.ruler {
  height: 1.5rem;
  border-top: 4px solid var(--fg);
  background:
    linear-gradient(90deg, var(--fg) 2px, transparent 0) var(--gutter) 0 / var(--ruler-major) 1.15rem repeat-x,
    linear-gradient(90deg, var(--fg) 1px, transparent 0) var(--gutter) 0 / var(--ruler-minor) .55rem repeat-x;
}

/* Kurallar: cetvelin okunuşu. Her madde bir "büyük çentikle" başlar. */
.rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem 3rem;
  padding: clamp(.75rem, .4rem + 1vw, 1.25rem) var(--gutter) 0;
  list-style: none;
}
.rules li { max-width: 26rem; color: var(--muted); font-size: .9688rem; line-height: 1.5; }
.rules strong {
  display: block;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 700; letter-spacing: -.005em;
}
@media (min-width: 48rem) {
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.sign {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  padding: 1.1rem var(--gutter) clamp(1.25rem, 1rem + 1vw, 2rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem; line-height: 1.5;
}
.sign .motto { color: var(--fg); font-family: var(--font-display); font-size: 1rem; font-weight: 650; }
.sign .fine { max-width: 44rem; }
.sign .contact { flex-basis: 100%; }

/* 404 */
.lost { flex: 1 0 auto; display: grid; align-content: center; gap: 1.25rem; padding: 3rem var(--gutter); }
.lost .title { grid-area: auto; font-size: clamp(2.25rem, 1.4rem + 4vw, 4.5rem); }
.lost p { max-width: 34rem; font-size: 1.125rem; }

/* Hareket: güneş bir kez ufuktan yükselir. Azaltılmış harekette hiç oynamaz. */
@media (prefers-reduced-motion: no-preference) {
  .sun .halo, .sun .disc, .sun .tick {
    transform-box: view-box;
    animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) both;
  }
  .sun .halo { animation-delay: .12s; }
  .sun .tick { animation-delay: .2s; }
}
@keyframes rise { from { transform: translateY(100%); } }

@media print {
  body { background: #FFFFFF; }
  .sun, .ruler { display: none; }
}
