/* ============================================================
   The Gray Coffee & Croissant — Yozgat
   Production port of the "Küp Kruvasan" scroll-animation design.
   ============================================================ */

:root {
  --fhead: 'Playfair Display', Georgia, serif;
  --fbody: 'Montserrat', system-ui, sans-serif;
  --dark: #621424;
  --acc: #c99a4c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #180609;
  color: #f0e2cb;
  -webkit-font-smoothing: antialiased;
  font-family: var(--fbody);
}

a { color: var(--acc); }
em { font-style: italic; }

section[id], footer[id] { scroll-margin-top: 84px; }

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(16px, 4vw, 46px);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background .5s ease, box-shadow .5s ease, border-color .5s ease;
}
#nav.solid {
  background: var(--dark);
  box-shadow: 0 12px 34px rgba(0,0,0,0.4);
  border-bottom-color: rgba(240,226,203,0.12);
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
#nav-logo-img {
  height: 68px; width: auto; display: block;
  transition: height .45s cubic-bezier(.22,.61,.36,1);
}
#nav.solid #nav-logo-img { height: 38px; }
.nav-links { display: flex; gap: clamp(14px, 2.2vw, 32px); align-items: center; }
.nlink {
  font-family: var(--fbody);
  font-size: 13px; letter-spacing: 0.06em;
  color: #e6d4b2; text-decoration: none;
  transition: color .25s;
}
.nlink:hover { color: #fff; }
.nav-cta {
  font-family: var(--fbody);
  font-size: 12px; letter-spacing: 0.14em;
  color: #2a1710; background: #f3e6cf;
  padding: 11px 22px; border-radius: 999px; text-decoration: none;
}

/* ── Hero (scroll sequence) ─────────────────────────────────── */
/* Hero is now a single viewport tall — the frame sequence is time-driven
   (triggered on the first scroll), not scroll-scrubbed over a long section. */
.hero-wrap { position: relative; height: 100vh; background: #160b05; }
.hero-sticky {
  position: relative; top: 0;
  height: 100vh; overflow: hidden; background: #160b05;
}
#seq-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; display: block; background: #160b05;
}
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(20,11,5,0.66) 0%, rgba(20,11,5,0.12) 26%,
    rgba(20,11,5,0) 46%, rgba(20,11,5,0) 62%, rgba(20,11,5,0.62) 100%);
}
.hero-title {
  position: absolute; left: 0; right: 0; top: 45%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; pointer-events: none; padding: 0 20px;
}
.hero-eyebrow {
  font-family: var(--fbody); font-weight: 600;
  font-size: 16px; letter-spacing: 0.46em; color: #f6ecd7;
}
.hero-h1 {
  margin: 0;
  font-family: var(--fhead); font-weight: 600;
  font-size: clamp(52px, 12vw, 100px); line-height: 0.92; color: #f6ecd7;
  text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.hero-sub {
  font-family: var(--fhead); font-style: italic; font-weight: 500;
  font-size: clamp(17px, 2.6vw, 28px); color: #f0e2c6;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}
.hero-hint {
  position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%);
}
.hero-hint a {
  width: 98px; height: 98px; border-radius: 999px;
  background: var(--acc); color: #4a0f1a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none;
  font-family: var(--fbody); font-size: 12px; letter-spacing: 0.14em;
  box-shadow: 0 14px 38px rgba(0,0,0,0.45);
}
.hint-arrow { font-size: 15px; line-height: 1; animation: greyHint 1.8s ease-in-out infinite; }
@keyframes greyHint { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ── Stacked panels ─────────────────────────────────────────── */
.panels {
  position: relative;
  background: linear-gradient(180deg, #2a0c12 0%, #180609 100%);
  background-attachment: fixed;
  padding: clamp(12px, 1.6vw, 22px);
  display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 22px);
}
.panel { border-radius: 34px; overflow: hidden; }
.panel-dark { background: var(--dark); padding: clamp(34px, 5vw, 78px); }
.panel-cream { background: #f4e2dd; }

/* ── Story / kategoriler ────────────────────────────────────── */
.story-intro {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 44px); max-width: 760px; margin: 0 auto 8px;
}
.story-intro p {
  font-family: var(--fbody); font-weight: 300;
  font-size: 14px; line-height: 1.85; color: #cbb591; margin: 0; text-align: center;
}
.story-head {
  font-family: var(--fhead); font-weight: 600;
  font-size: clamp(40px, 7vw, 96px); line-height: 1.0; text-align: center;
  margin: clamp(24px, 4vh, 52px) 0; color: #f2e6cf;
}

.catgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}
.cat {
  position: relative; aspect-ratio: 3/4;
  border-radius: 16px; overflow: hidden; cursor: default; background: #1a060a;
}
.cat .catcov {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.19,.9,.22,1);
}
.cat:hover .catcov { transform: scale(1.07); }
.cat .catov2 {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 9px; padding: clamp(16px, 2vw, 26px);
  background: linear-gradient(180deg, rgba(24,5,8,0.12) 0%, rgba(24,5,8,0.34) 44%, rgba(24,5,8,0.86) 100%);
  pointer-events: none; transition: background .4s ease;
}
.cat:hover .catov2 {
  background: linear-gradient(180deg, rgba(24,5,8,0.30) 0%, rgba(24,5,8,0.56) 44%, rgba(24,5,8,0.93) 100%);
}
.cat .catname {
  font-family: var(--fhead); font-weight: 600;
  font-size: clamp(18px, 1.7vw, 27px); line-height: 1.08; color: #f6ecd7; text-align: center;
}
.cat .catcta {
  pointer-events: auto; appearance: none;
  font-family: var(--fbody); font-size: 11px; letter-spacing: 0.22em; color: #fbeed0;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(240,207,143,0.5); background: rgba(24,5,8,0.55);
  border-radius: 999px; padding: 10px 20px; cursor: pointer;
  transition: background .3s ease, border-color .3s ease, transform .3s ease, color .3s ease;
}
.cat .catcta:hover { background: var(--acc); border-color: var(--acc); transform: translateY(-1px); color: #fff; }
.cat .catcnt {
  position: absolute; top: 12px; left: 12px; pointer-events: none;
  font-family: var(--fbody); font-size: 10.5px; letter-spacing: .12em; color: #f6ecd7;
  background: rgba(24,5,8,0.5); border: 1px solid rgba(246,236,215,0.28);
  padding: 5px 10px; border-radius: 999px;
}

/* ── Category overlays ──────────────────────────────────────── */
.catovl {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(16,4,7,0.95);
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s;
  overflow-y: auto; overscroll-behavior: contain;
}
.catovl.open { opacity: 1; visibility: visible; }
.catovl-inner {
  min-height: 100%; box-sizing: border-box;
  padding: clamp(78px, 11vh, 120px) clamp(18px, 4vw, 60px) clamp(40px, 6vh, 72px);
  display: flex; flex-direction: column; gap: clamp(26px, 4vh, 46px);
}
.catovl-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.catovl-eyebrow { font-family: var(--fbody); font-size: 12px; letter-spacing: 0.42em; color: #c9a06a; }
.catovl-title { font-family: var(--fhead); font-weight: 600; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; margin: 0; color: #f6ecd7; }
.catovl-desc { font-family: var(--fbody); font-weight: 300; font-size: 14px; line-height: 1.8; color: #cbb591; margin: 0; max-width: 52ch; }
.catovl-close {
  position: fixed; top: clamp(16px, 3vw, 30px); right: clamp(16px, 3vw, 30px); z-index: 2;
  width: 54px; height: 54px; border-radius: 999px;
  border: 1px solid rgba(246,236,215,0.32); background: rgba(24,5,8,0.6);
  color: #f6ecd7; font-size: 19px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s ease, transform .45s cubic-bezier(.19,.9,.22,1), border-color .3s ease;
}
.catovl-close:hover { background: var(--acc); border-color: var(--acc); transform: rotate(90deg); }

.prodgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 20vw, 210px), 1fr));
  gap: clamp(14px, 2vw, 26px); width: 100%; max-width: 1180px; margin: 0 auto;
}
.prodcard {
  aspect-ratio: 3/4; position: relative; border-radius: 14px; overflow: hidden;
  opacity: 0; transform: translateY(48px) scale(.8) rotate(0deg);
  transition: opacity .55s cubic-bezier(.19,.9,.22,1), transform .7s cubic-bezier(.19,.9,.22,1);
}
.catovl.open .prodcard { opacity: 1; transform: rotate(var(--rot, 0deg)); }
.prodcard:hover { transform: rotate(0deg) scale(1.05) !important; z-index: 5; }
.prodgrid .prodcard:nth-child(5n+1) { --rot: -6deg; }
.prodgrid .prodcard:nth-child(5n+2) { --rot: 5deg; }
.prodgrid .prodcard:nth-child(5n+3) { --rot: -3deg; }
.prodgrid .prodcard:nth-child(5n+4) { --rot: 7deg; }
.prodgrid .prodcard:nth-child(5n+5) { --rot: -4deg; }
.prodcard:nth-child(1) { transition-delay: .03s; } .prodcard:nth-child(2) { transition-delay: .10s; }
.prodcard:nth-child(3) { transition-delay: .17s; } .prodcard:nth-child(4) { transition-delay: .24s; }
.prodcard:nth-child(5) { transition-delay: .31s; } .prodcard:nth-child(6) { transition-delay: .38s; }
.prodcard:nth-child(7) { transition-delay: .45s; } .prodcard:nth-child(8) { transition-delay: .52s; }
.prodcard:nth-child(9) { transition-delay: .59s; } .prodcard:nth-child(10) { transition-delay: .66s; }
.prodcard:nth-child(11) { transition-delay: .73s; } .prodcard:nth-child(12) { transition-delay: .80s; }

