/* =========================================================
   Happy Garden — menü seçici
   Sol: coff'mi (krem · espresso · Cormorant/Montserrat)
   Sağ: Bitez Dondurma (lacivert girdap · waffle turuncusu · Fraunces/DM Sans)
   ========================================================= */
:root {
  /* coff'mi */
  --c-bg: #F4ECE1;
  --c-bg-2: #EADFD0;
  --c-ink: #2A1C15;
  --c-brand: #7F5E51;
  --c-deep: #5B3F32;
  --c-accent: #A8703F;
  /* Bitez */
  --b-950: #040e22;
  --b-900: #071733;
  --b-800: #0b2350;
  --b-blue: #2a6fd6;
  --b-sky: #8fb8f2;
  --b-milk: #fbfaf6;
  --b-waffle: #f39a1e;
  --b-waffle-600: #d97a00;

  --f-c-display: 'Cormorant', Georgia, serif;
  --f-c-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-b-display: 'Fraunces', Georgia, serif;
  --f-b-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* JS tarafından güncellenir */
  --s: .5;           /* bölünme oranı: coff'mi'nin payı */
  --cx: 50%; --cy: 50%;   /* imleç (coff'mi ışığı) */
  --bx: 50%; --by: 50%;   /* imleç (Bitez ışığı) */
  --tilt-x: 0; --tilt-y: 0;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font: 500 16px/1.5 var(--f-c-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
img { display: block; max-width: 100%; }
p { margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; }

.side {
  position: absolute; inset: 0;
  display: block; text-decoration: none; color: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.side--bitez {
  /* JS dalgalı sınırı çizene kadar düz bir yarı */
  clip-path: inset(0 0 0 50%);
  color: var(--b-milk);
  will-change: clip-path;
}
.side__bg { position: absolute; inset: 0; overflow: hidden; }

.side__content {
  position: absolute; top: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 48px 32px;
  transition: opacity 480ms var(--ease-out), transform 620ms var(--ease-out), filter 480ms var(--ease-out);
}
.side--coff  .side__content { left: 0; width: calc(var(--s) * 100%); padding-right: 92px; }
.side--bitez .side__content { right: 0; width: calc((1 - var(--s)) * 100%); padding-left: 92px; }

/* ---------- coff'mi background ---------- */
.coff-bg { background: var(--c-bg); }
.coff-bg::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); pointer-events: none; }
.coff-bg__glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(38vmax 38vmax at var(--cx) var(--cy), rgba(232, 196, 160, .55), transparent 62%),
    radial-gradient(60vmax 50vmax at 0% 100%, rgba(168, 112, 63, .16), transparent 70%),
    radial-gradient(50vmax 40vmax at 0% 0%, rgba(255, 250, 243, .9), transparent 70%);
  transition: background-position 200ms linear;
}
.coff-bg__rings {
  position: absolute;
  left: calc(var(--s) * 50%); top: 50%;
  width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(91, 63, 50, .055) 58px 59px);
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 55%);
          mask: radial-gradient(circle, #000 0 22%, transparent 55%);
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: translate(-50%, -50%) scale(1.06); } }

