/* ==========================================================================
   UFUK — Psikolog Eylem Can tasarım sistemi (temel)
   Tüm sayfalar bu dosyayı yükler. Sayfaya özel stiller kendi dosyasında durur
   ve YALNIZCA buradaki değişkenleri kullanır (yeni renk / font tanımlanmaz).
   ========================================================================== */

/* ---------- 1. Değişkenler ---------- */
:root {
  color-scheme: light;

  /* Renk — açık tema */
  --bg: oklch(0.975 0.008 135);
  --surface: oklch(0.995 0.004 135);
  --sunken: oklch(0.945 0.012 140);
  --line: oklch(0.88 0.015 150);
  --text: oklch(0.24 0.025 172);
  --muted: oklch(0.5 0.022 170);
  --primary: oklch(0.42 0.075 172);
  --primary-soft: oklch(0.42 0.075 172 / 0.08);
  --on-primary: oklch(0.985 0.006 135);
  --accent: oklch(0.82 0.09 65);
  --on-accent: oklch(0.24 0.025 172);
  --success: oklch(0.52 0.11 150);
  --warn: oklch(0.62 0.12 70);
  --danger: oklch(0.52 0.14 28);
  --scrim: oklch(0.2 0.02 175 / 0.42);
  --shadow: 0 1px 2px oklch(0.24 0.025 172 / 0.05), 0 12px 32px -12px oklch(0.24 0.025 172 / 0.16);

  /* Yazı */
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-read: "Newsreader", Georgia, "Times New Roman", serif;

  --fs-display: clamp(2.5rem, 9vw, 5rem);
  --fs-h2: clamp(1.75rem, 5vw, 2.75rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.0625rem; /* 17px */
  --fs-small: 0.875rem; /* 14px */
  --fs-label: 0.8125rem; /* 13px */

  /* Hareket */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --t-micro: 150ms;
  --t-ui: 260ms;
  --t-expr: 600ms;

  /* Biçim */
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 28px;
  --r-pill: 999px;
  --gutter: 20px;
  --max: 68rem;
  --tap: 48px;
  --bar-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* Gün ışığı: Samsun'un gün doğumu/batımına göre zemin hafifçe ısınır (ufuk.js ayarlar) */
:root[data-isik="sabah"] { --bg: oklch(0.975 0.013 98); --sunken: oklch(0.946 0.017 100); }
:root[data-isik="aksam"] { --bg: oklch(0.972 0.015 82); --sunken: oklch(0.942 0.02 84); }
:root[data-isik="gece"]  { --bg: oklch(0.968 0.009 172); --sunken: oklch(0.938 0.013 172); }

/* Koyu tema: lacivert değil yeşil-siyah */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.19 0.015 175);
  --surface: oklch(0.235 0.018 175);
  --sunken: oklch(0.28 0.02 175);
  --line: oklch(0.33 0.02 175);
  --text: oklch(0.93 0.012 135);
  --muted: oklch(0.72 0.02 160);
  --primary: oklch(0.8 0.09 168);
  --primary-soft: oklch(0.8 0.09 168 / 0.1);
  --on-primary: oklch(0.19 0.015 175);
  --success: oklch(0.76 0.12 150);
  --warn: oklch(0.8 0.12 80);
  --danger: oklch(0.72 0.13 28);
  --scrim: oklch(0.1 0.01 175 / 0.6);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 16px 40px -16px oklch(0 0 0 / 0.6);
}
:root[data-theme="dark"][data-isik="sabah"] { --bg: oklch(0.192 0.016 160); }
:root[data-theme="dark"][data-isik="aksam"] { --bg: oklch(0.192 0.017 150); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: oklch(0.19 0.015 175);
    --surface: oklch(0.235 0.018 175);
    --sunken: oklch(0.28 0.02 175);
    --line: oklch(0.33 0.02 175);
    --text: oklch(0.93 0.012 135);
    --muted: oklch(0.72 0.02 160);
    --primary: oklch(0.8 0.09 168);
    --primary-soft: oklch(0.8 0.09 168 / 0.1);
    --on-primary: oklch(0.19 0.015 175);
    --scrim: oklch(0.1 0.01 175 / 0.6);
  }
}

/* Sunum sayfasındaki telefon çerçevesi içinde: masaüstü kaydırma çubuğu görünmesin */
html.cerceve { scrollbar-width: none; }
html.cerceve::-webkit-scrollbar { display: none; }

