/* ===========================================================
   Terra Kitchen - demo restaurant site, moody trattoria/wine-bar
=========================================================== */

:root {
  --charcoal: #2b2622;
  --charcoal-deep: #211d1a;
  --charcoal-soft: #3a342e;

  --cream: #f7f2ea;
  --cream-deep: #eee5d3;
  --logo-cream: #fff8e3; /* brand cream - background of the terra logo */
  --white: #ffffff;

  --ink: #2b2622;
  --ink-soft: #6e6459;
  --ink-faint: #a79c8c;

  --cream-text: #f7f2ea;
  --cream-text-soft: rgba(247, 242, 234, 0.72);
  --cream-text-faint: rgba(247, 242, 234, 0.48);

  --line: rgba(43, 38, 34, 0.14);
  --line-dark: rgba(247, 242, 234, 0.16);

  --rust: #8a1a1f;
  --rust-dark: #651216;
  --rust-soft: rgba(138, 26, 31, 0.12);
  --rust-on-dark: #980d11; /* same hue as --rust, lifted for 4.5:1 on charcoal */

  --olive: #6b6e4e;
  --olive-dark: #565a3d;

  --teal: #2f5c57;
  --teal-dark: #20403c;
  --teal-soft: rgba(47, 92, 87, 0.12);

  --shadow-sm: 0 2px 10px rgba(33, 29, 26, 0.08);
  --shadow-md: 0 10px 30px rgba(33, 29, 26, 0.14);
  --shadow-lg: 0 24px 60px rgba(33, 29, 26, 0.22);

  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-hero: "Plaster", Impact, sans-serif;
  --font-body: "Tenor Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  /* No rubber-band bounce past the top of the hero / bottom of the footer */
  overscroll-behavior-y: none;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-synthesis-weight: none; /* Tenor Sans ships one weight - no faux bold */
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.section {
  padding: 80px 0;
}
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive-dark);
  font-weight: 600;
  margin-bottom: 18px;
}
.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.4vw, 2.7rem);
  font-weight: 400;
  line-height: 1.22;
  margin-bottom: 18px;
}
.section__lead {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1rem;
}
.center .section__title,
.center.section__title {
  margin-left: auto;
  margin-right: auto;
}

/* Very light reveal: quick fade with a tiny lift, no stagger */
.reveal {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}
.btn--primary {
  background: var(--rust);
  color: var(--cream-text);
}
.btn--primary:hover {
  background: var(--rust-dark);
}
.btn--ghost {
  background: transparent;
  color: var(--cream-text);
  border-color: rgba(247, 242, 234, 0.4);
}
.btn--ghost:hover {
  border-color: var(--cream-text);
  background: rgba(247, 242, 234, 0.08);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover {
  background: var(--ink);
  color: var(--cream);
}
.btn--full {
  width: 100%;
}

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--charcoal-deep);
  color: var(--cream-text);
  text-align: center;
  font-size: 0.8rem;
  padding: 10px 18px;
  position: relative;
  z-index: 950;
}
.demo-banner a {
  text-decoration: underline;
  font-weight: 600;
  color: var(--cream-text);
}

/* ===========================================================
   NAV
=========================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: transparent;
  transition: background 0.25s ease;
}
/* Transparent over the hero photo; solid once scrolled past it */
.nav.is-scrolled {
  background: var(--charcoal);
}
.nav__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  max-width: none; /* break out of the centered container so items hug the right edge */
  padding: 28px 24px 10px;
  transition: padding 0.25s ease;
}
.nav.is-scrolled .nav__inner {
  padding-top: 10px;
  flex-direction: row;
  align-items: center;
}
/* Logo only appears in the thin bar shown after scrolling past the hero */
.nav__brand {
  display: none;
}
.nav.is-scrolled .nav__brand {
  display: flex;
  margin-right: auto;
  /* line up with the page content (centered 1240px container, 32px gutter)
     rather than the window edge; nav__inner already has 24px padding */
  margin-left: max(8px, calc((100vw - 1240px) / 2 + 8px));
}
.nav__brand img {
  height: 36px;
  width: auto;
}
/* Once scrolled, the stack folds into one compact right-aligned row
   so the solid bar doesn't cover the content */
