/* ============ CREZ — award-grade restaurant case study ============ */

:root {
  --bg: #0f0d0a;
  --bg-2: #14110d;
  --ink: #ece4d4;
  --muted: #8f8674;
  --accent: #c8722e;
  --line: rgba(236, 228, 212, 0.14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: initial; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100%;
  pointer-events: none; z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-5%,-10%); }
  20% { transform: translate(-15%,5%); }
  30% { transform: translate(7%,-25%); }
  40% { transform: translate(-5%,25%); }
  50% { transform: translate(-15%,10%); }
  60% { transform: translate(15%,0%); }
  70% { transform: translate(0%,15%); }
  80% { transform: translate(3%,35%); }
  90% { transform: translate(-10%,10%); }
}

/* ---------- cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 3000; }
.cursor {
  width: 44px; height: 44px;
  border: 1px solid rgba(236,228,212,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease-out), height .35s var(--ease-out), background-color .35s, border-color .35s;
}
.cursor-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink);
}
.cursor.is-hover { width: 72px; height: 72px; border-color: rgba(236,228,212,0.9); }
.cursor.is-label { width: 92px; height: 92px; background: var(--accent); border-color: var(--accent); }
.cursor-label {
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bg); opacity: 0; font-weight: 600;
}
.cursor.is-label .cursor-label { opacity: 1; }
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* ---------- preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 4000; }
.pre-panel { position: absolute; inset: 0; background: #0a0806; }
.pre-panel--b { background: var(--accent); transform: translateY(101%); }
.pre-center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.pre-words { position: relative; height: clamp(3rem, 8vw, 6rem); overflow: hidden; text-align: center; }
.pre-words span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: clamp(3rem, 8vw, 6rem);
  color: var(--ink);
}
.pre-words .is-brand { color: var(--accent); letter-spacing: 0.06em; }
.pre-count {
  position: absolute; right: var(--pad); bottom: var(--pad); z-index: 2;
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1; color: rgba(236,228,212,0.25);
}

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--pad);
  mix-blend-mode: difference;
}
.head-logo { font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.05em; color: #fff; }
.head-logo sup { font-size: 0.6rem; margin-left: 2px; }
.head-meta {
  display: flex; gap: 1.5rem;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.head-right { display: flex; align-items: center; gap: 1.75rem; }
.head-reserve {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; padding-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}
.menu-btn {
  width: 44px; height: 30px;
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 7px;
}
.menu-btn-line { display: block; height: 1.5px; width: 100%; background: #fff; transform-origin: center; transition: transform .5s var(--ease-out); }
.menu-btn.is-open .menu-btn-line:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.menu-btn.is-open .menu-btn-line:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- overlay nav ---------- */
.overlay { position: fixed; inset: 0; z-index: 800; visibility: hidden; }
.overlay-bg { position: absolute; inset: 0; background: #0a0806; transform: translateY(-101%); }
.overlay-inner {
  position: relative; height: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr auto;
  padding: clamp(5rem, 12vh, 8rem) var(--pad) var(--pad);
  gap: 2rem;
}
.overlay-links { display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; }
.ov-link {
  display: flex; align-items: baseline; gap: 1.25rem;
  overflow: hidden; padding: 0.35rem 0;
  width: fit-content;
}
.ov-num { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; }
.ov-word {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  transition: color .4s, transform .6s var(--ease-out);
  will-change: transform;
}
.ov-link:hover .ov-word { color: var(--accent); transform: translateX(12px); }
.overlay-preview {
  position: relative; overflow: hidden; border-radius: 2px;
  align-self: center; justify-self: end;
  width: min(24vw, 380px); aspect-ratio: 3/4;
  display: none;
}
.overlay-preview-track img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transform: scale(1.15);
  transition: opacity .6s, transform 1.2s var(--ease-out);
}
.overlay-preview-track img.is-active { opacity: 1; transform: scale(1); }
.overlay-foot {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1.25rem;
}
@media (min-width: 900px) { .overlay-preview { display: block; } }

