/* ============================================================
   Köz Kahve — tek stil dosyası
   Palet: sage → honey → amber → roast → cup (kavurma eğrisi)
   Karakter: Kadıköy'de küçük parti mikro kavurmacı; sade, teknik, mono etiketler
   ============================================================ */

/* 1. reset+tokens ============================================ */
:root {
  --sage: #A8B5A0;
  --honey: #D9A441;
  --amber: #9A5522;
  --roast: #3B2A20;
  --cup: #241B15;
  --ink: #26211B;
  --cream: #F2E9DC;
  --hairline: color-mix(in srgb, var(--honey) 35%, transparent);
  --hairline-soft: color-mix(in srgb, var(--honey) 18%, transparent);
  --max-w: 1200px;
  --font-body: -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Çapa atlamaları anlık: bu sayfa 12 ekran boyu bir yolculuk, smooth kaydırma sahneleri hızlıca atlatır. */
html { scroll-behavior: auto; }
body {
  font-family: var(--font-body);
  background: var(--sage);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* JS toggles html.is-dark as the roast lerp engine crosses stage stops (see assets/app.js §4). */
html.is-dark body { color: var(--cream); }
img, svg { max-width: 100%; height: auto; }
ul[class], ol[class] { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; }

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--honey); color: var(--cup); font-weight: 700;
  padding: 12px 20px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* 2. type+utilities ============================================ */
h1, h2, h3 { font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { max-width: 62ch; }

.micro {
  display: inline-block; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 400; color: currentColor;
}
.stamp {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; font-weight: 400;
  border: 1px solid currentColor; border-radius: 0;
  padding: 6px 12px; line-height: 1.2;
}
.muted { opacity: .72; }
.honey { color: var(--honey); }

.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.hairline { border-top: 1px solid var(--hairline); }

/* 3. header+nav ================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(36, 27, 21, 0);
  color: var(--ink);
  transition: background .3s ease, color .3s ease;
}
html:not(.js) .site-header { position: absolute; }
.site-header.scrolled {
  background: rgba(36, 27, 21, .55);
  color: var(--cream);
  backdrop-filter: none;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
}
.brand svg { width: 32px; height: 32px; flex: none; }
.brand span { text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; font-weight: 600; }
.brand small { display: block; margin-top: 2px; font-family: var(--font-mono); font-weight: 400; font-size: .6rem; letter-spacing: .18em; opacity: .8; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  color: inherit; text-decoration: none; text-transform: uppercase;
  letter-spacing: .1em; font-size: .82rem; white-space: nowrap; position: relative; padding-block: 6px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--honey); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* Dil değiştirici (kayar mandal) — no-radius kuralının tek istisnası */
.lang-toggle {
  position: relative; display: inline-flex; align-items: center;
  border: 1px solid currentColor; border-radius: 999px; background: transparent;
  padding: 3px; text-decoration: none; transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--honey); }
.lang-opt {
  position: relative; z-index: 1; width: 28px; text-align: center;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  color: currentColor; opacity: .65; line-height: 20px;
  transition: color .2s, opacity .2s;
}
.lang-opt.is-active { color: var(--cup); opacity: 1; }
.lang-knob {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: 28px;
  border-radius: 999px; background: var(--honey);
  view-transition-name: lang-knob;
}
.lang-toggle-en .lang-knob { left: auto; right: 3px; }

@media (max-width: 1023px) {
  /* No-JS fallback: nav-toggle stays hidden (it can't do anything without
     JS) and .nav-links renders inline as a plain, always-visible, stacked
     block — full primary nav stays reachable with JS disabled/blocked. */
  .nav-links {
    flex-basis: 100%; order: 3;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(36, 27, 21, .85); color: var(--cream);
    padding: 16px 20px 24px;
    border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  }
  .nav-links a { padding: 12px 8px; }
  li.lang-switch { justify-content: center; align-self: center; }

  /* JS-enhanced: hamburger-triggered slide-down overlay replaces the
     plain stacked block above. Everything here is scoped to html.js so
     the no-JS fallback above is what renders without app.js. */
  html.js .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; color: inherit;
  }
  html.js .nav-toggle span { display: block; height: 1.5px; width: 100%; background: currentColor; transition: transform .25s, opacity .25s; }
  html.js .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  html.js .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  html.js .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  html.js .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    visibility: hidden; opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  html.js .nav-open .nav-links { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .24s ease, transform .24s ease; }
  html.js .site-header.nav-open { background: rgba(36, 27, 21, .85); color: var(--cream); }
  html.js .nav-links li { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
  html.js .nav-open .nav-links li { opacity: 1; transform: none; }
  html.js .nav-open .nav-links li:nth-child(1) { transition-delay: .03s } html.js .nav-open .nav-links li:nth-child(2) { transition-delay: .06s }
  html.js .nav-open .nav-links li:nth-child(3) { transition-delay: .09s } html.js .nav-open .nav-links li:nth-child(4) { transition-delay: .12s }
  html.js .nav-open .nav-links li:nth-child(5) { transition-delay: .15s }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle span, .nav-links, .nav-links li, .site-header { transition: none; }
}

/* 4. footer ===================================================== */
.site-footer {
  background: var(--cup); color: var(--cream);
  border-top: 1px solid var(--hairline);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1.5fr; gap: 36px; padding-block: 56px 40px; }
.site-footer h3 { color: var(--honey); font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 400; margin-bottom: 16px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--honey); text-decoration: underline; }
.site-footer li { margin-bottom: 10px; }
.site-footer .brand { color: var(--cream); }
.footer-tagline { color: var(--cream); opacity: .72; max-width: 30ch; margin-top: 10px; }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a { display: inline-flex; padding: 8px; border: 1px solid var(--hairline); color: var(--honey); }
.social-row a:hover, .social-row a:focus-visible { border-color: var(--honey); color: var(--cream); }
.social-row svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--hairline-soft); padding-block: 20px; }
.footer-bottom p { font-size: .8rem; opacity: .72; }

