/* =========================================================
   Koku Bulucu — Tema
   Renk ve fontları değiştirmek için yalnızca :root değişkenlerini düzenleyin.
   ========================================================= */
:root {
  --bg: #f6f1ea;
  --bg-2: #efe6db;
  --surface: #fffdf9;
  --ink: #241a22;
  --ink-2: #5d5059;
  --ink-3: #8e8189;
  --line: #e4d8cb;
  --accent: #3d2338;        /* koyu mürdüm */
  --accent-ink: #fffaf3;
  --gold: #b48a52;
  --gold-soft: #f1e3cc;
  --ok: #3f7d5a;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(36, 26, 34, .04), 0 8px 28px rgba(36, 26, 34, .07);
  --shadow-lg: 0 2px 4px rgba(36, 26, 34, .05), 0 18px 48px rgba(36, 26, 34, .12);
  --ease: cubic-bezier(.22, .8, .26, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 110% -10%, #f0dfd8 0%, transparent 60%),
    radial-gradient(900px 500px at -20% 110%, #ece0cf 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
em { font-style: italic; color: var(--gold); }

/* ---------- iskelet ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; overflow-x: clip; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.logo { justify-self: center; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.logo-mark { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .32em; margin-right: -.32em; }
.logo-sub { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: 4px; font-weight: 600; margin-right: -.28em; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  transition: background .2s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn[hidden] { visibility: hidden; display: grid; }
.step-count { justify-self: end; font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.progress { height: 3px; background: var(--line); }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .5s var(--ease); }
body[data-screen="intro"] .progress, body[data-screen="results"] .progress { opacity: 0; }

.screen { flex: 1; display: flex; outline: none; }
.view { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 24px 16px calc(24px + var(--safe-b)); }
body[data-screen="results"] .view { max-width: 1120px; }

.anim-fwd { animation: inFwd .45s var(--ease) both; }
.anim-back { animation: inBack .45s var(--ease) both; }
@keyframes inFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes inBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(61, 35, 56, .22); }
.btn.primary:hover { background: #4f2e48; }
.btn.primary:disabled { opacity: .35; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface); }
.btn.lg { width: 100%; min-height: 56px; font-size: 16px; }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.cta-dock { margin-top: auto; padding-top: 24px; }
.cta-dock.sticky {
  position: sticky; bottom: 0; margin-left: -16px; margin-right: -16px;
  padding: 16px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.cta-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); }

/* ---------- giriş ---------- */
.intro { flex: 1; display: flex; flex-direction: column; }
.intro-head { text-align: center; }
.intro h1 { font-size: clamp(30px, 8vw, 50px); }
.lead { margin: 12px auto 0; max-width: 32em; color: var(--ink-2); font-size: 15.5px; }

.paths { display: grid; gap: 14px; margin-top: 24px; }
.path {
  position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  padding: 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.path h2 { font-size: 30px; }
.path p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; max-width: 30em; }
.path-tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.path-quiz .path-tag { background: #efe2ea; color: var(--accent); }
.path-notes .path-tag { background: var(--gold-soft); color: #7a5a2c; }
.path-quiz { background: linear-gradient(160deg, #fffdf9 40%, #f7ebee); }
.path-notes { background: linear-gradient(160deg, #fffdf9 40%, #f6eedf); }
.path .btn { margin-top: 6px; }
.path-note { font-size: 13px !important; color: var(--ink-3) !important; text-align: center; }

/* test kartı: küçük süs küreleri */
.path-art { position: absolute; right: -6px; top: -6px; width: 120px; height: 100px; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; animation: float 7s ease-in-out infinite; }
.o1 { width: 64px; height: 64px; right: 22px; top: 18px; background: radial-gradient(circle at 35% 30%, #fff6ee, #e9c6c6 55%, #c99aa6); }
.o2 { width: 34px; height: 34px; right: 76px; top: 52px; background: radial-gradient(circle at 35% 30%, #fffaf0, #f0dcb8 55%, #c9a170); animation-delay: -2.4s; }
.o3 { width: 26px; height: 26px; right: 12px; top: 10px; background: radial-gradient(circle at 35% 30%, #f6fbff, #c9dbe0 55%, #8fb1ba); animation-delay: -4.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.path-facts { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.path-facts li { font-size: 13px; color: var(--ink-2); padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.path-facts b { color: var(--accent); font-weight: 800; }
.path-facts li.gift { background: var(--gold-soft); border-color: transparent; color: #7a5a2c; font-weight: 600; }

/* Mobil: iki seçenek ve butonları ilk ekranda görünsün */
@media (max-width: 719px) {
  body[data-screen="intro"] .view { padding-top: 14px; }
  .intro-head .eyebrow { display: none; }
  .intro h1 { font-size: 28px; }
  .lead { font-size: 14px; margin-top: 8px; }
  .paths { margin-top: 16px; gap: 12px; }
  .path { padding: 16px; gap: 8px; border-radius: 20px; }
  .path h2 { font-size: 26px; }
  .path-quiz p { display: none; }
  .path-notes p { font-size: 13.5px; }
  .path .btn.lg { min-height: 52px; }
  .path-facts li { padding: 5px 9px; font-size: 12.5px; }
  .path-chips a:nth-child(n+4):not(.more) { display: none; }
  .path-art { transform: scale(.8); transform-origin: top right; }
}

/* nota kartı: popüler nota etiketleri */
.path-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.path-chips a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.75); color: var(--ink); text-decoration: none;
  font-size: 13px; font-weight: 600; transition: border-color .15s, background .15s, transform .1s;
}
.path-chips a:hover { border-color: var(--gold); background: #fff; }
.path-chips a:active { transform: scale(.96); }
.path-chips a.more { border-style: dashed; color: #7a5a2c; }

.btn.gold { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(180, 138, 82, .3); }
.btn.gold:hover { background: #a27a45; }

@media (min-width: 720px) {
  .paths { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
  .path { padding: 28px; }
  .path h2 { font-size: 36px; }
  .path .btn { margin-top: auto; }
  .path p { min-height: 3em; }
  body[data-screen="intro"] .view { max-width: 980px; }
}

/* ---------- soru ---------- */
.question { flex: 1; display: flex; flex-direction: column; }
.question h2 { font-size: clamp(28px, 7.5vw, 36px); }
.question .sub { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.options { margin-top: 24px; display: grid; gap: 10px; }
/* Mobilde seçenekler başparmak bölgesine (ekranın altına) yaslanır */
@media (max-width: 719px) {
  .question .options { margin-top: auto; padding-top: 24px; }
  .question h2 { padding-top: 8px; }
}
.options.grid { grid-template-columns: 1fr 1fr; }
.option {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 64px; padding: 14px 44px 14px 16px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .2s, background .2s, transform .15s var(--ease), box-shadow .2s;
}
.option:hover { border-color: #cdb8a2; }
.option:active { transform: scale(.985); }
.option:focus-visible, .btn:focus-visible, .code:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 2px; }
.options.grid .option { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 120px; padding: 16px 14px; gap: 10px; }
.opt-emoji { font-size: 26px; line-height: 1; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); }
.opt-text { display: flex; flex-direction: column; gap: 2px; }
.opt-label { font-weight: 700; font-size: 15px; line-height: 1.3; }
.opt-desc { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.opt-check {
  position: absolute; right: 14px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; transition: all .2s;
}
.options.grid .opt-check { top: 14px; margin-top: 0; }
.opt-check svg { width: 14px; height: 14px; }
.option.selected { border-color: var(--accent); background: #fbf6f2; box-shadow: 0 0 0 3px rgba(61, 35, 56, .08), var(--shadow); }
.option.selected .opt-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.option.selected .opt-emoji { background: var(--gold-soft); }

/* ---------- analiz ---------- */
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; min-height: 60vh; }
.loader { position: relative; width: 110px; height: 110px; }
.loader span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; animation: spin 1.8s linear infinite; }
.loader span:nth-child(1) { border-top-color: var(--accent); }
.loader span:nth-child(2) { inset: 14px; border-right-color: var(--gold); animation-duration: 1.3s; animation-direction: reverse; }
.loader span:nth-child(3) { inset: 30px; background: radial-gradient(circle at 35% 30%, #fff6ee, #e9c6c6 60%, #c99aa6); border: 0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.05); opacity: 1; } }
.loading-text { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.loading-text.swap { animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- sonuçlar ---------- */
.results-head { text-align: center; }
.results-head h2 { font-size: clamp(30px, 8vw, 44px); }
.profile-tags { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.profile-tags li { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

.discount {
  margin: 24px auto 0; width: 100%; max-width: 720px;
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border-radius: var(--radius); background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-lg);
}
.discount .eyebrow { color: #e7c99a; margin-bottom: 4px; }
.discount-text { flex: 1; min-width: 0; }
.discount-text p:last-child { margin: 0; font-size: 13px; opacity: .85; line-height: 1.4; }
.code {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1.5px dashed #e7c99a; color: #fff;
  transition: background .2s;
}
.code:hover { background: rgba(255, 255, 255, .14); }
.code span { font-weight: 800; font-size: 17px; letter-spacing: .12em; }
.code small { font-size: 11px; opacity: .8; }
.code.copied { border-style: solid; }

.cards { margin-top: 24px; display: grid; gap: 16px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  animation: cardIn .6s var(--ease) both; animation-delay: var(--d, 0ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.best {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: var(--gold); color: #fff;
}
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 20px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 5px 10px; border-radius: 999px; background: var(--bg); }
.match { font-size: 13px; color: var(--ink-3); }
.match b { color: var(--ok); font-size: 15px; }
.card h3 { font-size: 26px; }
.reason { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.notes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.notes li { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.card .btn { margin-top: auto; width: 100%; }

.results-actions { margin-top: 28px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lg);
  transition: all .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- geniş ekran ---------- */
@media (min-width: 720px) {
  .view { padding-top: 48px; }
  .options.grid .option { min-height: 132px; }
  .cta-dock.sticky { position: static; background: none; margin: 0; padding: 28px 0 0; }
  .question .cta-dock .btn { width: auto; min-width: 220px; }
  .question .cta-dock { text-align: right; }
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card-media { aspect-ratio: 1 / 1; }
}
@media (max-width: 560px) {
  .discount { flex-direction: column; align-items: stretch; text-align: center; padding: 18px; gap: 12px; }
  .code { flex-direction: row; justify-content: center; gap: 10px; }
  .card-media { aspect-ratio: 5 / 4; }
}
@media (max-width: 360px) {
  .options.grid { grid-template-columns: 1fr; }
  .options.grid .option { flex-direction: row; align-items: center; min-height: 64px; }
  .options.grid .opt-check { top: 50%; margin-top: -12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