/* ---------- Bitez background ---------- */
.bitez-bg { background: var(--b-900); }
.bitez-bg__swirl {
  position: absolute; left: 50%; top: 50%;
  width: 190vmax; height: 190vmax;
  margin: -95vmax 0 0 -95vmax;
  background: url(swirl.webp) center / cover;
  filter: saturate(1.25) brightness(1.05);
  animation: spin 70s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bitez-bg__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(34vmax 34vmax at var(--bx) var(--by), rgba(42, 111, 214, .5), transparent 65%),
    radial-gradient(50vmax 40vmax at 100% 0%, rgba(4, 14, 34, .7), transparent 70%),
    linear-gradient(180deg, rgba(4, 14, 34, .15), rgba(4, 14, 34, .55));
  mix-blend-mode: screen;
}
.bitez-bg__glow { mix-blend-mode: normal; }
.sprinkles { position: absolute; inset: 0; width: 100%; height: 100%; }
.bitez-bg__milk {
  position: absolute; right: -10%; bottom: -6%;
  width: min(1100px, 95vw); max-width: none;
  opacity: .92;
  filter: drop-shadow(0 -10px 30px rgba(0, 0, 0, .25));
  animation: milk 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes milk { from { transform: translateY(4%) rotate(-1deg); } to { transform: translateY(0%) rotate(1deg); } }

/* ---------- Corners ---------- */
.corner {
  position: absolute; top: 28px;
  font: 600 11px/1 var(--f-c-body);
  letter-spacing: .26em; text-transform: uppercase;
  white-space: nowrap;
}
.corner b { font-weight: 600; display: inline-block; padding: 6px 8px; border-radius: 99px; margin: 0 10px 0 0; }
.corner--tl { left: 32px; color: var(--c-brand); }
.corner--tl b { border: 1px solid rgba(91, 63, 50, .3); }
.corner--tr { right: 32px; color: rgba(251, 250, 246, .78); font-family: var(--f-b-body); font-weight: 700; letter-spacing: .22em; }
.corner--tr b { margin: 0 0 0 10px; border: 1px solid rgba(251, 250, 246, .35); }

/* ---------- Typo ---------- */
.eyebrow {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap;
  margin-bottom: 26px;
}
.eyebrow--coff { font-family: var(--f-c-body); font-weight: 600; color: var(--c-brand); }
.eyebrow--bitez { font-family: var(--f-b-body); font-weight: 700; color: var(--b-sky); letter-spacing: .26em; }

.tag { margin-top: 22px; white-space: nowrap; }
.tag--coff { font: italic 500 clamp(22px, 2.1vw, 30px)/1.2 var(--f-c-display); color: var(--c-deep); }
.tag--bitez {
  font-family: var(--f-b-display); font-weight: 700; font-variation-settings: "SOFT" 100, "opsz" 72;
  font-size: clamp(20px, 1.9vw, 28px); line-height: 1.2; color: #fff;
  text-shadow: 0 4px 24px rgba(4, 14, 34, .6);
}

/* ---------- Logos ---------- */
.coff-steam { position: relative; height: 54px; width: 80px; margin-bottom: 6px; }
.coff-steam i {
  position: absolute; bottom: 0; width: 7px; height: 50px; border-radius: 8px;
  background: linear-gradient(to top, rgba(127, 94, 81, 0), rgba(127, 94, 81, .6), rgba(127, 94, 81, 0));
  filter: blur(3px);
  animation: steam 3.6s ease-in-out infinite;
  opacity: 0;
}
.coff-steam i:nth-child(1) { left: 20px; animation-delay: 0s; }
.coff-steam i:nth-child(2) { left: 37px; animation-delay: 1.1s; height: 56px; }
.coff-steam i:nth-child(3) { left: 54px; animation-delay: 2.2s; }
@keyframes steam {
  0%   { transform: translateY(14px) scaleY(.5) skewX(0); opacity: 0; }
  35%  { opacity: 1; }
  60%  { transform: translateY(-4px) scaleY(1) skewX(-14deg); }
  100% { transform: translateY(-30px) scaleY(1.15) skewX(12deg); opacity: 0; }
}
.coff-logo {
  width: clamp(220px, 27vw, 430px); height: auto;
  transform: perspective(900px) rotateX(calc(var(--tilt-y) * -4deg)) rotateY(calc(var(--tilt-x) * 5deg));
  transition: transform 600ms var(--ease-out);
  filter: drop-shadow(0 18px 30px rgba(91, 63, 50, .12));
}
.bitez-logo {
  width: clamp(240px, 29vw, 460px); height: auto;
  transform: perspective(900px) rotateX(calc(var(--tilt-y) * -6deg)) rotateY(calc(var(--tilt-x) * 8deg));
  transition: transform 600ms var(--ease-out);
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .45));
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 50% { translate: 0 -10px; } }

