/* Graze & Board */

:root {
  /* The brand palette is light only; stops browsers from force-darkening it. */
  color-scheme: only light;
  --cream: #ECE4DA;
  --light: #F5F0E8;
  --olive: #424D3C;
  --ink: #292D27;
  --sage: #8F9C86;
  --sage-deep: #6F7D66;
  /* Second accent for text-heavy sections: a dusty pink beside the greens. */
  --blush: #EACBC4;
  --rose: #8A4253;
  --line: rgba(66, 77, 60, 0.28);

  --display: "Marcellus", "Times New Roman", serif;
  --body: "PT Serif", Georgia, serif;

  --gutter: clamp(16px, 5vw, 64px);
  --header-h: 5rem;
  --measure: 34rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }

p { margin: 0 0 1.1em; }

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--olive); color: var(--light);
  padding: 0.5rem 1rem; border-radius: 999px; z-index: 20;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.nowrap { display: inline-block; }

.container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--gutter);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.wordmark {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--olive);
  text-decoration: none;
  grid-column: 2;
}
.wordmark .amp { color: var(--rose); }
.nav { grid-column: 1; grid-row: 1; display: flex; gap: 1.75rem; }
.nav a, .social a { text-decoration: none; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }
.social { grid-column: 3; grid-row: 1; justify-self: end; display: flex; gap: 1rem; }
.social a { display: flex; padding: 0.3rem; margin-right: -0.3rem; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle { display: none; }

@media (max-width: 719px) {
  :root { --header-h: 4rem; }
  .site-header { grid-template-columns: auto 1fr auto; }
  .wordmark { grid-column: 2; justify-self: center; font-size: 1.4rem; }
  .nav-toggle {
    display: inline-flex; grid-column: 1; grid-row: 1;
    background: none; border: 0; padding: 0.4rem; margin-left: -0.4rem;
    color: var(--olive); cursor: pointer;
  }
  .nav-toggle svg { width: 26px; height: 26px; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--light);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter);
  }
  .nav.nav--open { display: flex; }
  .nav a { padding: 0.8rem 0; font-size: 1.15rem; }
  .nav a + a { border-top: 1px solid var(--line); }
}

/* Buttons */

.btn {
  display: inline-block;
  background: var(--olive);
  color: var(--light);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1;
  padding: 1.05rem 2rem;
  border: 1px solid var(--olive);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--olive); }
.btn--light { background: var(--light); color: var(--olive); border-color: var(--light); }
.btn--light:hover { background: transparent; color: var(--light); }

/* Sections */

.section { padding: clamp(4rem, 10vw, 8rem) 0; }
.section--sage { background: var(--sage); color: var(--ink); }
.section--sage h2, .section--sage h3 { color: var(--ink); }
.section--blush { background: var(--blush); color: var(--ink); }
.section--olive { background: var(--olive); color: var(--light); }
.section--olive h2 { color: var(--light); }

/* Hero: headline beside the long table */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: calc(100svh - var(--header-h));
  max-height: 64rem;
}
.hero-copy {
  align-self: center;
  padding: 3rem var(--gutter) 4rem;
  max-width: 44rem;
  justify-self: end;
}
/* Sized so each half of the headline stays on one line beside the photo. */
.hero-copy h1 { font-size: clamp(2.6rem, 4.4vw, 4.25rem); margin-bottom: 0.45em; }
.hero-copy p { font-size: 1.2rem; max-width: 26rem; margin-bottom: 2rem; }
.hero-photo { position: relative; overflow: hidden; }
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  border-top-left-radius: 14rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: settle 1s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes settle { from { transform: scale(1.05); opacity: 0.4; } to { transform: none; opacity: 1; } }
}

.hero-tagline { display: none; }

/* Phones: headline and a one-line tagline, then the table running edge to
   edge to the bottom of the screen, with the button sitting on the photo. */
