/* ==========================================================================
   Thai Princess — Redesign Concept
   Token system: deep teak-black base, temple-gold accent (used sparingly),
   one committed jewel tone (deep orchid-magenta silk), warm ivory text.
   Display face: Fraunces (high-contrast, characterful).
   Body/label face: Jost (quiet, geometric, generous tracking on labels).
   ========================================================================== */

:root {
  /* ---- Color tokens (Thai material palette) ---- */
  --teak-black: #17110d;       /* base background — dark teak wood, near-black */
  --teak-dark: #241a14;        /* panel/section background, one step up */
  --teak-line: #3a2b1f;        /* hairline borders on dark panels */
  --gold-leaf: #b3894a;        /* temple gilding gold — muted, not neon */
  --gold-leaf-bright: #d4ac6e; /* gold for hover/highlight states only */
  --orchid: #7a2148;           /* deep magenta/orchid silk — the jewel accent */
  --orchid-bright: #a13463;    /* orchid hover state */
  --ivory: #f3ead8;            /* warm off-white, primary text on dark */
  --ivory-dim: #cbbca4;        /* secondary text on dark */
  --ivory-faint: #8f8271;      /* tertiary / meta text */

  /* ---- Type ---- */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Jost", "Helvetica Neue", sans-serif;

  /* ---- Rhythm ---- */
  --container-max: 1240px;
  --section-pad: clamp(4rem, 9vw, 8rem);
  --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--teak-black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Visible keyboard focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-leaf-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 3rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-leaf);
}

/* ---------------------------------------------------------------------- */
/* Reveal-on-scroll (JS toggles .is-visible)                              */
/* ---------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-cinematic), transform 0.6s var(--ease-cinematic);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* ---------------------------------------------------------------------- */
/* Nav                                                                     */
/* ---------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: 1.25rem;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.4s var(--ease-cinematic),
              border-color 0.4s var(--ease-cinematic),
              padding 0.4s var(--ease-cinematic);
}
.site-nav.is-scrolled {
  background: rgba(23, 17, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--gold-leaf);
  padding-block: 0.85rem;
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ivory);
}
.nav-mark span { color: var(--gold-leaf); }
.crown-mark {
  width: 22px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold-leaf);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold-leaf);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-cinematic);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:hover { color: var(--ivory); }

.nav-cta {
  border: 1px solid var(--gold-leaf);
  color: var(--gold-leaf-bright);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1.15rem;
  border-radius: 2px;
  transition: background-color 0.3s var(--ease-cinematic), color 0.3s var(--ease-cinematic);
}
.nav-cta:hover { background: var(--gold-leaf); color: var(--teak-black); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  z-index: 110;
}
.nav-toggle span {
  height: 1px;
  background: var(--ivory);
  transition: transform 0.3s var(--ease-cinematic), opacity 0.3s var(--ease-cinematic);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--teak-black);
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-cinematic), visibility 0.4s;
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }
.nav-overlay ul {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  text-align: center;
}
.nav-overlay a {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-cinematic), transform 0.45s var(--ease-cinematic);
}
.nav-overlay.is-open a { opacity: 1; transform: translateY(0); }
.nav-overlay a:hover { color: var(--gold-leaf); }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(122, 33, 72, 0.28), transparent 60%),
    linear-gradient(180deg, #1c1410 0%, var(--teak-black) 55%, #100b08 100%);
  padding-top: 6rem;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.08);
  animation: hero-kenburns 16s var(--ease-cinematic) forwards;
  filter: saturate(0.85) brightness(0.85);
}
@keyframes hero-kenburns {
  from { transform: scale(1.08) translateY(0); }
  to { transform: scale(1.18) translateY(-1.5%); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(122, 33, 72, 0.32), transparent 60%),
    linear-gradient(180deg, rgba(23, 17, 13, 0.88) 0%, rgba(23, 17, 13, 0.78) 45%, rgba(16, 11, 8, 0.95) 100%);
}

.hero-motif {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.45;
}
.hero-motif path {
  fill: none;
  stroke: var(--gold-leaf);
  stroke-width: 1.1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* Draw-in animation: stroke-dasharray/offset set inline per path in HTML */