/* image card with hover caption */
.gcard img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gcard-ov {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: clamp(12px, 1.5vw, 20px);
  background: linear-gradient(180deg, rgba(26,6,10,0.28) 0%, rgba(26,6,10,0.34) 42%, rgba(26,6,10,0.86) 100%);
  opacity: 0; transition: opacity .45s ease; pointer-events: none;
}
.gcard:hover .gcard-ov { opacity: 1; }
.gcard-ov .gt {
  font-family: var(--fhead); font-weight: 600; font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.15; color: #f6ecd7; transform: translateY(10px);
  transition: transform .45s cubic-bezier(.16,.72,.24,1);
}
.gcard-ov .gd {
  font-family: var(--fbody); font-weight: 300; font-size: 12px; line-height: 1.5; color: #e6d4b2;
  transform: translateY(12px); opacity: 0;
  transition: transform .5s cubic-bezier(.16,.72,.24,1) .05s, opacity .5s ease .05s;
}
.gcard:hover .gcard-ov .gt { transform: none; }
.gcard:hover .gcard-ov .gd { transform: none; opacity: 1; }

/* ── Empty image slots (branded placeholders) ───────────────── */
.slot-empty {
  display: block; width: 100%; height: 100%; position: absolute; inset: 0;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(201,154,76,0.14), transparent 60%),
    linear-gradient(150deg, #3a0e19 0%, #22080e 60%, #1a060a 100%);
}
.slot-empty::before {
  content: "◆"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: rgba(201,154,76,0.5); font-size: 22px;
}
.slot-empty::after {
  content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 16%;
  text-align: center; font-family: var(--fbody); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(240,226,203,0.42);
}
.slot-empty--cream {
  background:
    radial-gradient(130% 130% at 30% 20%, rgba(201,154,76,0.35), transparent 55%),
    linear-gradient(150deg, #7a1a2c 0%, #5a1220 55%, #4a0f1a 100%);
}
.slot-empty--cream::before { color: rgba(246,236,215,0.6); }
.slot-empty--cream::after {
  content: attr(data-label); bottom: 50%; transform: translateY(50%);
  font-family: var(--fhead); font-size: clamp(15px, 1.6vw, 22px); letter-spacing: 0.04em;
  text-transform: none; color: rgba(246,236,215,0.9);
}
.slot-empty--cream::before { content: none; }

/* ── Mekân ──────────────────────────────────────────────────── */
#urun { padding: clamp(30px, 4.5vw, 68px); }
.mekan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 4vw, 60px); align-items: center;
}
.mekan-copy { display: flex; flex-direction: column; gap: 20px; }
.mekan-eyebrow { font-family: var(--fbody); font-size: 12px; letter-spacing: 0.42em; color: #c9a06a; }
.mekan-head {
  font-family: var(--fhead); font-weight: 600; font-size: clamp(34px, 5vw, 64px);
  line-height: 1.03; margin: 0; color: #f4e8d2;
}
.mekan-body {
  font-family: var(--fbody); font-weight: 300; font-size: 15px; line-height: 1.9;
  color: #cbb591; margin: 0; max-width: 46ch;
}
.mekan-meta {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--fbody); font-size: 13px; line-height: 1.8; color: #9a7f57;
  border-top: 1px solid rgba(240,226,203,0.14); padding-top: 18px;
}