@media (max-width: 859px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(12rem, 1fr);
    height: calc(100svh - var(--header-h));
    min-height: 32rem;
    max-height: 60rem;
    background: var(--cream);
  }
  .hero-copy { display: contents; }
  .hero-copy h1 {
    grid-row: 1;
    font-size: clamp(1.9rem, 10vw, 4rem);
    padding: 0.4rem var(--gutter) 0;
    margin-bottom: 0.4rem;
  }
  .hero-copy p { display: none; }
  .hero-copy .hero-tagline {
    display: block;
    grid-row: 2;
    margin: 0;
    padding: 0 var(--gutter) 1.1rem;
    font-size: 1.05rem;
    text-wrap: balance;
  }
  .hero-photo { grid-row: 3; grid-column: 1; }
  .hero-photo img { border-top-left-radius: min(46vw, 15rem); }
  .hero-copy .btn {
    grid-row: 3; grid-column: 1;
    align-self: end;
    justify-self: start;
    position: relative;
    z-index: 1;
    margin: 0 0 1.4rem var(--gutter);
    box-shadow: 0 0 0 6px var(--cream);
  }
}

/* Floating inquiry button on phones once the hero has scrolled away */
.sticky-cta { display: none; }
@media (max-width: 719px) {
  .sticky-cta {
    display: block;
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 15;
    transform: translate(-50%, calc(100% + 60px));
    box-shadow: 0 8px 24px rgba(41, 45, 39, 0.28);
    transition: transform 0.35s cubic-bezier(.2, .7, .2, 1);
    white-space: nowrap;
  }
  .sticky-cta:hover { background: var(--olive); color: var(--light); }
  .sticky-cta.is-visible { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }

/* Menu card of offerings */

.menu {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--light);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -10px;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 6vw, 4.5rem);
  text-align: left;
}
.menu > p { max-width: 30rem; margin: 0 0 2.5rem; }
.offers { list-style: none; margin: 0; padding: 0; }
.offer {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.offer:last-child { border-bottom: 1px solid var(--line); }
/* Line drawings of each format: low and flat, built up, one board. */
.offer-shape {
  width: 100%; height: auto;
  fill: none; stroke: var(--olive); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.offer h3 { margin-bottom: 0.25em; color: var(--rose); }
.offer p { max-width: 30rem; margin: 0; text-wrap: pretty; }
.menu-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}
.menu-foot p { margin: 0; font-style: italic; }
.btn--outline { background: transparent; color: var(--olive); padding: 0.85rem 1.6rem; }
.btn--outline:hover { background: var(--olive); color: var(--light); }
@media (max-width: 559px) {
  .menu { padding: 2.75rem 1.25rem 2.25rem; outline-offset: -7px; }
  .menu > p { margin-bottom: 2rem; }
}

/* Occasions */

.occasions-head { max-width: var(--measure); margin-bottom: 3rem; }
.occasions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  list-style: none; margin: 0; padding: 0;
}
.occasions li { border-top: 1px solid rgba(41, 45, 39, 0.35); padding-top: 1.5rem; }
.occasions p { margin: 0; }
@media (max-width: 759px) { .occasions { grid-template-columns: 1fr; } }

/* Story */

.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.story-photo img { width: 100%; border-radius: 0 0 12rem 0; }
.story-copy { max-width: var(--measure); }
.story-copy .greeting { font-family: var(--display); font-size: 1.5rem; color: var(--rose); margin-bottom: 0.8em; }
.story-copy a:not(.btn) { color: var(--rose); }
@media (max-width: 759px) {
  .story { grid-template-columns: 1fr; }
  .story-photo { max-width: 24rem; }
}

/* Closing band */

.closing { text-align: center; }
.closing p { max-width: 30rem; margin: 0 auto 2rem; }

/* Footer */