@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* 5. journey ==================================================== */
/* Yolculuk: yeşil çekirdekten fincana beş sahne. Base (no-JS /
   reduced-motion): her sahne kendi statik bg-* sınıfıyla tam renkli
   ve okunaklı render edilir. html.js.lerp-on altında (bkz. bölüm 6 ve
   assets/app.js §4) lerp/curve motoru zemini şeffaflaştırıp devralır. */

#yolculuk { position: relative; }

.stage {
  position: relative;
  min-height: 100svh;
  padding-block: clamp(48px, 8vh, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.js.lerp-on .stage { background: transparent; }

.bg-sage  { background: var(--sage);  color: var(--ink); }
.bg-honey { background: var(--honey); color: var(--ink); }
.bg-amber { background: var(--amber); color: var(--cream); }
.bg-roast { background: var(--roast); color: var(--cream); }
.bg-cup   { background: var(--cup);   color: var(--cream); }

.stage-inner {
  width: 100%; max-width: 860px; margin-inline: auto; padding-inline: 24px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(20px, 3vw, 28px);
}
.stage-inner .micro { margin-bottom: -6px; }
.stage-inner h1, .stage-inner h2 { margin: 0; }
.stage-inner p:not(.micro) { margin: 0; }

.stage-img {
  display: block; width: 100%; height: auto;
  margin-top: clamp(8px, 2vw, 16px);
}

/* -- stage 0: hero video, separate from text (never overlaid) -- */
.hero-media {
  position: relative; left: 50%; transform: translateX(-50%);
  width: 100vw; height: min(70svh, 62vw); overflow: hidden;
  margin-top: clamp(32px, 6vw, 64px);
}
.hero-media .video-fallback, .hero-media .hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-video, .video-fallback {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.video-fallback { display: none; }

.hint {
  position: absolute; left: 50%; bottom: clamp(16px, 4vh, 32px); transform: translateX(-50%);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .18em;
  font-size: .7rem; opacity: .8;
}
@media (prefers-reduced-motion: no-preference) {
  html.js .hint { animation: hint-bob 1.8s ease-in-out infinite; }
}
@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .video-fallback { display: block; }
}

/* -- curve overlay: SVG lives in section 6 (curve + lerp) below -- */

/* -- reveal-on-scroll: journey stage images -- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity .6s ease, transform .6s ease;
  }
  html.js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 599px) {
  .stage-inner { padding-inline: 20px; gap: 18px; }
  .stamp { white-space: normal; }
}

/* v2: kırılım sargıları — transformlar sargıda, .reveal img'de kalır */
.stage-bleed, .stage-pair, .stage-wide {
  position: relative; left: 50%; transform: translateX(-50%);
  margin-top: clamp(8px, 2vw, 16px); overflow: hidden;
}
.stage-bleed { width: 100vw; height: min(70svh, 62vw); }
.stage-pair  { width: min(1200px, calc(100vw - 48px)); display: grid;
               grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 24px);
               overflow: visible; }
.stage-pair > div { aspect-ratio: 4 / 3; overflow: hidden; }
.stage-wide  { width: min(1200px, calc(100vw - 48px)); aspect-ratio: 16 / 9; }
.stage-bleed .stage-img, .stage-pair .stage-img, .stage-wide .stage-img {
  width: 100%; height: 100%; object-fit: cover; margin-top: 0;
}
@media (max-width: 767px) {
  .stage-bleed { height: min(55svh, 70vw); }
  .stage-pair { grid-template-columns: 1fr; }
  .stage-pair > div { aspect-ratio: 16 / 10; }
}

/* 6. curve + lerp ==================================================== */
html.lerp-on { background: var(--live-bg, var(--sage)); }
html.lerp-on body { background: transparent; transition: color .35s; }

.curve-wrap {
  position: fixed; right: 24px; bottom: 24px; width: 220px;
  display: none;
}
html.js.lerp-on .curve-wrap { display: block; }

@media (max-width: 767px) {
  .curve-wrap { display: none !important; }
}

.curve-wrap svg { overflow: visible; }

.curve-path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dashoffset: 0; }
.curve-dot { fill: currentColor; }
.curve-tick {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 400;
  opacity: .4; transition: opacity .35s;
}
.curve-tick.is-past { opacity: 1; }

