/* Order form — page-specific styles. Colors, type, and spacing come from ../tokens.css. */

body { padding: 0 var(--space-4) 140px; }

.hero {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-8) 0 var(--space-4);
  text-align: left;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-terracotta-dark);
  margin: 0 0 var(--space-2);
}

/* At this size (--text-2xl, 32-44px) the brighter --color-terracotta is
   safe (see its usage note in tokens.css) — the same vivid orange as the
   landing page's background, not the muted small-text-safe default. */
.hero h1 { font-size: var(--text-2xl); line-height: 1; margin-bottom: 0; color: var(--color-terracotta); }

.hero .logo-by { margin-top: -3px; }

.intro {
  font-size: var(--text-base);
  color: var(--color-ink);
  white-space: pre-line;
  margin: 0 0 var(--space-5);
}

.key-details {
  display: grid;
  gap: var(--space-2);
  background: var(--color-card);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: 0 0 var(--space-5);
  text-align: left;
  font-size: var(--text-base);
}

.key-details div { display: flex; justify-content: space-between; gap: var(--space-3); }
.key-details dt { color: var(--color-ink-soft); font-weight: 500; }
.key-details dd { margin: 0; font-weight: 600; text-align: right; }

main {
  max-width: 700px;
  margin: 0 auto;
}

.card {
  background: var(--color-card);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.card h2 { font-size: var(--text-h2); margin-bottom: var(--space-3); }

/* Form question sections: no box, just a divider between groups. */
#order-form > section { padding: var(--space-2) 0; }
#order-form > section:first-child {
  border-top: var(--border-hairline);
  padding-top: var(--space-5);
}
#order-form > section + section {
  border-top: var(--border-hairline);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
}
#order-form > section h2 { font-size: var(--text-h2); margin-bottom: var(--space-3); }

label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: var(--color-ink);
}

label:last-child { margin-bottom: 0; }

input[type="text"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-1);
  padding: var(--space-3);
  font-family: inherit;
  font-size: var(--text-input);
  font-weight: 400;
  border: var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  color: var(--color-ink);
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus,
input[type="number"]:focus {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 1px;
}

textarea { resize: vertical; min-height: 60px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 500;
  margin-top: var(--space-5);
}

.checkbox-row input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--color-terracotta); }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.menu-section { padding: var(--space-5) 0; }
.menu-section:first-child { padding-top: 0; }
.menu-section + .menu-section { border-top: var(--border-hairline); }

.menu-section h2 { font-size: var(--text-h2); }

.section-description {
  color: var(--color-ink-soft);
  font-size: var(--text-base);
  margin: 0 0 var(--space-3);
}

.items { display: grid; }

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-2);
  border-radius: 0;
  border: 1.5px solid transparent;
  border-bottom-color: var(--color-border);
  transition: border-color 0.15s, background-color 0.15s;
}

.menu-item:last-child { border-bottom-color: transparent; }

.menu-item.selected {
  border-radius: var(--radius-sm);
  border-color: var(--color-terracotta);
  background: color-mix(in srgb, var(--color-terracotta) 3%, transparent);
}

.menu-item.selected .item-qty {
  color: var(--color-terracotta-dark);
  font-weight: 700;
}

.item-name { font-weight: 600; margin: 0; }
.item-description { font-size: var(--text-sm); color: var(--color-ink-soft); margin: 2px 0 0; }
.item-note { font-size: var(--text-xs); color: var(--color-terracotta-dark); margin: 4px 0 0; font-style: italic; }
.item-note:empty { display: none; }

.item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.item-price {
  font-family: var(--font-display);
  font-variation-settings: var(--display-variation);
  font-optical-sizing: none;
  color: var(--color-mustard-dark);
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border: var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.stepper button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-terracotta);
  color: var(--color-on-accent);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
}

/* hover/focus: see the shared rule near #submit-btn below */

.item-qty {
  width: 30px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--font-display);
  font-variation-settings: var(--display-variation);
  font-optical-sizing: none;
  font-size: var(--text-input);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
  -moz-appearance: textfield;
}

.item-qty::-webkit-outer-spin-button,
.item-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.review-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--text-base);
}