.site-footer {
  padding: 3rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line);
}
.site-footer .wordmark { font-size: 1.3rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.site-footer small { font-size: 0.9rem; width: 100%; color: var(--olive); }

/* Inquiry page */

.inquire {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.inquire-intro { position: sticky; top: 2rem; max-width: 28rem; }
.inquire-intro .contact { margin-top: 2rem; font-size: 0.98rem; }
@media (max-width: 859px) {
  .inquire { grid-template-columns: 1fr; }
  .inquire-intro { position: static; }
}

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.98rem; color: var(--olive); padding: 0; }
.req { font-size: 0.85rem; opacity: 0.75; }
.hint { font-size: 0.88rem; opacity: 0.8; margin: 0; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  width: 100%;
  min-height: 3.1rem;
}
.field textarea { border-radius: 1.4rem; min-height: 9rem; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23424D3C' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.15rem center;
  background-size: 12px;
  padding-right: 2.75rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--olive); outline-offset: 1px; border-color: var(--olive);
}
.field input:user-invalid, .field select:user-invalid { border-color: #9B3A2E; }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: 0.95rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--olive); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.form-status { margin: 0; font-size: 0.98rem; }
.form-status:empty { display: none; }
.form-done h2 { margin-bottom: 0.4em; }
@media (max-width: 559px) { .form { grid-template-columns: 1fr; } }

/* Phones: each home section is a card that fits one screen, slides up over
   the one before and settles there (gentle snap). site.js sets --cover
   (0..1) as the next card covers this one, and pins any card taller than
   the screen by its bottom edge. */
@media (max-width: 719px) {
  .home main > .section {
    min-height: calc(100svh - var(--header-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 0;
  }
  .home .section--menu { background: var(--light); }
  /* The closing card and the footer together make the last screen. */
  .home main > .closing { min-height: calc(100svh - var(--header-h) - var(--footer-h, 12rem)); }
  .home .closing { text-align: left; }
  .home .closing p { margin-left: 0; }
  .home .menu { background: none; border: 0; outline: 0; padding: 0; }
  .home .menu-intro { display: none; }
  .home .menu h2 { margin-bottom: 0.6em; }
  .home .offer { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 1rem; padding: 1.05rem 0; }
  .home .offer h3 { font-size: 1.35rem; }
  .home .offer p, .home .occasions p { font-size: 0.97rem; line-height: 1.6; }
  .home .menu-foot { margin-top: 1.25rem; font-size: 0.97rem; }
  .home .occasions-head { margin-bottom: 1.5rem; }
  .home .occasions { gap: 1.4rem; }
  .home .occasions li { padding-top: 1rem; }
  .home .occasions h3 { font-size: 1.4rem; margin-bottom: 0.3em; }
  /* Jade's card: the whole portrait (head to food) beside a stacked headline. */
  .home .story {
    grid-template-columns: minmax(0, 1fr) 58%;
    gap: 1.25rem 1rem;
    align-items: end;
  }
  .home .story-copy { display: contents; }
  .home .story-photo { grid-column: 2; grid-row: 1; max-width: none; }
  .home .story-photo img { width: 100%; height: auto; border-radius: min(24vw, 7rem) 0 0 0; }
  .home .story-copy h2 {
    grid-column: 1; grid-row: 1;
    font-size: clamp(1.5rem, 7vw, 2.1rem);
    text-wrap: balance;
    margin: 0;
  }
  .home .story-copy > :not(h2) { grid-column: 1 / -1; margin-bottom: 0; }
  .home .story-copy .greeting { font-size: 1.3rem; margin-bottom: 0; }
}

/* Short phones: tighter cards so each still fits under the header. */
@media (max-width: 719px) and (max-height: 700px) {
  .home main > .section { padding: 1rem 0; }
  .home .menu h2 { margin-bottom: 0.4em; }
  .home .offer { padding: 0.7rem 0; }
  .home .menu-foot { margin-top: 1rem; }
  .home .menu-foot p { display: none; }
}

@media (max-width: 719px) and (prefers-reduced-motion: no-preference) {
  html:has(body.home) { scroll-snap-type: y proximity; }
  .home .hero,
  .home main > .section {
    position: sticky;
    top: var(--header-h);
    scroll-snap-align: start;
    transform-origin: 50% 0;
    transform: scale(calc(1 - var(--cover, 0) * 0.06));
  }
  .home main > .section {
    /* Rounded while sliding up; site.js squares it off as it reaches the top. */
    border-radius: var(--radius, 2rem) var(--radius, 2rem) 0 0;
    box-shadow: 0 -12px 30px rgba(41, 45, 39, 0.16);
  }
  .home .hero::after,
  .home main > .section::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--ink);
    opacity: calc(var(--cover, 0) * 0.4);
    pointer-events: none;
    z-index: 2;
  }
  /* The last card scrolls on normally into the footer. */
  .home main > .closing { position: relative; transform: none; }
  .home .site-footer { position: relative; background: var(--cream); scroll-snap-align: end; }
}
