/* Tunvori web sitesi: uygulamanın Sunburst (açık) ve Midnight Indigo (koyu) paletleri,
   Plus Jakarta Sans (başlık) ve Inter (metin). Değerler theme/TunvoriPalette.kt ile aynıdır. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter_semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus_jakarta_sans_bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus_jakarta_sans_extrabold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

/* Sunburst açık */
:root {
  color-scheme: light;
  --bg: #f7f1e7;
  --surface: #efe8dc;
  --surface-high: #e7dfd1;
  --text: #1c1410;
  --muted: #6b6258;
  --line: #ddd2bf;
  --accent: #c1602c;
  --accent-deep: #8a3f1c;
  --on-accent: #fffdf9;
  --link: #8a3f1c;
  --bar-mid: #8a3f1c;
  --string: #a5602f;
  --hole: #2a1a11;
  --rosette: #c1602c;
  --frame: #17110d;
  --frame-shadow: 0 30px 50px -30px rgba(70, 38, 18, 0.5);
  --headline: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --zone: 64px;
}

/* Midnight Indigo koyu: sistem koyuysa (seçim yapılmadıysa) ya da kullanıcı seçtiyse */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #120e1a;
    --surface: #1b1626;
    --surface-high: #231d31;
    --text: #f3f1fa;
    --muted: #a9a4ba;
    --line: #2c2541;
    --accent: #8b7bf0;
    --accent-deep: #4b3fa0;
    --on-accent: #120e1a;
    --link: #a99df5;
    --bar-mid: #f3f1fa;
    --string: #cbc4e6;
    --hole: #07050c;
    --rosette: #8b7bf0;
    --frame: #050409;
    --frame-shadow: 0 0 0 1px rgba(243, 241, 250, 0.07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120e1a;
  --surface: #1b1626;
  --surface-high: #231d31;
  --text: #f3f1fa;
  --muted: #a9a4ba;
  --line: #2c2541;
  --accent: #8b7bf0;
  --accent-deep: #4b3fa0;
  --on-accent: #120e1a;
  --link: #a99df5;
  --bar-mid: #f3f1fa;
  --string: #cbc4e6;
  --hole: #07050c;
  --rosette: #8b7bf0;
  --frame: #050409;
  --frame-shadow: 0 0 0 1px rgba(243, 241, 250, 0.07);
}

@media (max-width: 640px) {
  :root { --zone: 44px; }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Gitar teli sağ kenarda durur; içerik onun altına girmez. */
.js body { padding-right: var(--zone); }

/* Tema değişirken renkler yumuşakça geçer (site.js sınıfı kısa süreliğine ekler). */
.theme-shift body,
.theme-shift body * {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, stroke 0.5s ease, box-shadow 0.5s ease;
}

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* --- Üst bar --- */
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-word { font-family: var(--headline); font-weight: 800; font-size: 16px; letter-spacing: 0.22em; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: var(--accent); }
.brand-mark span:nth-child(1), .brand-mark span:nth-child(5) { height: 8px; opacity: 0.55; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(4) { height: 13px; background: var(--bar-mid); }
.brand-mark span:nth-child(3) { height: 18px; }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .lang { margin-left: 6px; border: 1px solid var(--line); }

/* --- Ana sayfa --- */
.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.home main { flex: 1; display: flex; align-items: center; padding: 24px 0 40px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--headline);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.lead { margin: 0 0 28px; max-width: 30em; color: var(--muted); font-size: 18px; }

.soon {
  display: inline-block;
  margin: 0;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  font-weight: 600;
  font-size: 15px;
}
.fine { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Telefonlar ekranın yüksekliğine sığar: alçak dizüstü ekranlarında da tek ekran. */
.shot { max-width: calc(56vh * 0.45); max-width: calc(56svh * 0.45); justify-self: center; }
.phone { padding: 5px; border-radius: 26px; background: var(--frame); box-shadow: var(--frame-shadow); }
.phone img { display: block; width: 100%; height: auto; border-radius: 21px; }
.shot h2 { margin: 16px 0 4px; font-family: var(--headline); font-weight: 700; font-size: 16px; line-height: 1.3; }
.shot p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

@media (max-width: 860px) {
  .home main { align-items: flex-start; padding-top: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .lead { font-size: 17px; }
  .shots {
    display: flex;
    gap: 14px;
    margin: 0 -20px;
    padding: 4px 20px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 min(58%, 240px); max-width: none; scroll-snap-align: start; }
}

/* --- Hukuki sayfalar --- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { margin: 0 0 8px; font-family: var(--headline); font-weight: 800; font-size: clamp(28px, 5vw, 38px); line-height: 1.2; letter-spacing: -0.015em; }
.doc .meta { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.doc h2 { margin: 36px 0 10px; font-family: var(--headline); font-weight: 700; font-size: 21px; }
.doc h3 { margin: 22px 0 6px; font-size: 16px; font-weight: 600; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.note {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.doc .steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: var(--headline); font-weight: 700; }

/* --- Alt bilgi --- */
.footer { padding: 24px 0 32px; color: var(--muted); font-size: 14px; }
.doc + .footer { border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* --- Gitar teli (site.js oluşturur): çekip bırakınca titrer, nota çalar, temayı değiştirir --- */
.tel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: var(--zone);
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.tel.is-held { cursor: grabbing; }
.tel:focus { outline: none; }
.tel:focus-visible::after {
  content: "";
  position: absolute;
  inset: 10px 8px;
  border: 2px solid var(--accent);
  border-radius: 999px;
}
.tel svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tel path { fill: none; stroke: var(--string); stroke-linecap: round; stroke-linejoin: round; }
.tel .string { stroke-width: 2; }
.tel .ghost { stroke-width: 2; opacity: 0; }
.tel .hole { fill: var(--hole); }
.tel .rosette { fill: none; stroke: var(--rosette); stroke-width: 2.5; }
.tel .rosette.thin { stroke-width: 1.2; opacity: 0.7; }

.tel-hint {
  position: absolute;
  top: 50%;
  right: calc(var(--zone) / 2 + 9px);
  writing-mode: vertical-rl;
  transform: translateY(-100%) rotate(180deg);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.tel.is-known .tel-hint { opacity: 0; }

.tel-note {
  position: absolute;
  top: 0;
  right: calc(var(--zone) / 2 + 16px);
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--surface-high);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.tel-note.is-on { animation: tel-note 1.6s ease-out forwards; }
@keyframes tel-note {
  0% { opacity: 0; transform: translate(4px, -50%); }
  12% { opacity: 1; transform: translate(0, -50%); }
  70% { opacity: 1; transform: translate(0, -50%); }
  100% { opacity: 0; transform: translate(0, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-shift body, .theme-shift body * { transition: none; }
  .tel-hint { transition: none; }
  .tel-note.is-on { animation: tel-note-still 1.6s step-end forwards; transform: translateY(-50%); }
  @keyframes tel-note-still {
    0% { opacity: 1; }
    100% { opacity: 0; }
  }
}

@media (max-width: 560px) {
  .topbar .wrap { min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav a { padding: 6px 7px; font-size: 13px; }
  .nav .lang { margin-left: 2px; }
}
