/* bırak. web — tokens mirror src/theme/tokens.ts (light "Sabah", dark "Gece"). */
@font-face { font-family: "Bricolage"; src: url("/fonts/BricolageGrotesque_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F4F8FC; --surface: #FFFFFF; --surface-alt: #E9F0F8; --border: #D5E0EC;
  --text: #0E1B2C; --muted: #4A5A6E;
  --primary: #1D5BD6; --primary-pressed: #174BB3; --on-primary: #FFFFFF;
  --primary-soft: #DCE8FB; --on-primary-soft: #123E8F;
  --gold: #A87708; --gold-text: #8A5C00; --gold-soft: #FBEFD2;
  --coral-text: #A8381F;
  --sky-top: #BFDBFF; --sky-mid: #DDEBFF; --sky-low: #F4F8FC; --sky-muted: #3E4D60;
  --chip-bg: #E9F0F8; --chip-text: #0E1B2C; --chip-border: #D5E0EC;
  --chip-sel-bg: #DCE8FB; --chip-sel-text: #123E8F;
  --btn2-bg: #E9F0F8; --btn2-text: #123E8F;
  --shadow: 0 4px 12px rgba(14, 27, 44, 0.06);
  --sp-xs: 4px; --sp-s: 8px; --sp-m: 12px; --sp-l: 16px; --sp-xl: 20px; --sp-xxl: 24px; --sp-3: 32px; --sp-4: 40px; --sp-5: 56px;
  --r-chip: 999px; --r-btn: 16px; --r-card: 24px; --r-small: 12px;
  --font-display: "Bricolage", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1220; --surface: #111C2E; --surface-alt: #182740; --border: #263852;
    --text: #EEF3FA; --muted: #A0AEC2;
    --primary: #8AB4FF; --primary-pressed: #A9C8FF; --on-primary: #08142A;
    --primary-soft: #1A2E52; --on-primary-soft: #CFE0FF;
    --gold: #F2C14E; --gold-text: #F2C14E; --gold-soft: #3A2E12;
    --coral-text: #FF8C6E;
    --sky-top: #0A1220; --sky-mid: #13254A; --sky-low: #1E3A6B; --sky-muted: #C3CEDD;
    --chip-bg: #182740; --chip-text: #EEF3FA; --chip-border: #263852;
    --chip-sel-bg: #1A2E52; --chip-sel-text: #CFE0FF;
    --btn2-bg: #182740; --btn2-text: #EEF3FA;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1220; --surface: #111C2E; --surface-alt: #182740; --border: #263852;
  --text: #EEF3FA; --muted: #A0AEC2;
  --primary: #8AB4FF; --primary-pressed: #A9C8FF; --on-primary: #08142A;
  --primary-soft: #1A2E52; --on-primary-soft: #CFE0FF;
  --gold: #F2C14E; --gold-text: #F2C14E; --gold-soft: #3A2E12;
  --coral-text: #FF8C6E;
  --sky-top: #0A1220; --sky-mid: #13254A; --sky-low: #1E3A6B; --sky-muted: #C3CEDD;
  --chip-bg: #182740; --chip-text: #EEF3FA; --chip-border: #263852;
  --chip-sel-bg: #1A2E52; --chip-sel-text: #CFE0FF;
  --btn2-bg: #182740; --btn2-text: #EEF3FA;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.45 var(--font-body);
  font-variant-ligatures: no-common-ligatures; /* §6.3: keep ı/i dots intact */
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px;
}
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 var(--sp-xl); }
.num { font-variant-numeric: tabular-nums; font-variant-ligatures: no-common-ligatures; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Wordmark: "bırak." with gold dot */
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 800 30px/1 var(--font-display); letter-spacing: -0.5px; color: var(--text); text-decoration: none;
}
.dot { color: var(--gold); }
.wordmark .dot { margin-left: 1px; }
.site-head { padding-top: var(--sp-l); }

/* Sky (hero) */
.sky {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 85%, var(--bg) 100%);
  padding-bottom: var(--sp-xxl);
}
.hero { padding-top: var(--sp-xxl); }
.hero h1 {
  font: 800 clamp(40px, 11vw, 64px)/1.02 var(--font-display); letter-spacing: -1.5px; margin: 0 0 var(--sp-l);
}
.hero h1 .gold-dot {
  display: inline-block; width: 0.22em; height: 0.22em; border-radius: 50%; margin-left: 0.05em;
  background: var(--gold); box-shadow: 0 0 0.25em color-mix(in srgb, var(--gold) 55%, transparent);
}
.lead { font-size: 19px; line-height: 1.45; color: var(--sky-muted); margin: 0 0 var(--sp-xxl); max-width: 32em; }
.trust { color: var(--text); font-size: 15px; font-weight: 600; margin: var(--sp-l) 0 0; }

/* Buttons */
.stores { display: flex; flex-wrap: wrap; gap: var(--sp-m); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-s);
  min-height: 56px; padding: 0 var(--sp-xxl); border-radius: var(--r-btn); border: 0;
  font: 600 17px/1.2 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); }
.btn-secondary { background: var(--btn2-bg); color: var(--btn2-text); }
.stores .btn { flex: 1 1 140px; padding: 0 var(--sp-l); }
.btn small { display: block; font-weight: 400; font-size: 13px; opacity: 0.9; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn svg { flex: none; }

/* Sections */
section { padding: var(--sp-4) 0 0; }
h2 { font: 800 clamp(26px, 7vw, 34px)/1.12 var(--font-display); letter-spacing: -0.5px; margin: 0 0 var(--sp-m); }
h3 { font: 600 17px/1.3 var(--font-body); margin: 0 0 var(--sp-s); }
p { margin: 0 0 var(--sp-m); }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: var(--sp-xxl) var(--sp-xl); box-shadow: var(--shadow);
}