.hero-motif path {
  animation: draw-motif 3.2s var(--ease-cinematic) forwards;
}
@keyframes draw-motif {
  to { stroke-dashoffset: 0; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding-inline: 1.5rem;
}

.hero-eyebrow {
  opacity: 0;
  animation: rise-fade 0.8s var(--ease-cinematic) 1.6s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--ivory);
  margin-block: 0.5rem 1.1rem;
  opacity: 0;
  transform: translateY(24px);
  animation: rise-fade 0.9s var(--ease-cinematic) 1.8s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-leaf-bright);
}

.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--ivory-dim);
  max-width: 46ch;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: rise-fade 0.9s var(--ease-cinematic) 2.05s forwards;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.4rem;
  opacity: 0;
  transform: translateY(16px);
  animation: rise-fade 0.9s var(--ease-cinematic) 2.35s forwards;
}

@keyframes rise-fade {
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-cinematic), background-color 0.3s var(--ease-cinematic), color 0.3s var(--ease-cinematic), box-shadow 0.3s var(--ease-cinematic);
}
.btn-primary {
  background: var(--gold-leaf);
  color: var(--teak-black);
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-leaf-bright); transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(179, 137, 74, 0.55); }
.btn-secondary {
  border: 1px solid var(--ivory-faint);
  color: var(--ivory);
}
.btn-secondary:hover { border-color: var(--ivory); transform: translateY(-2px); }

.hero-scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: rise-fade 0.9s var(--ease-cinematic) 2.6s forwards;
}
.hero-scroll-cue span {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}
.hero-scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold-leaf), transparent);
}

/* ---------------------------------------------------------------------- */
/* Section shell                                                          */
/* ---------------------------------------------------------------------- */
section { padding-block: var(--section-pad); }
.section-head {
  max-width: 640px;
  margin-bottom: 3.5rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.08;
  margin-top: 0.6rem;
  color: var(--ivory);
}
.section-head p {
  margin-top: 1.1rem;
  color: var(--ivory-dim);
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ---------------------------------------------------------------------- */
/* Our Story                                                               */
/* ---------------------------------------------------------------------- */
.story {
  background: var(--teak-black);
  border-top: 1px solid var(--teak-line);
}
.story .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.story-copy p {
  color: var(--ivory-dim);
  font-size: 1.05rem;
  margin-bottom: 1.3rem;
}
.story-copy p:last-child { margin-bottom: 0; }
.story-copy p strong { color: var(--ivory); font-weight: 500; }

.story-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background:
    linear-gradient(155deg, #2a1f18 0%, #1c1410 60%, #150f0b 100%);
  border: 1px solid var(--teak-line);
}
.story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.06);
  transition: transform 1.1s var(--ease-cinematic);
}
.story-visual.is-visible img { transform: scale(1); }
.story-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(23,17,13,0.05) 40%, rgba(23,17,13,0.5) 100%);
  pointer-events: none;
}
.story-visual .frame-motif {
  position: absolute;
  inset: 1.1rem;
  border: 1px solid var(--gold-leaf);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* ---------------------------------------------------------------------- */
/* Signature Dishes — asymmetric editorial grid                           */
/* ---------------------------------------------------------------------- */
.dishes {
  background: var(--teak-dark);
  border-top: 1px solid var(--teak-line);
  border-bottom: 1px solid var(--teak-line);
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}
.dish-card {
  position: relative;
  background: var(--teak-black);
  border: 1px solid var(--teak-line);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
  overflow: hidden;
  transition: transform 0.45s var(--ease-cinematic), border-color 0.45s var(--ease-cinematic), box-shadow 0.45s var(--ease-cinematic);
}
.dish-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.9) brightness(0.92);
  transition: transform 1.4s var(--ease-cinematic), filter 0.6s var(--ease-cinematic);
}
.dish-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(190deg, rgba(23, 17, 13, 0.02) 30%, rgba(23, 17, 13, 0.82) 72%, rgba(23, 17, 13, 0.96) 100%);
  transition: background 0.45s var(--ease-cinematic);
}
.dish-copy {
  position: relative;
  z-index: 2;
  padding: 2rem 1.75rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.dish-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-leaf);
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.6);
}
.dish-card:hover .dish-photo {
  transform: scale(1.1);
  filter: saturate(1) brightness(0.98);
}

