/* ═══════════════════════════════════════════════════════════
   RASA KENANGAN — Immersive Scroll Narrative
   Tokens → Reset → Loader → Masthead → Hero → Tracer →
   Story (sticky) → Menu (horizontal) → Reserve (split) →
   Footer → Reveal → Motion → Responsive
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --c-cream:     oklch(96% 0.012 85);
  --c-amber:     oklch(72% 0.105 62);
  --c-amber-hi:  oklch(78% 0.12  62);
  --c-charcoal:  oklch(22% 0.018 60);
  --c-charcoal-70: oklch(22% 0.018 60 / .7);
  --c-ink:       oklch(30% 0.012 60);
  --c-ink-muted: oklch(42% 0.01  60);
  --c-dark-soft: oklch(18% 0.012 60);

  --f-display: 'Fraunces', Georgia, serif;
  --f-body:    'Manrope', system-ui, sans-serif;
  --f-label:   'Space Grotesk', 'Manrope', sans-serif;

  --fs-hero: clamp(2.8rem, 6vw + 1rem, 5.5rem);
  --fs-h2:   clamp(2rem, 3vw + .5rem, 3.2rem);
  --fs-h3:   clamp(1.1rem, 1.2vw + .3rem, 1.35rem);
  --fs-body: clamp(.95rem, .3vw + .7rem, 1.1rem);
  --fs-small: .82rem;

  --sp-xs:  .5rem;
  --sp-sm:  .75rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2.5rem;
  --sp-2xl: 4rem;
  --sp-3xl: 6rem;
  --section-gap: clamp(4rem, 8vw, 8rem);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur: .65s;
  --dur-fast: .35s;

  --mw: 1200px;
  --radius: 8px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; font-weight: 600; }
::selection { background: oklch(72% 0.105 62 / .25); }

/* ── Skip Link ──────────────────────────────────────────── */
.skip-link {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-charcoal); color: var(--c-cream);
  font-weight: 600; transform: translateY(-100%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ── Primitives ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-amber);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.8rem;
  border-radius: 100px;
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .04em;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-solid {
  background: var(--c-amber);
  color: var(--c-charcoal);
}
.btn-solid:hover { background: var(--c-amber-hi); box-shadow: 0 4px 20px oklch(72% 0.105 62 / .3); }
.btn-ghost {
  border: 1.5px solid var(--c-cream);
  color: var(--c-cream);
  background: transparent;
}
.btn-ghost:hover { background: oklch(96% 0.012 85 / .12); }
.btn-accent {
  background: var(--c-amber);
  color: var(--c-charcoal);
}
.btn-accent:hover { background: var(--c-amber-hi); box-shadow: 0 4px 20px oklch(72% 0.105 62 / .3); }
.btn-block { width: 100%; }
.field-error {
  font-size: var(--fs-small);
  color: #c0392b;
  margin-top: var(--sp-xs);
}
.form-note {
  font-size: var(--fs-small);
  color: var(--c-ink-muted);
  margin-top: var(--sp-sm);
  text-align: center;
}