.review-item-name { color: var(--color-ink); }

.review-item-price {
  font-family: var(--font-display);
  font-variation-settings: var(--display-variation);
  font-optical-sizing: none;
  color: var(--color-mustard-dark);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.review-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--border-hairline);
  font-weight: 700;
}

.review-total span:last-child {
  font-family: var(--font-display);
  font-variation-settings: var(--display-variation);
  font-optical-sizing: none;
  font-size: var(--text-md);
  color: var(--color-terracotta-dark);
  font-variant-numeric: tabular-nums;
}

.delivery-note {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
  text-align: left;
  white-space: pre-line;
  margin: 0 0 var(--space-5);
}

/* The same note repeated at the end of the review, right before checkout —
   a divider instead of the header instance's plain margin, since it follows
   the review total rather than opening a fresh block. */
.delivery-note-footer {
  margin: var(--space-4) 0 0;
  padding-top: var(--space-4);
  border-top: var(--border-hairline);
}
.delivery-note-footer:empty { display: none; }

.form-error {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.cart-hint {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
  text-align: center;
  margin: 0 0 var(--space-3);
}

/* Sticky quick-nav between menu sections */
.menu-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--color-cream);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-2);
  border-bottom: var(--border-hairline);
}

.menu-nav::-webkit-scrollbar { display: none; }

.menu-nav a {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-soft);
  background: var(--color-card);
  border: var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.menu-nav a.active {
  color: var(--color-on-accent);
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
}

.menu-nav a:focus-visible { outline: 2px solid var(--color-terracotta); outline-offset: 2px; }

.menu-section { scroll-margin-top: 64px; }

/* Shared shape between the two full-width page notices below — everything
   that actually varies (background, border, padding, layout) stays on
   each one, since a closed-order notice and a draft-resume prompt are
   deliberately different in weight (an alert vs. a quiet prompt). */
.closed-banner, .draft-banner {
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

/* Once ordering is closed, this is the main thing on the page — styled
   to actually read as a notice, not another quiet card. */
.closed-banner {
  background: color-mix(in srgb, var(--color-terracotta) 8%, transparent);
  border: 1.5px solid var(--color-terracotta);
  padding: var(--space-5);
  text-align: left;
  color: var(--color-ink);
  font-size: var(--text-md);
  font-weight: 600;
}
.closed-banner a { color: inherit; text-decoration: underline; }

.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  background: var(--color-card);
  border: var(--border-hairline);
  padding: var(--space-4) var(--space-5);
}
.draft-banner p { margin: 0; font-size: var(--text-sm); color: var(--color-ink); }
.draft-banner-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.draft-banner-actions button {
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 8px var(--space-4);
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1.5px solid transparent;
}
#draft-resume-btn { background: var(--color-terracotta); color: var(--color-on-accent); }
#draft-discard-btn { background: var(--color-cream); color: var(--color-ink); border-color: var(--color-border); }
#draft-discard-btn:hover { opacity: 0.85; }
#draft-discard-btn:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

#submit-btn {
  display: block;
  width: 100%;
  padding: var(--space-4);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: inherit;
  color: var(--color-on-accent);
  background: var(--color-terracotta);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Shared filled-terracotta-button hover/focus — the stepper +/- buttons,
   the submit button, and the draft-resume button all use it. */
.stepper button:hover, #draft-resume-btn:hover, #submit-btn:not(:disabled):hover { background: var(--color-terracotta-dark); }
.stepper button:focus-visible, #draft-resume-btn:focus-visible, #submit-btn:focus-visible { outline: 2px solid var(--color-terracotta); outline-offset: 2px; }

.thank-you { text-align: left; }

.order-summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--color-cream) 94%, transparent);
  backdrop-filter: blur(6px);
  border-top: var(--border-hairline);
}

.summary-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
  font-weight: 600;
}

.summary-right {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.summary-count {
  font-size: var(--text-xs);
  color: var(--color-ink-soft);
}
.summary-count:empty { display: none; }

.summary-total {
  font-family: var(--font-display);
  font-variation-settings: var(--display-variation);
  font-optical-sizing: none;
  font-size: var(--text-lg);
  color: var(--color-terracotta-dark);
}
