/* ============================================================
   TERRA — Mediterranean coastal restaurant
   ============================================================ */

:root {
  --cream: #f7f1e3;
  --cream-soft: #fbf7ec;
  --terracotta: #b65133;
  --terracotta-deep: #9c4128;
  --olive: #5d6b3f;
  --olive-deep: #4a5632;
  --sand: #e4d5b8;
  --sea: #2c4a52;
  --ink: #33301f;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Karla", "Helvetica Neue", sans-serif;

  --radius-arch: 50% 50% 0 0;
  --shadow-soft: 0 18px 50px -18px rgba(51, 48, 31, 0.35);
  --shadow-card: 0 10px 30px -14px rgba(51, 48, 31, 0.25);
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --section-gap: clamp(4.5rem, 10vw, 9rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 540; line-height: 1.04; }
p { margin: 0 0 1em; }
a { color: inherit; }

::selection { background: var(--terracotta); color: var(--cream); }

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

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}
.eyebrow--light { color: var(--sand); }

.display {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  letter-spacing: -0.01em;
}
.display em {
  font-style: italic;
  font-weight: 480;
  color: var(--terracotta);
}
.display--light { color: var(--cream); }
.display--light em { color: var(--sand); }

em.pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08em;
  color: var(--terracotta);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn--pill {
  background: var(--terracotta);
  color: var(--cream);
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(182, 81, 51, 0.7);
}
.btn--pill:hover {
  background: var(--terracotta-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(182, 81, 51, 0.75);
}
.btn--lg { padding: 1rem 2.3rem; font-size: 1.02rem; }
.btn--ghost {
  padding: 0.8rem 0.2rem;
  border-bottom: 2px solid var(--olive);
  color: var(--olive-deep);
}
.btn--ghost:hover { color: var(--terracotta); border-color: var(--terracotta); }
.btn--light { color: var(--cream); border-color: var(--sand); }
.btn--light:hover { color: var(--sand); border-color: var(--cream); }

/* ---------- Stamps ---------- */
.stamp {
  position: absolute;
  display: inline-block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--olive);
  border-radius: 6px;
  color: var(--olive-deep);
  background: var(--cream-soft);
  transform: rotate(-4deg);
  box-shadow: var(--shadow-card);
  z-index: 3;
}
.stamp--hero { right: -0.6rem; bottom: 14%; transform: rotate(5deg); border-color: var(--terracotta); color: var(--terracotta-deep); }
.stamp--story { left: 8%; bottom: -1.2rem; }
.stamp--visit { position: static; display: inline-block; margin-top: 2rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem var(--pad-x);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--olive) 18%, transparent);
}
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--terracotta);
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 2px;
  background: var(--terracotta);
  transition: right 0.3s ease;
}
.nav__links a:hover::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad-x) var(--section-gap);
  overflow: clip;
}
.hero__blob {
  position: absolute;
  top: -18%;
  right: -12%;
  width: clamp(420px, 55vw, 880px);
  aspect-ratio: 1;
  border-radius: 46% 54% 58% 42% / 50% 44% 56% 50%;
  background: radial-gradient(circle at 38% 38%, #f4c97e 0%, #ecae6a 38%, rgba(228, 213, 184, 0) 72%);
  opacity: 0.55;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.6rem;
}
.hero__title .line { display: block; }
.hero__title .word { display: inline-block; }
.hero__title .accent { font-style: italic; font-weight: 460; color: var(--terracotta); }
.squiggle-word { position: relative; font-style: italic; font-weight: 460; color: var(--sea); }
.squiggle {
  position: absolute;
  left: -4%;
  bottom: -0.18em;
  width: 108%;
  height: 0.28em;
  color: var(--terracotta);
  overflow: visible;
}
.hero__lede {
  max-width: 34rem;
  font-size: 1.12rem;
  margin-bottom: 2rem;
}
.hero__cta { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.hero__branch {
  width: clamp(180px, 22vw, 280px);
  margin-top: 2.6rem;
  color: var(--olive);
}

.hero__visual { position: relative; }
.arch--hero {
  width: min(100%, 470px);
  margin-left: auto;
  aspect-ratio: 4 / 5.2;
}

.hero__badge {
  position: absolute;
  left: clamp(-2rem, -3vw, -3rem);
  top: -2.4rem;
  width: clamp(120px, 13vw, 160px);
  aspect-ratio: 1;
  color: var(--olive-deep);
}
.badge-spin {
  width: 100%;
  height: 100%;
  animation: spin 22s linear infinite;
}
.badge-text {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 3px;
  fill: currentColor;
}
.badge-sun {
  position: absolute;
  inset: 32%;
  width: 36%;
  height: 36%;
  margin: auto;
  color: var(--terracotta);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Arches ---------- */
.arch {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-arch);
  box-shadow: var(--shadow-soft);
  background: var(--sand);
}
.arch img, .rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rounded {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  background: var(--sand);
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--olive);
  color: var(--cream);
  overflow: hidden;
  padding: 1.05rem 0;
  transform: rotate(-0.6deg) scale(1.01);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  padding-right: 2.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  white-space: nowrap;
}
.sprig { width: 40px; height: 22px; color: var(--sand); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Story ---------- */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-gap) var(--pad-x);
}
.story__images {
  position: relative;
  min-height: clamp(380px, 46vw, 620px);
}
.arch--lg {
  position: absolute;
  top: 0;
  left: 0;
  width: 72%;
  aspect-ratio: 4 / 5.4;
}
.arch--sm {
  position: absolute;
  right: 0;
  bottom: 4%;
  width: 46%;
  aspect-ratio: 4 / 5;
  z-index: 2;
  outline: 8px solid var(--cream);
}
.story__copy p { max-width: 32rem; }
.story__copy .display { margin-bottom: 1.4rem; }
.story__sun {
  width: 120px;
  margin-top: 1.6rem;
  color: var(--terracotta);
}