/* ---------- 2. Sıfırlama ve temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
h1, .display { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.03em; font-variation-settings: "wdth" 92; font-weight: 480; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.02em; font-variation-settings: "wdth" 95; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 550; letter-spacing: -0.005em; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- 3. Yardımcılar ---------- */
.kap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.kap--dar { max-width: 42rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.soluk { color: var(--muted); }
.kucuk { font-size: var(--fs-small); line-height: 1.45; }
.etiket { font-size: var(--fs-label); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.lead { font-size: clamp(1.125rem, 2.6vw, 1.375rem); line-height: 1.5; color: var(--muted); }
.rakam { font-variant-numeric: tabular-nums; }
.yigin { display: flex; flex-direction: column; gap: var(--bosluk, 16px); }
.sira { display: flex; align-items: center; gap: var(--bosluk, 12px); }
.sira--ara { justify-content: space-between; }
.bolum { padding-block: clamp(56px, 11vw, 120px); }
.bolum + .bolum { border-top: 1px solid var(--line); }

/* Ufuk çizgisi: sitenin imzası. Tek ince çizgi, solunda küçük "ilk ışık" noktası. */
.ufuk {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 10%, var(--line) 90%, transparent);
}
.ufuk::after {
  content: "";
  position: absolute;
  left: var(--isik-x, 22%);
  top: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  translate: -50% -50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px oklch(0.82 0.09 65 / 0.18);
}
.ufuk--yalin::after { display: none; }

/* ---------- 4. Parçalar ---------- */

/* Düğme */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 22px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out),
              color var(--t-micro) var(--ease-out), scale var(--t-micro) var(--ease-out);
  user-select: none;
}
.btn:active { scale: 0.97; }
.btn--birincil { background: var(--primary); color: var(--on-primary); }
.btn--birincil:hover { background: color-mix(in oklch, var(--primary) 88%, var(--text)); }
.btn--cizgi { border-color: var(--line); background: var(--surface); }
.btn--cizgi:hover { border-color: var(--muted); }
.btn--sessiz { color: var(--primary); padding-inline: 8px; }
.btn--sessiz:hover { background: var(--primary-soft); }
.btn--buyuk { min-height: 56px; padding-inline: 28px; font-size: 1.0625rem; }
.btn--ikon { width: var(--tap); padding: 0; flex: none; }
.btn--buyuk.btn--ikon { width: 56px; }
.btn--tam { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Çip: seçilebilir küçük hap */
.cip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  transition: background-color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out);
}
.cip:hover { border-color: var(--muted); }
.cip[aria-pressed="true"], .cip[aria-selected="true"], .cip.secili {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary);
}

