/* Sea Hearth Baking Co. — site styles
   One stylesheet for the whole site. Design tokens live in :root; change them
   here and every page follows. */

:root {
  --ink:        #171717;   /* near-black — header, menu, dark sections */
  --ink-soft:   #201713;   /* headings on light backgrounds */
  --paper:      #faf8f5;   /* warm off-white page background */
  --text:       #4a423d;   /* body copy — 8.2:1 on --paper */
  --muted:      #6b625b;
  --line:       rgba(32, 23, 19, 0.14);
  --accent:     #8c5a2b;   /* crust brown, used sparingly */

  --font: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --measure: 34rem;        /* comfortable reading width */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 10vw, 7rem);
  --header-h: 3.75rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--paper); color: var(--ink); padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  padding: 0 var(--gutter);
}

.site-header__title {
  margin: 0;
  font-size: clamp(.8rem, 2.6vw, 1rem);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
}
.site-header__title a { text-decoration: none; }

.menu-toggle {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem;
  display: grid; place-content: center; gap: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- menu drawer ---------- */

.site-nav {
  position: fixed; inset: 0; z-index: 90;
  visibility: hidden;
  transition: visibility .3s ease;
}
.site-nav[data-open="true"] { visibility: visible; }

/* dims the page behind the drawer; click it to close */
.site-nav__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.site-nav[data-open="true"] .site-nav__backdrop { opacity: 1; }

/* the drawer itself — slides in from the left, under the hamburger */
.site-nav__panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(82vw, 19rem);
  background: rgba(23, 23, 23, .98);
  display: grid; place-content: center;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
/* on a normal desktop window, about a quarter of the width */
@media (min-width: 64rem) {
  .site-nav__panel { width: clamp(17rem, 25vw, 24rem); }
}
.site-nav[data-open="true"] .site-nav__panel { transform: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.site-nav li + li { margin-top: clamp(.5rem, 2vw, 1rem); }
.site-nav a {
  display: block; padding: .35rem 1rem;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72); text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible,
.site-nav a[aria-current="page"] { color: #fff; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(88svh, 46rem);
  margin-top: var(--header-h);
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 45%, rgba(0,0,0,.4));
}
.hero__wordmark {
  position: relative; z-index: 1; margin: 0; text-align: center;
  color: #fff; text-transform: uppercase;
  font-size: clamp(2rem, 9vw, 4.25rem);
  font-weight: 700; letter-spacing: .06em; line-height: 1.15;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero__wordmark span { display: block; }

/* page banner for inner pages */
.page-head {
  margin-top: var(--header-h);
  padding: var(--section-y) var(--gutter) 0;
  text-align: center;
}
.page-head h1 {
  margin: 0; color: var(--ink-soft);
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- sections ---------- */

.section { padding: var(--section-y) var(--gutter); }
/* keep anchor targets clear of the fixed header */
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.section--dark { background: var(--ink); color: rgba(255,255,255,.82); }
.section--dark h2, .section--dark h3 { color: #fff; }

.wrap { max-width: var(--measure); margin-inline: auto; }
.wrap--wide { max-width: 60rem; margin-inline: auto; }

h2 {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1.3;
}
h3 {
  margin: 2.5rem 0 .75rem;
  color: var(--ink-soft);
  font-size: 1.05rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

/* the manifesto — authored in sentence case, displayed in caps */
.manifesto {
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.9;
  font-size: clamp(.9rem, 2.6vw, 1.05rem);
  font-weight: 600;
}
.dream {
  text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  text-align: center; margin-top: 2.5rem;
}

.lede { font-size: 1.075rem; }

figure { margin: 0 0 2.5rem; }
figure img { width: 100%; }
figcaption {
  margin-top: .6rem; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}

.media { margin-block: var(--section-y); }
.media img { width: 100%; }

/* ---------- order page ---------- */

/* The bake switch: data-bake="on" / "off" on .order decides which half shows.
   See the comment at the top of order-form/index.html. */
.order[data-bake="on"]  .order__closed { display: none; }
.order[data-bake="off"] .order__open   { display: none; }

.batch {
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin-block: 2.5rem;
  background: #fff;
}
.batch__month {
  margin: 0 0 .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.batch dl { margin: 0; display: grid; gap: .4rem; }
.batch dt {
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  font-size: .8rem; color: var(--muted);
}
.batch dd { margin: 0 0 .75rem; }
.batch dd:last-child { margin-bottom: 0; }

.product { margin-block: 2.5rem; }
.product__media { position: relative; }
.product__badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--ink); color: #fff;
  padding: .4rem .8rem; font-size: .75rem;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.product__price {
  margin: 1.25rem 0 .5rem;
  font-size: 1.35rem; font-weight: 700; color: var(--ink-soft);
}

.button {
  display: inline-block;
  background: var(--ink); color: #fff;
  padding: .9rem 2rem; border: 1px solid var(--ink);
  font: inherit; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: .85rem; text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.button:hover { background: transparent; color: var(--ink); }
.button[aria-disabled="true"] {
  background: transparent; color: var(--muted);
  border-color: var(--line); cursor: not-allowed; pointer-events: none;
}

.note { font-size: .9rem; color: var(--muted); }

/* ---------- signup form ---------- */

.signup { margin-block: 2.5rem; }
.field { margin-bottom: 1rem; }
.field label {
  display: block; margin-bottom: .35rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.field input {
  width: 100%; padding: .7rem .8rem;
  border: 1px solid var(--line); background: #fff;
  font: inherit; color: var(--text); border-radius: 0;
}
.field input:focus { border-color: var(--ink-soft); }
.req { color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink); color: rgba(255,255,255,.6);
  padding: var(--section-y) var(--gutter);
  text-align: center; font-size: .85rem; letter-spacing: .08em;
}
.site-footer a { color: rgba(255,255,255,.85); }
.social { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; gap: 1.5rem; justify-content: center; }
.social a { text-transform: uppercase; font-weight: 700; letter-spacing: .14em; font-size: .78rem; text-decoration: none; }

/* ---------- utilities ---------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (min-width: 48rem) {
  .split {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem); align-items: center;
    max-width: 68rem; margin-inline: auto;
  }
  .split > div { max-width: var(--measure); }
}