/* ── Loader ─────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-charcoal);
  transition: opacity .5s var(--ease);
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-brand {
  display: block;
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-amber);
  margin-bottom: var(--sp-lg);
}
.loader-bar {
  width: 140px; height: 3px;
  background: oklch(30% 0.012 60);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.loader-fill {
  height: 100%; width: 0;
  background: var(--c-amber);
  border-radius: 2px;
  animation: loader-fill 1.2s var(--ease) forwards;
}
@keyframes loader-fill {
  to { width: 100%; }
}

/* ── Masthead ───────────────────────────────────────────── */
.masthead {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-md) clamp(var(--sp-lg), 4vw, var(--sp-xl));
  transition: background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.masthead.scrolled {
  background: oklch(22% 0.018 60 / .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 oklch(96% 0.012 85 / .08);
}
.masthead-brand {
  display: flex; align-items: center; gap: var(--sp-sm);
}
.brand-mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-amber);
}
.brand-name {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--c-cream);
}
.masthead nav {
  display: flex; align-items: center; gap: var(--sp-lg);
}
.masthead nav a {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--c-cream);
  opacity: .8;
  transition: opacity var(--dur-fast) var(--ease);
}
.masthead nav a:hover { opacity: 1; }
.nav-cta {
  padding: .5rem 1.1rem;
  border: 1.5px solid oklch(72% 0.105 62 / .5);
  border-radius: 100px;
  opacity: 1 !important;
}
.nav-cta:hover {
  border-color: var(--c-amber);
  background: oklch(72% 0.105 62 / .12);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--c-charcoal);
}
.hero-bg {
  position: absolute; inset: 0;
  will-change: transform;
}
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(22% 0.018 60 / .55) 0%, oklch(22% 0.018 60 / .2) 40%, oklch(22% 0.018 60 / .6) 100%),
    linear-gradient(90deg, oklch(22% 0.018 60 / .4) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 780px;
  padding: clamp(var(--sp-2xl), 12vh, 8rem) var(--sp-xl) var(--sp-3xl);
  text-align: center;
}
.hero-eyebrow { margin-bottom: var(--sp-lg); display: block; }
.hero-title {
  font-size: var(--fs-hero);
  font-weight: 700;
  color: var(--c-cream);
  margin-bottom: var(--sp-lg);
  line-height: 1.05;
}
.hero-title .word {
  display: inline-block;
  margin-right: .25em;
}
.hero-title .word.accent { color: var(--c-amber); }
.hero-lede {
  font-size: clamp(1rem, .4vw + .8rem, 1.25rem);
  color: var(--c-cream);
  opacity: .85;
  max-width: 540px;
  margin: 0 auto var(--sp-xl);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: var(--sp-md); justify-content: center; flex-wrap: wrap; }

/* Steam */
.steam {
  position: absolute;
  bottom: 12%; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 160px;
  pointer-events: none; z-index: 1;
}
.steam-puff {
  position: absolute; bottom: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(96% 0.012 85 / .18) 0%, transparent 70%);
  filter: blur(18px);
  animation: steam-rise 4.5s ease-in-out infinite;
}
.steam-a { left: 10%; animation-delay: 0s; }
.steam-b { left: 42%; animation-delay: 1.5s; }
.steam-c { left: 72%; animation-delay: 3s; }
@keyframes steam-rise {
  0%   { opacity: 0; transform: translateY(0) scale(.6); }
  20%  { opacity: .7; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.4); }
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: clamp(var(--sp-lg), 3vh, var(--sp-xl));
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-xs);
  color: var(--c-cream);
  opacity: .6;
  font-family: var(--f-label);
  font-size: var(--fs-small);
  transition: opacity var(--dur-fast) var(--ease);
  z-index: 2;
}
.hero-scroll:hover { opacity: 1; }
.hero-scroll svg { animation: bounce 2s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── Tracer Marquee ─────────────────────────────────────── */
.tracer {
  background: var(--c-charcoal);
  padding: var(--sp-md) 0;
  overflow: hidden;
  border-top: 1px solid oklch(96% 0.012 85 / .06);
  border-bottom: 1px solid oklch(96% 0.012 85 / .06);
}
.tracer-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.tracer-track span {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  color: var(--c-cream);
  opacity: .6;
  white-space: nowrap;
  padding: 0 var(--sp-xs);
}
.tracer:hover .tracer-track { animation-play-state: paused; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Story — Sticky Scroll Narrative ────────────────────── */
.story {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--c-cream);
}
.story-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.story-img-wrap {
  width: 100%; height: 100%;
  will-change: transform;
}
.story-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.story-scroll {
  padding: var(--sp-3xl) clamp(var(--sp-xl), 5vw, var(--sp-3xl));
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--sp-xl);
}
.story-head h2 {
  font-size: var(--fs-h2);
  color: var(--c-charcoal);
  margin-top: var(--sp-sm);
}
.story-text p {
  color: var(--c-ink);
  max-width: 480px;
  margin-bottom: var(--sp-lg);
  line-height: 1.8;
}
.story-fig {
  margin-top: var(--sp-lg);
  padding-left: var(--sp-lg);
  border-left: 3px solid var(--c-amber);
}
.story-fig figcaption {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  color: var(--c-ink-muted);
}