/* ---------- Menu ---------- */
.menu {
  background: var(--cream-soft);
  padding: var(--section-gap) var(--pad-x);
}
.menu__head {
  max-width: 1280px;
  margin: 0 auto 3.2rem;
}
.menu__intro { max-width: 30rem; margin-top: 1.1rem; }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  max-width: 1280px;
  margin: 0 auto;
}
.card {
  background: #fff;
  border-radius: 22px;
  padding: 1.4rem 1.4rem 1.8rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 56px -20px rgba(51, 48, 31, 0.32);
}
.arch--card { aspect-ratio: 4 / 4.6; margin-bottom: 1.4rem; box-shadow: none; }
.card__title {
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta);
}
.card__note {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0.3rem 0 1.1rem;
}
.card__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card__list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px dashed color-mix(in srgb, var(--olive) 35%, transparent);
  font-size: 0.97rem;
}
.price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--sea);
  flex: none;
}

/* ---------- Day timeline ---------- */
.day {
  padding: var(--section-gap) var(--pad-x);
  max-width: 1280px;
  margin: 0 auto;
}
.day__head { margin-bottom: 3rem; }
.day__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  position: relative;
}
.day__timeline::before {
  content: "";
  position: absolute;
  top: 6.4rem;
  left: 2%;
  right: 2%;
  border-top: 2px dashed color-mix(in srgb, var(--olive) 40%, transparent);
  z-index: 0;
}
.day__stop { position: relative; z-index: 1; }
.day__stop:nth-child(odd) .day__img { transform: rotate(-2deg); }
.day__stop:nth-child(even) .day__img { transform: rotate(2deg); }
.day__img {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-card);
  outline: 6px solid #fff;
  margin-bottom: 1.2rem;
  transition: transform 0.35s ease;
}
.day__stop:hover .day__img { transform: rotate(0deg) scale(1.03); }
.day__time {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--cream);
  background: var(--sea);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.5rem;
}
.day__stop h3 {
  font-size: 1.45rem;
  font-style: italic;
  margin-bottom: 0.4rem;
  color: var(--olive-deep);
}
.day__stop p { font-size: 0.95rem; margin: 0; }