/* asymmetric spans */
.dish-card--a { grid-column: span 3; min-height: 420px; }
.dish-card--b { grid-column: span 3; }
.dish-card--c { grid-column: span 2; }
.dish-card--d { grid-column: span 2; min-height: 380px; }
.dish-card--e { grid-column: span 2; }
.dish-card--f { grid-column: span 6; min-height: 300px; }

.dish-tag {
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--orchid-bright);
  margin-bottom: 0.9rem;
}
.dish-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.6rem;
}
.dish-card p {
  color: var(--ivory-dim);
  font-size: 0.94rem;
  max-width: 34ch;
}
.spice {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.spice .chili {
  font-size: 0.9rem;
  filter: grayscale(1) brightness(0.55);
  opacity: 0.45;
}
.spice .chili.active { filter: none; opacity: 1; }
.spice-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-left: 0.4rem;
}

.dishes-cta {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
}

/* ---------------------------------------------------------------------- */
/* Visit                                                                   */
/* ---------------------------------------------------------------------- */
.visit {
  background: var(--teak-black);
}
.visit .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.visit-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1.5rem;
  margin-top: 2rem;
}
.visit-details dt {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-leaf);
  padding-top: 0.2rem;
}
.visit-details dd {
  margin: 0;
  color: var(--ivory);
  font-size: 1.02rem;
  line-height: 1.55;
}
.visit-details dd a { border-bottom: 1px solid var(--teak-line); transition: border-color 0.3s; }
.visit-details dd a:hover { border-color: var(--gold-leaf); }

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 320px;
}
.hours-row + .hours-row { margin-top: 0.35rem; }

.visit-ctas {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.map-frame {
  position: relative;
  border: 1px solid var(--teak-line);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  filter: sepia(25%) saturate(55%) brightness(0.62) contrast(1.12) hue-rotate(-8deg);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--orchid);
  mix-blend-mode: multiply;
  opacity: 0.28;
}
.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid var(--gold-leaf);
  opacity: 0.6;
  margin: 0.6rem;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--teak-dark);
  border-top: 1px solid var(--teak-line);
  padding-block: 3.5rem 2.5rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}
.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ivory);
}
.footer-mark span { color: var(--gold-leaf); }
.footer-mark .crown-mark {
  width: 20px;
  height: 16px;
}
.footer-col p, .footer-col a { color: var(--ivory-dim); font-size: 0.92rem; line-height: 1.7; }
.footer-col dt {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-bottom: 0.4rem;
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--teak-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--ivory-faint);
}
.footer-bottom a:hover { color: var(--gold-leaf); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width: 980px) {
  .story .container,
  .visit .container { grid-template-columns: 1fr; }
  .story-visual { order: -1; max-width: 480px; }
  .dish-grid { grid-template-columns: repeat(2, 1fr); }
  .dish-card--a, .dish-card--b, .dish-card--c,
  .dish-card--d, .dish-card--e, .dish-card--f { grid-column: span 2; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .dish-grid { grid-template-columns: 1fr; }
  .dish-card--a, .dish-card--b, .dish-card--c,
  .dish-card--d, .dish-card--e, .dish-card--f { grid-column: span 1; min-height: 260px; }
  .hours-row { max-width: 100%; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 2.5rem; }
  .btn { padding: 0.85rem 1.4rem; font-size: 0.72rem; }
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                          */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-motif path,
  .hero-eyebrow, .hero-title, .hero-sub, .hero-ctas, .hero-scroll-cue,
  .hero-photo img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dish-card:hover, .btn-primary:hover, .btn-secondary:hover,
  .dish-card:hover .dish-photo, .story-visual img {
    transform: none;
  }
}