.photo-pile { position: relative; width: 100%; min-height: clamp(380px, 52vw, 600px); }
.pcard {
  position: absolute; left: 50%; top: 50%;
  transform: translate(calc(-50% + var(--sx,0px)), calc(-50% + var(--sy,0px))) rotate(var(--rot,0deg));
  transition: transform 1s cubic-bezier(.19,.9,.22,1), box-shadow .45s ease, opacity .9s ease;
  border-radius: 10px; overflow: hidden; opacity: 1;
  box-shadow: 0 20px 46px rgba(0,0,0,.5);
  border: 6px solid #f6eee0; background: #f6eee0; cursor: pointer;
}
.pcard.pile-init { transform: translate(-50%, -50%) rotate(0deg) scale(.7); opacity: 0; }
.pcard:hover {
  transform: translate(calc(-50% + var(--sx,0px)), calc(-50% + var(--sy,0px))) rotate(0deg) scale(1.14) !important;
  z-index: 60; box-shadow: 0 34px 80px rgba(0,0,0,.62);
}
.pcard > * { display: block; width: 100%; height: 100%; }
.pcard img { object-fit: cover; }
.pcard video { object-fit: cover; background: #1a060a; }

/* ── CTA ────────────────────────────────────────────────────── */
.panel-cream { padding: clamp(28px, 4vw, 54px) clamp(24px, 4vw, 60px) clamp(40px, 6vh, 72px); }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.cta-pill {
  width: 500px; max-width: 100%; height: 188px; position: relative;
  border-radius: 999px; overflow: hidden;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 44px rgba(90,18,32,0.28);
}
.cta-logo { width: auto; height: auto; max-width: 58%; max-height: 56%; object-fit: contain; display: block; }
.cta-head {
  font-family: var(--fhead); font-weight: 600; font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.08; margin: 0; color: #5a1220;
}
.cta-btn {
  font-family: var(--fbody); font-size: 13px; letter-spacing: 0.14em;
  color: #f3e6cf; background: #621424; padding: 17px 38px; border-radius: 999px;
  text-decoration: none; transition: background .25s ease;
}
.cta-btn:hover { background: #7a1a2c; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 60px); }
.footer-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(24px, 4vw, 48px); align-items: start;
}
.footer-logo { width: 180px; max-width: 62%; height: auto; display: block; }
.footer-addr {
  font-family: var(--fbody); font-weight: 300; font-size: 14px; line-height: 1.9;
  color: #c8b48f; text-decoration: none; transition: color .25s ease;
}
.footer-addr:hover { color: var(--acc); }
.footer-hours { font-family: var(--fbody); font-weight: 300; font-size: 14px; line-height: 1.9; color: #c8b48f; }
.footer-social { display: flex; flex-direction: column; gap: 8px; font-family: var(--fbody); font-size: 14px; line-height: 1.7; }
.footer-social a { text-decoration: none; transition: color .25s ease; }
.fs-ig { color: var(--acc); }
.fs-ig:hover { color: #e0764f; }
.fs-web { color: #f3e6cf; }
.fs-web:hover { color: var(--acc); }
.fs-tel { color: #8a6a44; }
.footer-bottom {
  max-width: 1080px; margin: clamp(32px, 5vh, 52px) auto 0;
  padding-top: 22px; border-top: 1px solid rgba(240,226,203,0.14);
  font-family: var(--fbody); font-size: 11px; letter-spacing: 0.2em; color: #8a6a44;
}
.footer-bottom .reg { letter-spacing: 2.2px; }

/* ── Reveal-on-scroll base states ───────────────────────────── */
[data-reveal] { opacity: 0; will-change: opacity, transform; }
[data-reveal="up"]    { transform: translateY(36px); }
[data-reveal="left"]  { transform: translateX(46px); }
[data-reveal="right"] { transform: translateX(-46px); }
[data-reveal="scale"] { transform: scale(0.9); }
[data-reveal="panel"] { transform: translateY(48px) scale(0.985); }
[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .pcard.pile-init { opacity: 1; transform: translate(calc(-50% + var(--sx,0px)), calc(-50% + var(--sy,0px))) rotate(var(--rot,0deg)); }
  .hint-arrow { animation: none; }
}

/* ── Hamburger + mobile menu (hidden on desktop) ────────────── */
.nav-toggle { display: none; }
.mobile-menu { display: none; }
.nav-toggle span {
  display: block; width: 26px; height: 2px; margin: 0 auto;
  background: #f3e6cf; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
#nav.solid .nav-toggle span { background: #f3e6cf; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile layout (≤ 760px) ────────────────────────────────── */
@media (max-width: 760px) {
  /* nav → hamburger */
  .nav-links, .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
  }
  #nav-logo-img { height: 50px; }
  .menu-open #nav { background: var(--dark); box-shadow: none; border-bottom-color: transparent; }

  .mobile-menu {
    position: fixed; inset: 0; z-index: 55;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 84px 32px 44px; background: var(--dark);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .4s ease, visibility .4s, transform .4s ease;
  }
  .menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
  body.menu-open { overflow: hidden; }
  .mm-link {
    font-family: var(--fhead); font-weight: 600; font-size: 30px; line-height: 1.4;
    color: #f6ecd7; text-decoration: none; padding: 8px 12px;
  }
  .mm-cta {
    margin-top: 22px; font-family: var(--fbody); font-size: 13px; letter-spacing: 0.14em;
    color: #2a1710; background: #f3e6cf; padding: 15px 40px; border-radius: 999px; text-decoration: none;
  }

  /* hero sizing so nothing overflows */
  .hero-eyebrow { font-size: 11px; letter-spacing: 0.24em; }
  .hero-h1 { font-size: clamp(34px, 10vw, 56px); }
  .hero-sub { font-size: 15px; }

  /* avoid mobile fixed-background jank */
  .panels { background-attachment: scroll; }

  /* category tiles: 2 per row */
  .catgrid { grid-template-columns: repeat(2, 1fr); }

  /* photo pile: from absolute scatter to a clean 2-col grid */
  .photo-pile { min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard {
    position: static !important; left: auto !important; top: auto !important;
    width: 100% !important; aspect-ratio: 1 / 1 !important; transform: none !important;
    transition: box-shadow .35s ease;
  }
  .pcard.pile-init { opacity: 1 !important; transform: none !important; }
  .pcard:hover { transform: none !important; z-index: auto; }
}

@media (max-width: 380px) {
  .hero-h1 { font-size: 34px; }
  .mm-link { font-size: 26px; }
}