/* Saat çipi */
.slot {
  display: grid; place-items: center;
  min-height: var(--tap); border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--surface);
  font-variant-numeric: tabular-nums; font-weight: 400; font-size: 1.0625rem;
  transition: font-weight 120ms var(--ease-out), border-color var(--t-micro) var(--ease-out), background-color 180ms var(--ease-out);
}
.slot:hover { border-color: var(--muted); }
.slot[aria-pressed="true"], .slot.secili { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.slot[disabled] { background: transparent; color: var(--muted); opacity: 0.5; text-decoration: line-through; pointer-events: none; }

/* Gün hapı (tarih şeridi) */
.gun {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  width: 56px; height: 72px; flex: none; scroll-snap-align: center;
  border-radius: var(--r-m); border: 1px solid transparent;
  transition: background-color var(--t-ui) var(--ease-out), color var(--t-ui) var(--ease-out);
}
.gun__ad { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.gun__no { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.gun__nokta { display: flex; gap: 3px; height: 4px; }
.gun__nokta i { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); opacity: 0.55; }
.gun[aria-pressed="true"], .gun.secili { background: var(--primary); color: var(--on-primary); }
.gun[aria-pressed="true"] .gun__ad, .gun.secili .gun__ad { color: inherit; opacity: 0.8; }
.gun[aria-pressed="true"] .gun__nokta i, .gun.secili .gun__nokta i { background: var(--on-primary); }
.gun.dolu { opacity: 0.4; }

/* Satır: kart yerine çizgiyle ayrılan liste öğesi */
.satir {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  text-align: start; text-decoration: none;
}
.satir__govde { flex: 1; min-width: 0; }
.satir__baslik { font-weight: 600; }
.satir__alt { color: var(--muted); font-size: var(--fs-small); }
.satir__ok { flex: none; color: var(--muted); transition: translate var(--t-micro) var(--ease-out); }
a.satir:hover .satir__ok, button.satir:hover .satir__ok { translate: 4px 0; }

/* Rozet */
.rozet {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--sunken); font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.rozet--site { background: var(--primary-soft); color: var(--primary); }
.rozet--pm { background: oklch(0.82 0.09 65 / 0.22); color: var(--text); }
.rozet--bekliyor { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.rozet i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Form alanı */
.alan { display: grid; gap: 6px; }
.alan > span { font-size: var(--fs-label); font-weight: 600; color: var(--muted); }
.alan input, .alan textarea, .alan select {
  width: 100%; min-height: 56px; padding: 0 16px;
  border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface);
  font-size: 1.0625rem;
  transition: border-color var(--t-micro) var(--ease-out), box-shadow var(--t-micro) var(--ease-out);
}
.alan textarea { padding-block: 14px; min-height: 96px; resize: vertical; }
.alan input:focus, .alan textarea:focus, .alan select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.alan input::placeholder, .alan textarea::placeholder { color: var(--muted); opacity: 0.7; }

/* Onay kutusu */
.onay { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.45; cursor: pointer; }
.onay input {
  appearance: none; flex: none; width: 24px; height: 24px; margin: 0;
  border-radius: 7px; border: 1.5px solid var(--muted); background: var(--surface);
  display: grid; place-items: center; transition: background-color var(--t-micro), border-color var(--t-micro);
}
.onay input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale var(--t-micro) var(--ease-out); }
.onay input:checked { background: var(--primary); border-color: var(--primary); }
.onay input:checked::after { scale: 1; }

/* Üst çubuk */
.ust {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); /* opak: bulanıklık yok, alttaki metin gölgelenmez */
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-ui) var(--ease-out);
}
.ust.kaydi { border-bottom-color: var(--line); }
.ust__ic { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.marka { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding-block: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 550; font-size: 1.125rem; letter-spacing: -0.01em; }
.marka small { font-family: var(--font-text); font-weight: 500; font-size: 0.8125rem; color: var(--muted); }
.ust__menu { display: none; gap: 28px; font-size: 0.9375rem; font-weight: 500; }
.ust__menu a { text-decoration: none; color: var(--muted); transition: color var(--t-micro); }
.ust__menu a:hover, .ust__menu a[aria-current="page"] { color: var(--text); }
@media (min-width: 900px) { .ust__menu { display: flex; } .ust__ic { height: 72px; } }

/* Tema düğmesi */
.tema-dugme { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color var(--t-micro), background-color var(--t-micro); }
.tema-dugme:hover { color: var(--text); background: var(--sunken); }
.tema-dugme svg { width: 20px; height: 20px; }
.tema-dugme .ay { display: none; }
:root[data-theme="dark"] .tema-dugme .ay { display: block; }
:root[data-theme="dark"] .tema-dugme .gunes { display: none; }

/* Alt sabit çubuk: başparmak bölgesindeki randevu girişi */
.altbar {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  padding: 10px var(--gutter) calc(12px + var(--safe-b));
  background: var(--bg);
  border-top: 1px solid var(--line);
  view-transition-name: altbar;
}
.altbar__ic { display: flex; align-items: center; gap: 10px; max-width: 30rem; margin-inline: auto; }
.altbar__ipucu { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-label); color: var(--muted); }
.altbar__ipucu i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.altbar .btn--birincil { flex: 1; }
.altbar-bosluk { height: calc(var(--bar-h) + 28px + var(--safe-b)); }
@media (min-width: 900px) {
  .altbar { inset: auto auto 24px 50%; translate: -50% 0; width: min(30rem, calc(100vw - 48px)); padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
}

/* Alt bilgi */
.alt { padding-block: 48px calc(48px + var(--bar-h) + var(--safe-b)); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }
.alt a { text-decoration: none; }
.alt a:hover { color: var(--text); }
.acil { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r-m); background: var(--sunken); color: var(--text); font-size: var(--fs-small); }

/* ---------- 5. Sayfa geçişleri ---------- */
@view-transition { navigation: auto; }
.ufuk-sabit { view-transition-name: ufuk; }
::view-transition-old(root) { animation: 160ms var(--ease-out) both ufuk-cik; }
::view-transition-new(root) { animation: 220ms var(--ease-out) both ufuk-gir; }
@keyframes ufuk-cik { to { opacity: 0; translate: 0 -8px; } }
@keyframes ufuk-gir { from { opacity: 0; translate: 0 12px; } }
/* Tema değişimi: düğmeden dairesel açılma (ufuk.js sınıfı ekler) */
:root.tema-geciyor::view-transition-old(root) { animation: none; z-index: 1; }
:root.tema-geciyor::view-transition-new(root) { animation: 420ms var(--ease-inout) both tema-ac; z-index: 2; }
@keyframes tema-ac { from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 0%)); } to { clip-path: circle(150vmax at var(--tx, 50%) var(--ty, 0%)); } }

/* Görünüme girince beliren öğeler (ufuk.js .gorundu ekler) */
.belir { opacity: 0; translate: 0 14px; transition: opacity 500ms var(--ease-out), translate 500ms var(--ease-out); transition-delay: var(--gecikme, 0ms); }
.belir.gorundu { opacity: 1; translate: 0 0; }

/* ---------- 6. Azaltılmış hareket ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 120ms !important; transition-property: opacity, background-color, color, border-color !important; }
  .belir { translate: 0 0; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