/* ── Menu — Horizontal Scroll ───────────────────────────── */
.menu {
  padding: var(--section-gap) 0 var(--sp-2xl);
  background: var(--c-cream);
  overflow: hidden;
}
.menu-head {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 clamp(var(--sp-lg), 4vw, var(--sp-xl));
  margin-bottom: var(--sp-2xl);
}
.menu-head h2 {
  font-size: var(--fs-h2);
  color: var(--c-charcoal);
  margin-top: var(--sp-sm);
}
.menu-note {
  color: var(--c-ink-muted);
  margin-top: var(--sp-sm);
  max-width: 460px;
}
.menu-scroll {
  overflow: hidden;
  padding: 0 clamp(var(--sp-lg), 4vw, var(--sp-xl));
}
.menu-track {
  display: flex;
  gap: var(--sp-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--sp-md);
}
.menu-track::-webkit-scrollbar { display: none; }

/* Dish cards */
.dish {
  flex: 0 0 clamp(260px, 30vw, 340px);
  scroll-snap-align: start;
}
.dish-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-cream);
  box-shadow: 0 2px 16px oklch(22% 0.018 60 / .06);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px oklch(22% 0.018 60 / .12);
}
.dish-fig {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.dish-fig img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}
.dish-card:hover .dish-fig img { transform: scale(1.05); }
.dish-tag {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-sm);
  margin: var(--sp-md) var(--sp-md) 0;
  font-family: var(--f-label);
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-amber);
  background: oklch(72% 0.105 62 / .1);
  border-radius: 100px;
}
.dish-meta {
  padding: var(--sp-sm) var(--sp-md) var(--sp-lg);
}
.dish-meta h3 {
  font-family: var(--f-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--c-charcoal);
}
.dish-desc {
  font-size: var(--fs-small);
  color: var(--c-ink-muted);
  margin-top: var(--sp-xs);
}
.dish-price {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--c-amber);
  margin-top: var(--sp-sm);
}

/* Menu navigation */
.menu-nav {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}
.menu-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--c-charcoal);
  color: var(--c-charcoal);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.menu-btn:hover {
  background: var(--c-charcoal);
  color: var(--c-cream);
}
.menu-dots {
  display: flex; gap: var(--sp-xs);
}
.menu-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none; padding: 0;
  cursor: pointer;
  display: grid; place-items: center;
}
.menu-dot::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-charcoal);
  opacity: .2;
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.menu-dot.active::after {
  opacity: 1;
  transform: scale(1.3);
}

