/* =========================================================
   Sun Palace Bistro — website concept
   Mobile-first. Colors and type live in :root tokens.
   Motifs: palace arches + the sun's path through the day.
   ========================================================= */

:root {
  --plaster: #f5efe6;
  --sand: #ebe0d0;
  --terracotta: #b4532d;
  --terracotta-deep: #97431f;      /* AA for small text on plaster */
  --terracotta-soft: #e7a682;      /* accent on dark */
  --sun: #d9893b;
  --espresso: #2a1a14;
  --ink: #2a201b;
  --muted: #6c5e55;
  --on-dark: rgba(245, 239, 230, 0.8);

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 22px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: 300; }
em { font-style: italic; }

:focus-visible { outline: 1px solid var(--terracotta); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--espresso); color: var(--plaster); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.sun {
  width: 20px; height: 20px;
  fill: var(--sun);
  stroke: var(--sun);
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* The palace arch */
.arch {
  position: relative;
  overflow: hidden;
  border-radius: 100vmax 100vmax 0 0;
  background: var(--sand);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* Shared type */
.kicker,
.time,
.hero-sub,
.concept-note,
.visit-pending,
.site-header a:not(.wordmark) {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.kicker { color: var(--terracotta-deep); margin-bottom: 20px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.02;
}
.section-title em, .intro-line em, .step-title em, .catering-title em { color: var(--terracotta); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding-inline: var(--gutter);
  background: rgba(245, 239, 230, 0);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-solid {
  background: rgba(245, 239, 230, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(42, 32, 27, 0.08);
}
.wordmark {
  grid-column: 2;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-left, .nav-right { display: none; }

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0; background: none; color: inherit; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::after {
  display: block; width: 24px; height: 1px; background: currentColor;
  transition: transform 0.4s var(--ease);
}
.nav-toggle-bars { position: relative; transform: translateY(-4px); }
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-8px) rotate(-90deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--plaster);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.site-header .mobile-nav a {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}
.site-header.is-open .mobile-nav { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 12px) var(--gutter) 64px;
  overflow: hidden;
}
.hero-arch {
  grid-area: 1 / 1;
  align-self: center;
  width: min(74vw, 340px);
  height: min(60svh, 500px);
  outline: 1px solid rgba(180, 83, 45, 0.45);
  outline-offset: 10px;
}
.hero-title {
  grid-area: 1 / 1;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(5rem, 24vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  pointer-events: none;
}
.hero-word-1 { align-self: start; justify-self: start; margin-top: 2vh; }
.hero-word-2 {
  align-self: end;
  justify-self: end;
  font-style: italic;
  color: var(--terracotta);
  margin-bottom: 1vh;
}
.badge {
  grid-area: 1 / 1;
  z-index: 3;
  align-self: center;
  justify-self: end;
  position: relative;
  width: 104px; height: 104px;
  margin-right: 2vw;
  transform: translateY(-34%);
  border-radius: 50%;
  background: var(--plaster);
  box-shadow: 0 10px 30px -12px rgba(42, 26, 20, 0.35);
}
.badge-ring { width: 100%; height: 100%; padding: 6%; }
.badge-ring text {
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: uppercase;
  fill: var(--ink);
}
.badge-sun {
  position: absolute;
  left: 50%; top: 50%;
  width: 30px; height: 30px;
  transform: translate(-50%, -50%);
  fill: var(--sun); stroke: var(--sun); stroke-width: 1.6; stroke-linecap: round;
}
.hero-sub { margin-top: 30px; color: var(--muted); text-align: center; }
.concept-note {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  font-size: 0.56rem;
  color: rgba(108, 94, 85, 0.75);
  text-align: center;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 18px 0;
  background: var(--terracotta);
  color: var(--plaster);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-style: italic;
  white-space: nowrap;
}
.marquee .sun { width: 18px; height: 18px; fill: var(--plaster); stroke: var(--plaster); flex: none; }

/* ---------- Intro ---------- */
.intro {
  padding: clamp(110px, 18vw, 220px) var(--gutter);
  text-align: center;
}
.intro-line em { display: block; }
.intro-line {
  max-width: 16ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.04;
}

/* ---------- The Bistro: a day ---------- */
.day { padding: 0 var(--gutter) clamp(90px, 12vw, 160px); }
.day-head { text-align: center; margin-bottom: 64px; }
.day-media { display: none; }
.step + .step { margin-top: 96px; }
.step-arch { width: 82%; aspect-ratio: 3 / 4; margin: 0 auto 36px; }
.time {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--terracotta-deep);
  margin-bottom: 14px;
}
.time::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.step-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05;
}
.step-body { margin-top: 18px; max-width: 32ch; color: var(--muted); }

/* ---------- The Room ---------- */
.room { padding: clamp(90px, 12vw, 160px) 0; background: var(--sand); }
.room-head { padding-inline: var(--gutter); margin-bottom: 48px; }
.room-strip {
  display: flex;
  gap: 16px;
  padding: 0 var(--gutter) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.room-strip::-webkit-scrollbar { display: none; }
.room-arch {
  flex: 0 0 68vw;
  aspect-ratio: 3 / 4.2;
  scroll-snap-align: center;
}

/* ---------- Catering (one quiet line) ---------- */
.catering {
  padding: clamp(80px, 10vw, 120px) var(--gutter);
  background: var(--espresso);
  color: var(--plaster);
  text-align: center;
}
.catering .sun { width: 24px; height: 24px; margin: 0 auto 22px; }
.catering-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; }
.catering-title em { color: var(--terracotta-soft); }
.catering p:last-child { margin-top: 12px; color: var(--on-dark); }

/* ---------- Visit ---------- */
.visit {
  display: grid;
  gap: 48px;
  justify-items: center;
  padding: clamp(100px, 14vw, 180px) var(--gutter);
  text-align: center;
}
.visit-arch { width: min(80vw, 380px); aspect-ratio: 3 / 4; }
.visit-pending { margin-top: 24px; color: var(--muted); font-size: 0.62rem; }
.ig-link {
  display: inline-block;
  margin-top: 30px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--terracotta);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-style: italic;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.ig-link:hover { color: var(--terracotta); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px var(--gutter) 56px;
  background: var(--espresso);
  color: rgba(245, 239, 230, 0.55);
  text-align: center;
  font-size: 0.76rem;
  border-top: 1px solid rgba(245, 239, 230, 0.08);
}
.site-footer .sun { width: 22px; height: 22px; margin: 0 auto 14px; }
.footer-mark {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--plaster);
}
.footer-credit { margin-top: 6px; font-size: 0.7rem; }
.footer-credit a { color: var(--on-dark); }

/* =========================================================
   Motion (only when JS runs and reduced motion is off)
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
/* negative insets keep the arch's offset outline visible */
@keyframes arch-in { from { clip-path: inset(100% -14px -14px -14px); } to { clip-path: inset(-14px -14px -14px -14px); } }
@keyframes settle { from { transform: scale(1.2); } to { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { transform: translateX(-50%); } }

.motion .hero-arch { animation: arch-in 1.6s var(--ease-out) 0.1s both; }
.motion .hero-arch img { animation: settle 3s var(--ease-out) 0.1s both; }
.motion .hero-word-1 { animation: rise 1.4s var(--ease-out) 0.6s both; }
.motion .hero-word-2 { animation: rise 1.4s var(--ease-out) 0.8s both; }
.motion .badge, .motion .hero-sub { animation: fade 1.2s var(--ease) 1.3s both; }
.motion .badge-ring { animation: spin 32s linear infinite; }
.motion .marquee-track { animation: slide 38s linear infinite; }

.motion .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.3s var(--ease-out), transform 1.3s var(--ease-out);
}
.motion .reveal-img { clip-path: inset(30% 0 0 0); transition: clip-path 1.6s var(--ease-out); }
.motion .reveal-img img { transform: scale(1.15); transition: transform 2.2s var(--ease-out); }
.motion .is-visible.reveal { opacity: 1; transform: none; }
.motion .is-visible.reveal-img { clip-path: inset(0 0 0 0); }
.motion .is-visible.reveal-img img { transform: none; }

/* =========================================================
   Tablet & up
   ========================================================= */
@media (min-width: 700px) {
  :root { --gutter: 40px; }
  .room-arch { flex-basis: 40vw; }
  .badge { width: 120px; height: 120px; margin-right: 8vw; }
}

/* =========================================================
   Desktop
   ========================================================= */
@media (min-width: 960px) {
  :root { --gutter: 56px; --header-h: 84px; }

  .nav-toggle, .mobile-nav { display: none; }
  .nav-left, .nav-right { display: flex; gap: 40px; }
  .nav-right { justify-self: end; }
  .site-header a:not(.wordmark) { position: relative; padding: 6px 0; text-decoration: none; }
  .site-header a:not(.wordmark)::after {
    content: ""; position: absolute; left: 0; right: 0.3em; bottom: 0; height: 1px;
    background: var(--terracotta); transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s var(--ease);
  }
  .site-header a:not(.wordmark):hover::after,
  .site-header a[aria-current="true"]::after { transform: scaleX(1); }
  .wordmark { font-size: 1.15rem; }

  /* Hero: Sun | arch | Palace */
  .hero { padding-bottom: 56px; }
  .hero-arch { width: clamp(300px, 28vw, 440px); height: min(70vh, 660px); }
  .hero-title {
    grid-template-columns: 1fr clamp(300px, 28vw, 440px) 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    font-size: clamp(6rem, 11.5vw, 12rem);
  }
  .hero-word-1 { grid-column: 1; justify-self: end; align-self: center; margin: 0 -0.14em -18vh 0; }
  .hero-word-2 { grid-column: 3; justify-self: start; align-self: center; margin: 18vh 0 0 -0.12em; }
  .badge { width: 140px; height: 140px; margin-right: calc(50% - clamp(300px, 28vw, 440px) / 2 - 70px); transform: translateY(-140%); }
  .concept-note { left: var(--gutter); right: auto; text-align: left; bottom: 30px; }

  .marquee-track { font-size: 1.9rem; gap: 44px; }

  /* Day: sticky arch + sun path on the left, steps scroll on the right */
  .day-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 6vw, 110px);
    max-width: 1280px;
    margin: 0 auto;
  }
  .day-media {
    position: sticky;
    top: calc(var(--header-h) + 4vh);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - var(--header-h) - 8vh);
    justify-content: center;
  }
  .sun-path { width: min(34vw, 460px); margin-bottom: 18px; overflow: visible; }
  .sun-arc { fill: none; stroke: rgba(180, 83, 45, 0.35); stroke-width: 1; stroke-dasharray: 3 5; }
  .sun-dot circle { fill: var(--sun); }
  .day-arch { width: min(30vw, 420px); height: min(62vh, 600px); }
  .day-arch img { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
  .day-arch img.is-active { opacity: 1; }

  .step-arch { display: none; }
  .step {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.28;
    transition: opacity 0.8s var(--ease);
  }
  .step + .step { margin-top: 0; }
  .step.is-active { opacity: 1; }

  /* Room: four arches, staggered */
  .room-head { max-width: 1280px; margin: 0 auto 64px; display: flex; justify-content: space-between; align-items: end; }
  .room-head .kicker { margin: 0; order: 2; }
  .room-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    overflow: visible;
  }
  .room-arch:nth-child(even) { margin-top: 90px; }

  /* Visit: arch left, text right */
  .visit {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: clamp(64px, 9vw, 140px);
    text-align: left;
  }
  .visit-arch { width: clamp(300px, 30vw, 420px); }
}

/* Mobile-only: lighter motion */
@media (max-width: 959px) {
  .room-strip .reveal-img { clip-path: none !important; }
}