/* ---------- shared ---------- */
section { position: relative; }
.sec-label {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.sec-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  line-height: 1.02; font-weight: 400;
}
.sec-title em, .philo-big em, .cta-title em, .chef-quote em { color: var(--accent); }
.btn-line {
  display: inline-block; margin-top: 2rem;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding-bottom: 4px;
  position: relative;
}
.btn-line::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform-origin: right; transition: transform .5s var(--ease-out);
}
.btn-line:hover::after { transform: scaleX(0); transform-origin: left; }
.img-wrap { overflow: hidden; height: 100%; }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }

/* ---------- hero ---------- */
.hero {
  height: 100svh; min-height: 640px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(1.4rem + 60px) var(--pad) 2rem;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media-inner { position: absolute; inset: 0; will-change: transform; }
.hero-media-inner img { width: 100%; height: 115%; object-fit: cover; filter: brightness(0.5) saturate(0.9); }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,13,10,0.25) 0%, rgba(15,13,10,0.05) 40%, rgba(15,13,10,0.85) 100%); }
.hero-eyebrow {
  display: flex; gap: 1rem;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(236,228,212,0.8);
}
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(6rem, 24vw, 22rem);
  line-height: 0.85;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: auto; margin-bottom: auto;
}
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.hero-sub { font-size: clamp(0.95rem, 1.4vw, 1.15rem); color: rgba(236,228,212,0.85); max-width: 34ch; }
.hero-scroll {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  cursor: pointer;
}
.hero-scroll em { display: block; width: 1px; height: 52px; background: linear-gradient(var(--ink), transparent); }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  background: var(--bg-2);
}
.marquee-track { display: inline-flex; will-change: transform; }
.marquee-track span {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  color: var(--ink);
}
.marquee-track i { color: var(--accent); font-style: normal; margin: 0 0.75rem; }

/* ---------- philosophy ---------- */
.philo { padding: clamp(6rem, 14vh, 11rem) var(--pad); }
.philo-big {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.8rem, 7.5vw, 7rem);
  line-height: 1.04;
  max-width: 14ch;
}
.philo-body { max-width: 44ch; margin: 3.5rem 0 0 auto; color: rgba(236,228,212,0.85); }
.philo-body p + p { margin-top: 1.25rem; }
.philo-imgs {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem;
  margin-top: clamp(4rem, 10vh, 7rem);
}
.philo-img { position: relative; }
.philo-img--a { grid-column: 2 / 7; aspect-ratio: 4/5; }
.philo-img--b { grid-column: 8 / 12; aspect-ratio: 3/4; margin-top: 18vh; }
.philo-img figcaption {
  margin-top: 0.75rem;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.philo-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: clamp(5rem, 12vh, 8rem);
  border-top: 1px solid var(--line); padding-top: 3rem;
}
.stat-num { font-family: var(--serif); font-size: clamp(3rem, 7vw, 6rem); line-height: 1; display: block; }
.stat-cap { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* ---------- menu ---------- */
.menu { padding: clamp(6rem, 14vh, 10rem) var(--pad); background: var(--bg-2); }
.menu-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 4rem; }
.menu-list { border-top: 1px solid var(--line); }
.menu-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center; gap: 2rem;
  padding: 2.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: padding .45s var(--ease-out);
}
.menu-row:hover { padding-left: 1.5rem; }
.menu-idx { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; }
.menu-name h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.1;
  transition: color .35s;
}
.menu-row:hover .menu-name h3 { color: var(--accent); }
.menu-name p { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.menu-price { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.menu-float {
  position: fixed; top: 0; left: 0; z-index: 500;
  width: 300px; height: 380px;
  pointer-events: none;
  overflow: hidden; border-radius: 2px;
  opacity: 0; transform: scale(0.9);
  will-change: transform;
}
.menu-float img { width: 100%; height: 100%; object-fit: cover; }
.menu-note { margin-top: 2.5rem; font-size: 0.85rem; color: var(--muted); }

/* ---------- horizontal space ---------- */
.space { background: var(--bg); }
.space-pin {
  height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 0 0 var(--pad);
}
.space-head { margin-bottom: 3rem; padding-right: var(--pad); }
.space-track { display: flex; gap: clamp(1.5rem, 3vw, 3rem); width: max-content; will-change: transform; }
.space-card { flex: 0 0 auto; width: clamp(300px, 38vw, 560px); }
.space-card .img-wrap { aspect-ratio: 4/3; }
.space-card img { transform: scale(1.15); }
.space-card figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 0.9rem;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.space-card figcaption span:last-child { color: var(--muted); }
.space-progress {
  margin: 3rem var(--pad) 0 0; height: 1px; background: var(--line); position: relative;
}
.space-progress span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); display: block; }