/* ── Reserve — Split Screen ─────────────────────────────── */
.reserve {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--c-charcoal);
  color: var(--c-cream);
}
.reserve-visual {
  position: relative;
  overflow: hidden;
}
.reserve-img {
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.reserve-content {
  padding: var(--sp-3xl) clamp(var(--sp-xl), 5vw, var(--sp-3xl));
  display: flex; flex-direction: column; justify-content: center;
}
.reserve-head h2 {
  font-size: var(--fs-h2);
  color: var(--c-cream);
  margin-top: var(--sp-sm);
}
.reserve-head p {
  color: oklch(96% 0.012 85 / .7);
  margin-top: var(--sp-sm);
  max-width: 440px;
  line-height: 1.7;
}

/* Form */
.reserve-form {
  margin-top: var(--sp-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}
.field {
  display: flex; flex-direction: column;
}
.field-wide { grid-column: 1 / -1; }
.reserve-form label {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  font-weight: 500;
  color: oklch(96% 0.012 85 / .6);
  margin-bottom: var(--sp-xs);
}
.reserve-form input,
.reserve-form select,
.reserve-form textarea {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid oklch(96% 0.012 85 / .12);
  background: oklch(96% 0.012 85 / .06);
  color: var(--c-cream);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.reserve-form input::placeholder,
.reserve-form textarea::placeholder {
  color: oklch(96% 0.012 85 / .3);
}
.reserve-form input:focus,
.reserve-form select:focus,
.reserve-form textarea:focus {
  outline: none;
  border-color: var(--c-amber);
  background: oklch(96% 0.012 85 / .08);
}
.reserve-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23d79a4a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.reserve-form select option {
  background: var(--c-charcoal);
  color: var(--c-cream);
}
.reserve-form textarea { resize: vertical; min-height: 80px; }
.turnstile-wrap {
  grid-column: 1 / -1;
  margin-top: var(--sp-sm);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--c-charcoal);
  color: var(--c-cream);
  padding: var(--sp-2xl) clamp(var(--sp-lg), 4vw, var(--sp-xl));
  border-top: 1px solid oklch(96% 0.012 85 / .06);
}
.footer-main {
  max-width: var(--mw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid oklch(96% 0.012 85 / .06);
}
.footer-brand {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--c-amber);
}
.footer-tagline {
  color: oklch(96% 0.012 85 / .5);
  margin-top: var(--sp-xs);
}
.footer-links {
  display: flex; flex-direction: column; gap: var(--sp-sm);
}
.footer-links a {
  font-family: var(--f-label);
  font-size: var(--fs-small);
  color: oklch(96% 0.012 85 / .6);
  transition: color var(--dur-fast) var(--ease);
}
.footer-links a:hover { color: var(--c-amber); }
.footer-addr {
  font-style: normal;
  font-size: var(--fs-small);
  color: oklch(96% 0.012 85 / .5);
  line-height: 1.7;
}
.footer-colophon {
  max-width: var(--mw);
  margin: 0 auto;
  padding-top: var(--sp-lg);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-small);
  color: oklch(96% 0.012 85 / .55);
}
.footer-symbols { font-size: .7rem; }

/* ── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger siblings */
.reveal.in ~ .reveal { transition-delay: 90ms; }
.reveal.in ~ .reveal ~ .reveal { transition-delay: 180ms; }
.reveal.in ~ .reveal ~ .reveal ~ .reveal { transition-delay: 270ms; }

/* Hero word stagger */
.hero-title .word.reveal {
  opacity: 0;
  transform: translateY(40px) rotateX(15deg);
  transform-origin: bottom center;
}
.hero-title .word.reveal.in {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}
.hero-title .word:nth-child(1).reveal.in { transition-delay: .15s; }
.hero-title .word:nth-child(2).reveal.in { transition-delay: .35s; }
.hero-title .word:nth-child(3).reveal.in { transition-delay: .55s; }

/* ── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .word.reveal { opacity: 1; transform: none; }
  .tracer-track { animation: none; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1020px) {
  .story { grid-template-columns: 1fr; }
  .story-sticky {
    position: relative;
    height: 50vh;
  }
  .story-scroll { padding: var(--sp-2xl) var(--sp-xl); }

  .reserve { grid-template-columns: 1fr; }
  .reserve-visual { height: 50vh; }
  .reserve-img { position: absolute; inset: 0; }

  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); }
  .menu-track { gap: var(--sp-md); }
  .dish { flex: 0 0 clamp(220px, 60vw, 280px); }
}

@media (max-width: 640px) {
  .masthead nav { gap: var(--sp-md); }
  .masthead nav a:not(.nav-cta) { display: none; }

  .hero-content { padding: var(--sp-2xl) var(--sp-md) var(--sp-3xl); }
  .hero-actions { flex-direction: column; align-items: center; }

  .reserve-form { grid-template-columns: 1fr; }

  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-colophon { justify-content: center; gap: var(--sp-sm); }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2rem; }
  .hero-lede { font-size: .9rem; }
  .dish { flex: 0 0 85vw; }
}