@media (min-width: 861px) {
  .nav.is-scrolled .nav__inner {
    justify-content: flex-end;
    gap: 32px;
  }
  .nav.is-scrolled .nav__links {
    flex-direction: row;
    gap: 32px;
  }
}
.nav__logo {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.nav__logo-img {
  height: 44px;
  width: auto;
}

/* Links stacked vertically on the right, CTA underneath */
.nav__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.nav__link {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--cream-text-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.nav__link:hover {
  color: var(--cream-text);
}

.nav__cta {
  padding: 12px 24px;
  color: var(--cream-text);
  border-color: var(--cream-text);
}
.nav__cta:hover {
  background: var(--cream-text);
  color: var(--ink);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  margin-left: auto;
  z-index: 2;
}
.nav__toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--cream-text);
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s ease;
}
.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__mobile {
  display: none;
}

@media (max-width: 860px) {
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }

  .nav__mobile {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: var(--charcoal);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease);
    z-index: 1;
  }
  .nav__mobile.is-open {
    transform: translateX(0);
  }
  .nav__mobile-link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--cream-text);
  }
  .nav__mobile .btn {
    margin-top: 8px;
  }
}

/* ===========================================================
   HERO
=========================================================== */
/* Fire stage: the video sticks to the viewport while the hero and the
   philosophy section scroll over it, then releases at the end of philosophy. */
.fire-stage {
  position: relative;
  background: var(--charcoal);
  /* keep the pinned video from painting past the end of the stage
     (overflow:hidden would break position:sticky) */
  clip-path: inset(0);
}
.fire-stage__media {
  position: sticky;
  top: 0;
  height: 100vh;
  margin-bottom: -100vh;
  overflow: hidden;
}
.fire-stage__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* One even tint over the whole video so text stays readable */
.fire-stage__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 13, 0.45);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* top padding lines the tops of the "terra" letters up with the
     first line of nav text (desktop) / the menu icon (mobile) */
  padding: 21px 32px 40px;
}
@media (max-width: 860px) {
  .hero__inner {
    padding-top: 25px;
  }
}
.hero__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(
    3.4rem,
    7vw,
    6.5rem
  ); /* Plaster is very wide - keep clear of nav links */
  line-height: 0.9;
  color: var(--logo-cream);
  margin-bottom: 18px;
}
.hero__subtitle {
  max-width: 460px;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-text-soft);
}
/* "Menu" text link, centered horizontally, a little below the middle.
   Brighter red than --rust so it reads over the fire; large bold text (3.6:1). */
.hero__cta {
  position: absolute;
  top: 70%;
  left: 50%;
  translate: -50% -50%;
  z-index: 3;
  padding-bottom: 4px;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-text-soft);
  border-bottom: 1.3px solid transparent;
  transition: border-color 0.25s ease;
  border-color: currentColor;
}
.hero__cta:hover {
  border-bottom: none;
}

/* ===========================================================
   PHILOSOPHY
=========================================================== */
/* Split: the fire video shows through the left half, a solid cream
   panel holds the text on the right */
.philosophy {
  position: relative;
}
.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.philosophy__content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--logo-cream);
  padding: 56px 6% 52px;
}
.philosophy .eyebrow {
  color: var(--rust);
}
.philosophy .section__title {
  color: var(--ink);
}
.philosophy__content p {
  color: var(--ink-soft);
}
.philosophy__content .philosophy__signoff {
  margin-top: 20px;
}
@media (max-width: 760px) {
  .philosophy__grid {
    grid-template-columns: 1fr;
    grid-template-rows: 46vh auto;
    min-height: 0;
  }
  .philosophy__content {
    grid-column: 1;
    grid-row: 2;
    padding: 36px 24px;
  }
}