/* 7. tail ==================================================== */
/* Yolculuktan sonraki sakin bölümler: menü, çekirdek rafı, iletişim.
   Her biri statik .bg-cup taşır — no-JS render ile lerp motorunun
   yolculuk sonrası kilitlendiği kavurma rengi (cup) böylece eşleşir. */

#menu, #cekirdekler, #iletisim { position: relative; }
#menu h2, #cekirdekler h2, #iletisim h2 { margin-top: 6px; }

/* -- menu -- */
.menu-groups {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 5vw, 56px);
  margin-top: clamp(32px, 5vw, 56px);
}
.menu-group-head { margin-bottom: 8px; color: var(--honey); }
.menu-list { display: flex; flex-direction: column; }
.menu-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--hairline-soft);
}
.menu-row:first-child { border-top: none; }
.menu-info { display: flex; flex-direction: column; gap: 3px; }
.menu-name { font-weight: 600; }
.menu-desc { font-size: .88rem; opacity: .72; }
.menu-price { font-family: var(--font-mono); font-size: .9rem; white-space: nowrap; flex: none; }

@media (max-width: 899px) {
  .menu-groups { grid-template-columns: 1fr; gap: 36px; }
}

/* -- çekirdekler: static cards, no links/dialogs/buttons -- */
.bean-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(32px, 5vw, 56px);
}
.bean-card {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--hairline-soft); padding: 16px;
}
.bean-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 4px; }
.bean-card h3 { font-size: 1.05rem; margin: 0; }
.bean-roast { font-size: .85rem; opacity: .72; margin: 0; }
.bean-notes { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-block: 4px; }
.bean-notes .micro { opacity: .8; }
.bean-price { font-family: var(--font-mono); font-size: .88rem; color: var(--honey); margin-top: auto; padding-top: 6px; }

@media (max-width: 899px) {
  .bean-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 559px) {
  .bean-grid { grid-template-columns: 1fr; }
}

/* -- iletişim: single calm image + quiet contact strip, no CTA/forms -- */
.contact-media {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  margin-top: clamp(28px, 5vw, 48px);
}
.contact-strip {
  display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(28px, 5vw, 48px);
  padding-top: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--hairline);
}
.contact-col { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.contact-icon { width: 22px; height: 22px; color: var(--honey); margin-bottom: 4px; }
.contact-col a { text-decoration: none; }
.contact-col a:hover, .contact-col a:focus-visible { text-decoration: underline; color: var(--honey); }
.contact-col p { margin: 0; opacity: .9; }
.contact-social { flex-direction: row; align-items: center; gap: 12px; }
.contact-social a { display: inline-flex; padding: 8px; border: 1px solid var(--hairline); color: var(--honey); }
.contact-social a:hover, .contact-social a:focus-visible { border-color: var(--honey); color: var(--cream); text-decoration: none; }
.contact-social svg { width: 18px; height: 18px; }

@media (max-width: 599px) {
  .bean-card { padding: 14px; }
}