/* ---------- Wine ---------- */
.wine {
  position: relative;
  min-height: clamp(520px, 70vh, 720px);
  display: flex;
  align-items: center;
  overflow: clip;
}
.wine__media {
  position: absolute;
  inset: -12% 0;
}
.wine__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wine__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(44, 74, 82, 0.82) 0%, rgba(44, 74, 82, 0.55) 45%, rgba(44, 74, 82, 0.15) 100%);
}
.wine__panel {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: clamp(3rem, 8vw, 6rem) var(--pad-x);
  color: var(--cream);
}
.wine__panel .display { margin-bottom: 1.4rem; }
.wine__panel .btn { margin-top: 0.6rem; }

/* ---------- Gallery ---------- */
.gallery {
  padding: var(--section-gap) var(--pad-x);
  max-width: 1280px;
  margin: 0 auto;
}
.gallery__head { margin-bottom: 3rem; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(110px, 13vw, 180px);
  gap: clamp(1rem, 2.4vw, 1.8rem);
}
.gallery__item { min-height: 0; }
.gallery__item:nth-child(1) { grid-row: span 3; }
.gallery__item:nth-child(2) { grid-row: span 2; }
.gallery__item:nth-child(3) { grid-row: span 2; margin-top: 14%; }
.gallery__item:nth-child(4) { grid-row: span 3; }
.gallery__item:nth-child(5) { grid-row: span 2; }
.gallery__item:nth-child(6) { grid-row: span 3; margin-top: -10%; }

/* ---------- Visit ---------- */
.visit {
  background: var(--sand);
  padding: var(--section-gap) var(--pad-x);
}
.visit__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.visit__info .display { margin-bottom: 2rem; }
.visit__details {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  background: var(--cream-soft);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.visit__details dt {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.3rem;
}
.visit__details dd { margin: 0; }
.visit__details a { color: var(--sea); text-decoration-color: color-mix(in srgb, var(--sea) 40%, transparent); }
.visit__details a:hover { color: var(--terracotta); }

.visit__cta {
  text-align: center;
  background: var(--cream);
  border-radius: 28px;
  padding: clamp(2.2rem, 5vw, 3.6rem) clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 6.5rem;
}
.visit__rays { width: 120px; margin: 0 auto 1rem; color: var(--terracotta); display: block; }
.visit__signoff { margin-bottom: 1.2rem; }
.visit__blurb { max-width: 24rem; margin: 0 auto 1.6rem; }
.visit__small { font-size: 0.85rem; color: var(--olive-deep); margin: 1.4rem 0 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--olive);
  color: var(--cream);
  padding: 3.5rem var(--pad-x) 2rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto 2.5rem;
}
.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.3rem;
}
.footer__tag { color: var(--sand); margin: 0; font-size: 0.92rem; }
.footer__links, .footer__social {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__links a, .footer__social a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--cream);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.footer__links a:hover, .footer__social a:hover { color: var(--sand); border-color: var(--sand); }
.footer__fine {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--cream) 25%, transparent);
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--cream) 75%, var(--olive));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__fine p { margin: 0; }

/* ---------- Motion helpers (JS adds movement; CSS provides safe defaults) ---------- */
.draw-path { /* dash values set by JS so no-JS users still see art */ }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 420px; }
  .arch--hero { margin-left: 0; }
  .hero__badge { left: auto; right: -0.8rem; top: -1.6rem; }
  .story { grid-template-columns: 1fr; }
  .menu__grid { grid-template-columns: 1fr 1fr; }
  .day__timeline { grid-template-columns: 1fr 1fr; }
  .day__timeline::before { display: none; }
  .visit__grid { grid-template-columns: 1fr; }
  .visit__cta { position: static; }
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: clamp(120px, 18vw, 200px); }
  .gallery__item:nth-child(3), .gallery__item:nth-child(6) { margin-top: 0; }
}

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; padding: 0.85rem 1.25rem; }
  .nav__links { display: none; }
  .menu__grid { grid-template-columns: 1fr; }
  .day__timeline { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery__item { grid-row: auto !important; aspect-ratio: 4 / 4.4; }
  .gallery__item.rounded { aspect-ratio: 4 / 3; }
  .hero__badge { width: 104px; }
  .stamp--hero { right: 0.4rem; }
  .marquee__group { font-size: 1.1rem; gap: 1.8rem; padding-right: 1.8rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-spin { animation: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: 100%; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