/* ===========================================================
   MENU
=========================================================== */
.menu {
  position: relative;
  color: var(--cream-text);
}
/* The menu sits inside the fire stage; a solid panel holds the list
   so the video stays visible around its edges */
.menu__panel {
  width: calc(100% - 48px);
  max-width: 920px;
  background: var(--charcoal);
  padding: 64px 56px;
}
@media (max-width: 640px) {
  .menu__panel {
    width: calc(100% - 32px);
    padding: 44px 20px;
  }
  .menu {
    padding-block: 48px;
  }
}
.menu .section__title {
  /* same typeface as the hero subtitle, tight tracking. Tenor Sans has a
     single weight, so a smaller size + softer cream keeps it reading light */
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--cream-text-soft);
}
.menu .section__lead {
  color: var(--cream-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  line-height: 1.9;
}

.menu__tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.menu__tab {
  background: transparent;
  border: 1.5px solid rgba(247, 242, 234, 0.24);
  color: var(--cream-text-soft);
  padding: 12px 26px;
  border-radius: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition:
    background 0.1s ease,
    border-color 0.1s ease,
    color 0.1s ease;
}
.menu__tab:hover {
  border-color: rgba(247, 242, 234, 0.5);
  color: var(--cream-text);
}
.menu__tab.is-active {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--cream-text);
}

.menu__list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 0;
}
.menu__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-dark);
}
.menu__list .menu__item:last-child {
  border-bottom: none;
}
.menu__item-main {
  flex: 1;
}
.menu__item-main h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--cream-text);
  margin-bottom: 6px;
}
.menu__item-main p {
  color: var(--cream-text-soft);
  font-size: 0.92rem;
  max-width: 480px;
}
.menu__item-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--rust-on-dark);
  white-space: nowrap;
}

/* ===========================================================
   VISIT / RESERVATIONS
=========================================================== */
.visit {
  background: var(--cream-deep);
}
.visit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
@media (max-width: 900px) {
  .visit__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.visit__info > p:not(.eyebrow) {
  color: var(--ink-soft);
  max-width: 460px;
  margin: 18px 0 36px;
}
.visit__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 24px;
  margin-bottom: 32px;
}
.visit__meta h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.visit__meta p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}
.visit__meta a {
  border-bottom: 1px solid var(--line);
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}
.visit__meta a:hover {
  color: var(--rust-dark);
  border-color: var(--rust-dark);
}

.visit__form-wrap {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 40px 28px;
}
.reserve-form h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 32px;
}
.reserve-form button[type="submit"] {
  margin-top: 34px;
}
.field {
  position: relative;
  margin-bottom: 20px;
}
.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 16px 14px 8px;
  border: 1px solid rgba(43, 38, 34, 0.07);
  border-radius: 0;
  background: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.25s ease;
  appearance: none;
}
.field select {
  padding-top: 16px;
}
/* Date has no label (the picker is self-explanatory), so center its text */
.field input[type="date"] {
  padding: 0 14px;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--rust);
}
.field label {
  position: absolute;
  left: 15px;
  top: 15px;
  font-size: 0.95rem;
  color: var(--ink-faint);
  pointer-events: none;
  transition: all 0.2s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 7px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rust-dark);
}
/* Small fixed label at the top of a field (Full name, Party size) */
.field .field-tag {
  position: absolute;
  left: 15px;
  top: 7px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.reserve-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}
.reserve-note:empty {
  display: none;
}

.reserve-success {
  text-align: center;
  padding: 20px 0;
}
.reserve-success__icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}
.reserve-success h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.reserve-success p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 20px;
}

/* ===========================================================
   FOOTER
=========================================================== */
.footer {
  background: var(--logo-cream);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 36px 0 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
}
.footer__addr {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 8px;
}
.footer__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}
.footer__links a:hover {
  color: var(--rust-dark);
}
.footer__credits {
  border-top: 1px solid var(--line);
  padding: 14px 32px 16px;
}
.footer__credits p {
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.footer__credits a {
  text-decoration: underline;
  color: inherit;
}
