/* Mantis Kitchen. Tokens from STYLE_GUIDE_v1.md (ChatGPT), stone panel from the architecture addendum. */
:root {
  color-scheme: light;
  --ink: #1F2A17;
  --deep: #292F18;
  --moss: #4A5A31;
  --sage: #A6B38B;
  --cream: #F6F1E6;
  --sand: #E9E1D2;
  --line: #BDB5A3;
  --stone: #62594C;
  --on-stone: #F5F0E6;
  --muted: #55604a;
  --error: #8a2f1c;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Jost", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.6; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.1; }
h3 { font-size: 1.75rem; line-height: 1.15; }
a { color: var(--moss); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--cream); }
.wrap { max-width: 1360px; margin: 0 auto; padding-left: 56px; padding-right: 56px; }
.narrow { max-width: 720px; }
.caps { font-size: 12.5px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--cream); padding: 10px 16px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--deep); color: var(--cream); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-family: var(--display); font-size: 27px; font-weight: 500; line-height: 1; white-space: nowrap; }
.brand img { height: 46px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--cream); text-decoration: none; font-size: 15px; letter-spacing: 0.04em; padding: 12px 14px; }
.main-nav a:hover { text-decoration: underline; }
.main-nav a.quote { border: 1px solid var(--cream); border-radius: 4px; padding: 10px 18px; margin-left: 8px; }
.main-nav a.quote:hover { background: var(--cream); color: var(--deep); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--cream); border-radius: 4px; color: var(--cream); font: inherit; font-size: 15px; min-height: 44px; padding: 8px 14px; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 26px; border: 1px solid var(--deep); border-radius: 4px; background: transparent; color: var(--deep); font-family: var(--body); font-size: 16px; font-weight: 500; letter-spacing: 0.03em; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--deep); color: var(--cream); }
.btn.solid { background: var(--moss); border-color: var(--moss); color: var(--cream); }
.btn.solid:hover { background: var(--deep); border-color: var(--deep); }
.btn.light { border-color: var(--cream); color: var(--cream); }
.btn.light:hover { background: var(--cream); color: var(--deep); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Hero: text beside the photo so nothing overlaps the PLACEHOLDER mark */
.hero { background: var(--deep); color: var(--cream); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); align-items: center; }
.hero-text { padding: 96px 56px 96px max(56px, calc((100vw - 1360px) / 2 + 56px)); display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hero h1 { font-size: clamp(3.8rem, 7.8vw, 7.6rem); line-height: 0.95; font-weight: 500; }
.hero .rule { width: 34px; height: 1px; background: var(--sage); }
.hero .tag { font-family: var(--display); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.25; max-width: 15em; }
.hero-photo img { width: 100%; }

/* Sections */
.section { padding-top: 112px; padding-bottom: 112px; }
.band { background: linear-gradient(rgba(233,225,210,0.78), rgba(233,225,210,0.78)), url("images/stone-texture.jpg") center / cover var(--sand); }
.section-head { display: flex; align-items: center; gap: 28px; margin-bottom: 60px; text-align: center; }
.section-head::before, .section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lead { max-width: 640px; margin: -20px auto 40px; text-align: center; color: var(--muted); }

.formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; align-items: stretch; }
.format { background: var(--sand); display: flex; flex-direction: column; }
.format img { width: 100%; height: auto; }
.format-body { flex: 1; padding: 32px 36px 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.format-body h3 { font-size: clamp(2rem, 3.2vw, 2.7rem); }
.format-body .caps { color: var(--moss); }

.themes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 28px; list-style: none; }
.theme { grid-column: span 2; }
.theme:nth-child(4) { grid-column: 2 / span 2; }
.theme a { display: block; text-decoration: none; color: var(--ink); }
.theme img { width: 100%; height: auto; }
.theme h3 { font-size: 1.9rem; margin-top: 16px; }
.theme a:hover h3 { text-decoration: underline; }
.note { font-size: 14px; color: var(--muted); }
.centre { text-align: center; }

.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px; }
.steps li { counter-increment: s; border-top: 1px solid var(--line); padding-top: 18px; }
.steps li::before { content: counter(s); font-family: var(--display); font-style: italic; font-size: 3.2rem; line-height: 1; color: var(--moss); }
.steps h3 { font-size: 1.8rem; margin: 14px 0 8px; }
.steps p { font-size: 17px; color: var(--muted); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.about-grid img { width: 100%; border-radius: 4px; }
.about p { font-size: 19px; }
.about p + p { margin-top: 18px; }

.closing { background: linear-gradient(rgba(41,47,24,0.35), rgba(41,47,24,0.35)), url("images/dew-leaf.jpg") center / cover no-repeat var(--deep); color: var(--cream); }
.closing p { font-family: var(--display); font-style: italic; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.2; text-align: right; padding: 110px 0; max-width: 12em; margin-left: auto; }
.site-foot { background: var(--deep); color: var(--sage); font-size: 14px; padding: 22px 0; text-align: center; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 25; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--deep); background: var(--cream); color: var(--deep); font-size: 20px; line-height: 1; cursor: pointer; display: none; }
.to-top.show { display: block; }