/* ---------- CTA ---------- */
.cta {
  margin-top: 34px;
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 22px 0 28px; border-radius: 999px;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  transition: transform 420ms var(--ease-spring), box-shadow 420ms var(--ease-out), background 300ms;
}
.cta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 420ms var(--ease-spring); }
.cta--coff {
  font-family: var(--f-c-body); font-weight: 600;
  color: #FFF8EF; background: var(--c-deep);
  box-shadow: 0 12px 30px -12px rgba(91, 63, 50, .7);
}
.cta--bitez {
  font-family: var(--f-b-body); font-weight: 700;
  color: #1b1100; background: var(--b-waffle);
  box-shadow: 0 14px 34px -12px rgba(243, 154, 30, .8);
}
.side:hover .cta, .side:focus-visible .cta { transform: translateY(-2px) scale(1.04); }
.side:hover .cta svg, .side:focus-visible .cta svg { transform: translateX(4px); }
.side:focus-visible .cta { outline: 3px solid currentColor; outline-offset: 4px; }
.side--coff:focus-visible .cta { outline-color: var(--c-accent); }
.side--bitez:focus-visible .cta { outline-color: #fff; }

/* Hover state (body classes set by JS) */
body.hover-coff  .side--bitez .side__content,
body.hover-bitez .side--coff  .side__content { opacity: .55; filter: blur(1.5px); transform: scale(.96); }
body.hover-coff  .side--coff  .side__content,
body.hover-bitez .side--bitez .side__content { transform: scale(1.02); }

/* ---------- Seam ---------- */
.seam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#seamPath { fill: none; stroke: rgba(255, 252, 246, .95); stroke-width: 2; }
#seamGlow { fill: none; stroke: rgba(143, 184, 242, .55); stroke-width: 14; filter: blur(9px); }

/* ---------- Medallion ---------- */
.medal {
  position: absolute; left: 0; top: 0;
  width: 156px; height: 156px; margin: -78px 0 0 -78px;
  pointer-events: none;
  will-change: transform;
  transition: opacity 420ms var(--ease-out);
}
.medal__ring {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  animation: spin 28s linear infinite;
  font: 600 13px var(--f-c-body); letter-spacing: .1em;
  fill: #F4ECE1;
  filter: drop-shadow(0 14px 30px rgba(4, 14, 34, .35));
}
.medal__band { fill: #EFE3D4; stroke: #5B3F32; stroke-width: 24; }
.medal__core {
  position: absolute; inset: 14px;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 20%, #FFFBF5, #F1E6D8 60%, #E6D6C3);
  box-shadow:
    0 0 0 1px rgba(91, 63, 50, .12),
    0 0 0 6px rgba(255, 252, 246, .35),
    0 24px 50px -14px rgba(4, 14, 34, .55),
    inset 0 -6px 14px rgba(91, 63, 50, .12);
  display: grid; place-items: center; align-content: center; gap: 4px;
}
.medal__happy { width: 52%; opacity: .85; }
.medal__garden { width: 74%; margin-top: -2px; }

/* ---------- Hint ---------- */
.hint {
  position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: inline-flex; gap: 12px; align-items: center;
  padding: 10px 18px; border-radius: 999px;
  font: 600 11px/1 var(--f-c-body); letter-spacing: .26em; text-transform: uppercase; white-space: nowrap;
  color: var(--c-deep);
  background: rgba(255, 251, 245, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(4, 14, 34, .5);
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
}
.hint__l { animation: nudgeL 1.8s ease-in-out infinite; }
.hint__r { animation: nudgeR 1.8s ease-in-out infinite; }
@keyframes nudgeL { 50% { transform: translateX(-4px); } }
@keyframes nudgeR { 50% { transform: translateX(4px); } }
body.has-hovered .hint { opacity: 0; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: 14px;
  background: var(--c-bg);
  background-image: var(--grain);
  pointer-events: none;
  transition: opacity 700ms var(--ease-out), visibility 700ms;
}
.intro__happy { width: min(52vw, 260px); opacity: 0; letter-spacing: 0; animation: happyIn 1100ms var(--ease-out) 150ms forwards; }
.intro__garden {
  width: min(78vw, 420px);
  clip-path: inset(0 100% 0 0);
  animation: write 1300ms cubic-bezier(.6, .1, .3, 1) 450ms forwards;
}
@keyframes happyIn { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: .9; transform: none; filter: none; } }
@keyframes write { to { clip-path: inset(0 0 0 0); } }
body:not(.is-intro) .intro { opacity: 0; visibility: hidden; }

/* İçerik girişleri */
body.is-intro .side__content > *:not(.corner) { opacity: 0; transform: translateY(16px); }
.side__content > * { transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
.side__content > *:nth-child(2) { transition-delay: 80ms; }
.side__content > *:nth-child(3) { transition-delay: 160ms; }
.side__content > *:nth-child(4) { transition-delay: 240ms; }
.side__content > *:nth-child(5) { transition-delay: 320ms; }
.side__content > *:nth-child(6) { transition-delay: 400ms; }
body.is-intro .medal { opacity: 0; }
body.is-intro .hint { opacity: 0; }

/* Ayrılış */
body.leaving .medal, body.leaving .hint, body.leaving .seam { opacity: 0; transition: opacity 260ms; }
body.leaving-coff .side--coff .side__content,
body.leaving-bitez .side--bitez .side__content { transform: scale(1.08); opacity: 1; filter: none; }
body.leaving-coff .side--bitez .side__content,
body.leaving-bitez .side--coff .side__content { opacity: 0; }

/* ---------- Portre (telefon): üst coff'mi, alt Bitez ---------- */
@media (max-aspect-ratio: 1/1) {
  .side--bitez { clip-path: inset(50% 0 0 0); }
  .side__content { left: 0; right: 0; width: auto !important; padding: 20px 24px; }
  .side--coff  .side__content { top: 0; bottom: auto; height: calc(var(--s) * 100%); padding-bottom: 84px; }
  .side--bitez .side__content { top: auto; bottom: 0; height: calc((1 - var(--s)) * 100%); padding-top: 84px; }
  .coff-bg__rings { left: 50%; top: calc(var(--s) * 50%); }
  .corner { top: 18px; font-size: 10px; letter-spacing: .2em; }
  .corner--tl { left: 18px; }
  .corner--tr { right: 18px; top: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .eyebrow { font-size: 9px; letter-spacing: .16em; margin-bottom: 14px; }
  .corner--tr { display: none; }
  .coff-steam { height: 36px; margin-bottom: 0; }
  .coff-steam i { height: 34px; }
  .coff-logo { width: min(62vw, 300px); }
  .bitez-logo { width: min(60vw, 300px); }
  .tag { margin-top: 12px; }
  .cta { margin-top: 18px; height: 46px; font-size: 12px; padding: 0 18px 0 22px; }
  .medal { width: 112px; height: 112px; margin: -56px 0 0 -56px; }
  .medal__ring { font-size: 15px; }
  .hint { display: none; }
  .bitez-bg__milk { width: 130vw; right: -30%; bottom: -5%; opacity: .75; }
  .side--bitez .side__content { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 700px) {
  .eyebrow { display: none; }
  .coff-steam { display: none; }
  .tag { font-size: 18px; }
  .bitez-logo { width: min(50vw, 230px); }
}
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  .coff-steam, .eyebrow { display: none; }
  .bitez-logo { width: clamp(180px, 22vw, 300px); }
  .cta { margin-top: 18px; }
  .corner { display: none; }
}

/* ---------- Azaltılmış hareket ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .intro__garden { clip-path: none; }
  .intro__happy { opacity: .9; }
}