/* ---------- chef ---------- */
.chef {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem;
  padding: clamp(6rem, 14vh, 11rem) var(--pad);
  align-items: center;
}
.chef-media { grid-column: 1 / 6; aspect-ratio: 3/4; }
.chef-copy { grid-column: 7 / 13; }
.chef-quote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.1;
}
.chef-name { margin-top: 2rem; max-width: 44ch; color: rgba(236,228,212,0.8); }

/* ---------- cta ---------- */
.cta {
  position: relative; overflow: hidden;
  padding: clamp(8rem, 20vh, 14rem) var(--pad);
  text-align: center;
}
.cta-media { position: absolute; inset: 0; z-index: 0; }
.cta-media img { width: 100%; height: 120%; object-fit: cover; filter: brightness(0.32) saturate(0.85); will-change: transform; }
.cta-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.cta-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 9rem);
  line-height: 0.98;
}
.cta-inner > p { max-width: 40ch; color: rgba(236,228,212,0.85); }
.cta-btn {
  margin-top: 2rem;
  display: inline-flex; align-items: center; gap: 1rem;
  border: 1px solid rgba(236,228,212,0.5); border-radius: 999px;
  padding: 1.2rem 2.6rem;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color .45s var(--ease-out), border-color .45s;
}
.cta-btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(101%); border-radius: 999px;
  transition: transform .5s var(--ease-out);
  z-index: -1;
}
.cta-btn:hover { color: var(--bg); border-color: var(--accent); }
.cta-btn:hover::before { transform: translateY(0); }
.cta-btn em { font-style: normal; transition: transform .45s var(--ease-out); }
.cta-btn:hover em { transform: translateX(6px); }

/* ---------- footer ---------- */
.foot { padding: clamp(4rem, 10vh, 7rem) var(--pad) 1.5rem; background: #0a0806; overflow: hidden; }
.foot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  padding-bottom: 4rem; border-bottom: 1px solid var(--line);
}
.foot-h { display: block; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.foot-col p { font-size: 0.95rem; line-height: 1.8; }
.foot-col a { border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; }
.foot-col a:hover { color: var(--accent); border-color: var(--accent); }
.foot-word { line-height: 0.8; text-align: center; margin: 3rem 0 1rem; }
.foot-word span {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(8rem, 28vw, 26rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236,228,212,0.22);
  will-change: transform;
}
.foot-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding-top: 1.5rem;
  font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted);
}

/* ---------- reveal helpers (initial states set in JS) ---------- */
.js-clip { clip-path: inset(0 0 0 0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .head-meta { display: none; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-scroll { display: none; }
  .philo-img--a { grid-column: 1 / 8; }
  .philo-img--b { grid-column: 6 / 13; margin-top: -8vh; }
  .philo-stats { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .menu-row { grid-template-columns: 2rem 1fr; }
  .menu-price { display: none; }
  .menu-float { display: none; }
  .chef-media { grid-column: 1 / 13; max-width: 480px; }
  .chef-copy { grid-column: 1 / 13; margin-top: 3rem; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .overlay-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}