/* Planner */
.plan-top { padding-top: 34px; padding-bottom: 8px; }
.back { font-size: 15px; }
.progress { list-style: none; display: flex; gap: 10px; margin: 20px 0 6px; }
.progress li { flex: 1; border-top: 3px solid var(--line); padding-top: 10px; font-size: 14.5px; color: var(--muted); }
.progress li b { font-weight: 500; }
.progress li.current { border-color: var(--moss); color: var(--ink); }
.progress li.done { border-color: var(--sage); }
.plan-h { font-size: clamp(2rem, 4vw, 2.8rem); margin: 22px 0 6px; }
.step-pane { padding-bottom: 80px; }
.build { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; cursor: pointer; }
.chip:hover { border-color: var(--moss); }
.chip[aria-pressed="true"] { background: var(--moss); border-color: var(--moss); color: var(--cream); }
.tools { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 26px; }
.tools h3, .field-title { font-family: var(--body); font-size: 13px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--moss); }
.search { max-width: 360px; }
.dishes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dish { background: #fbf8f1; border: 1px solid var(--line); border-radius: 4px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.dish.picked { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.dish h4 { font-family: var(--display); font-weight: 500; font-size: 1.35rem; line-height: 1.2; }
.dish p { font-size: 15px; color: var(--muted); }
.dish .meta { font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.dish .chip { margin-top: auto; align-self: flex-start; min-height: 40px; padding: 6px 14px; font-size: 14.5px; }
.group-h { font-size: 1.6rem; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group-h:first-child { margin-top: 0; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); }

.summary { position: sticky; top: 92px; background: var(--stone); color: var(--on-stone); border-radius: 4px; padding: 24px 22px; }
.summary summary { list-style: none; cursor: default; }
.summary summary::-webkit-details-marker { display: none; }
.summary h3 { font-size: 1.6rem; }
.summary .count { font-size: 14px; color: #ddd5c6; }
.summary ul { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.summary li { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; font-size: 15px; line-height: 1.35; border-bottom: 1px solid rgba(245,240,230,0.22); padding-bottom: 10px; }
.summary li small { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #ddd5c6; }
.summary .x { flex: none; width: 32px; height: 32px; border: 1px solid rgba(245,240,230,0.5); border-radius: 4px; background: none; color: var(--on-stone); font-size: 16px; cursor: pointer; }
.summary .fine { font-size: 13.5px; color: #e4ddcf; margin-top: 10px; }
.summary .btn { width: 100%; margin-top: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; max-width: 860px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 15px; font-weight: 500; }
.field .hint { font-size: 14px; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], textarea { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fffdf8; border: 1px solid var(--line); border-radius: 4px; -webkit-appearance: none; appearance: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--moss); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.err { font-size: 14px; color: var(--error); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; min-height: 36px; }
.checks input { width: 20px; height: 20px; accent-color: var(--moss); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 980px; }
.card { background: var(--sand); border-radius: 4px; padding: 26px; }
.card h3 { font-size: 1.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 button { background: none; border: 0; color: var(--moss); font: inherit; font-family: var(--body); font-size: 15px; text-decoration: underline; cursor: pointer; padding: 6px; }
.card dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card ul { margin: 14px 0 0 18px; font-size: 16px; }
.notice { max-width: 980px; margin-top: 26px; padding: 16px 18px; border-left: 3px solid var(--moss); background: #fbf8f1; font-size: 16px; }
.alert { max-width: 980px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--error); border-radius: 4px; color: var(--error); background: #fdf3ef; }
.thanks { min-height: 60vh; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; justify-content: center; }
[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build { grid-template-columns: minmax(0, 1fr); }
  .summary { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 28; border-radius: 0; padding: 12px 20px; max-height: 80vh; overflow: auto; }
  .summary summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
  .summary summary::after { content: "Show"; font-size: 14px; text-decoration: underline; }
  .summary[open] summary::after { content: "Hide"; }
  .summary h3 { font-size: 1.3rem; }
  #step1 { padding-bottom: 150px; }
  .to-top { bottom: 84px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--deep); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid rgba(246,241,230,0.18); }
  .main-nav a.quote { margin: 14px 0 0; text-align: center; }
  .brand { font-size: 23px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { order: -1; }
  .hero-text { padding: 40px 20px 56px; gap: 20px; }
  .dishes, .form-grid, .review, .about-grid, .formats { grid-template-columns: minmax(0, 1fr); }
  .formats { gap: 28px; }
  .format-body { padding: 24px 22px 30px; }
  .themes { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .theme, .theme:nth-child(4) { grid-column: auto; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .section-head { gap: 14px; margin-bottom: 30px; }
  .closing p { padding: 70px 0; }
  .progress li span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