/* Calculator */
.field { margin: 0 0 var(--sp-xl); border: 0; padding: 0; min-width: 0; }
.field legend, .field > label { display: block; font-weight: 600; margin-bottom: var(--sp-s); padding: 0; }
.stepper { display: flex; align-items: center; gap: var(--sp-s); }
.stepper button {
  width: 48px; height: 48px; border-radius: var(--r-chip); border: 1px solid var(--chip-border);
  background: var(--chip-bg); color: var(--chip-text); font: 600 24px/1 var(--font-body); cursor: pointer;
}
.stepper input, .price-input input {
  width: 96px; height: 48px; border-radius: var(--r-small); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-align: center; font: 600 20px/1 var(--font-body);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.unit { color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: var(--sp-s) 0 0; }
@media (min-width: 640px) { .shots { grid-auto-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-s); margin-bottom: var(--sp-m); }
.chip {
  min-height: 44px; min-width: 64px; padding: 0 var(--sp-l); border-radius: var(--r-chip);
  border: 1px solid var(--chip-border); background: var(--chip-bg); color: var(--chip-text);
  font: 600 16px/1 var(--font-body); font-variant-numeric: tabular-nums; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--chip-sel-bg); color: var(--chip-sel-text); border-color: var(--primary); }
.price-input { display: flex; align-items: center; gap: var(--sp-s); }
.result {
  margin-top: var(--sp-s); padding: var(--sp-xl); border-radius: var(--r-card);
  background: var(--gold-soft);
}
.result .label { font-size: 15px; color: var(--text); margin: 0 0 var(--sp-xs); }
.result .big { font: 800 clamp(34px, 10vw, 48px)/1.05 var(--font-display); letter-spacing: -1px; margin: 0; overflow-wrap: anywhere; }
.result .gram { font: 600 20px/1.3 var(--font-body); color: var(--gold-text); margin: var(--sp-s) 0 0; display: flex; align-items: center; gap: var(--sp-s); }
.result .gram::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); flex: none; }
.source { font-size: 13px; color: var(--muted); margin: var(--sp-m) 0 0; }
.source.stale { opacity: 0.85; font-style: italic; }
.error-text { color: var(--coral-text); font-size: 15px; margin: var(--sp-s) 0 0; min-height: 0; }

/* Screens */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 44%); gap: var(--sp-m);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-s); margin: 0;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shot-frame {
  aspect-ratio: 390 / 844; border-radius: 28px; overflow: hidden; border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-low)); display: grid; place-items: center;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot-frame.missing img { display: none; }
.shot-frame .ph { display: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); }
.shot-frame.missing .ph { display: block; }
.shots figcaption { font-size: 15px; color: var(--muted); margin-top: var(--sp-s); }

/* Prices */
.plans { display: grid; gap: var(--sp-m); grid-template-columns: 1fr; }
@media (min-width: 560px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { padding: var(--sp-xl); }
.plan .price { font: 800 28px/1.1 var(--font-display); margin: var(--sp-xs) 0 var(--sp-s); }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 15px; }
.plan.featured { border: 2px solid var(--primary); }
.price-note { margin-top: var(--sp-l); font-size: 15px; color: var(--muted); }

/* Footer */
footer { margin-top: var(--sp-5); padding: var(--sp-3) 0 var(--sp-4); border-top: 1px solid var(--border); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--sp-s) var(--sp-xl); list-style: none; padding: 0; margin: 0 0 var(--sp-l); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.disclaimer { font-size: 13px; color: var(--muted); }

/* Prose pages */
.prose { padding-top: var(--sp-3); }
.prose h1 { font: 800 clamp(32px, 9vw, 44px)/1.08 var(--font-display); letter-spacing: -1px; margin: 0 0 var(--sp-s); }
.prose h2 { font-size: 24px; margin-top: var(--sp-3); }
.prose h3 { margin-top: var(--sp-xl); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: var(--sp-xs); }
.version { font-size: 15px; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 var(--sp-l); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: var(--sp-s); border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.notice { background: var(--surface-alt); border-radius: var(--r-small); padding: var(--sp-m) var(--sp-l); }
details { border-bottom: 1px solid var(--border); }
summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; padding: var(--sp-s) 0; }
details > div { padding: 0 0 var(--sp-l); }

/* Invite page */
.invite { min-height: 100vh; min-height: 100dvh; }
.invite .card { margin-top: var(--sp-3); }
.pair { display: flex; align-items: center; gap: 0; margin-bottom: var(--sp-xl); }
.pair span { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); }
.pair i { width: 56px; height: 2px; background: var(--gold); opacity: 0.6; }
.invite h1 { font: 800 clamp(28px, 8vw, 40px)/1.12 var(--font-display); letter-spacing: -0.5px; margin: 0 0 var(--sp-m); overflow-wrap: anywhere; }
.actions { display: grid; gap: var(--sp-m); margin-top: var(--sp-xxl); }
.status { min-height: 1.4em; font-size: 15px; color: var(--muted); margin-top: var(--sp-s); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip { transition: background-color 150ms ease, transform 120ms ease; }
  .btn:active, .chip:active { transform: scale(0.98); }
}
