/* ============================================================
   AC's Bake Shop — styles
   Palette pulled from the cookies themselves: dark chocolate,
   toasted edge, brown butter gold, parchment, milk.
   ============================================================ */

:root {
  --choc: #2B1810;
  --choc-2: #3A2216;
  --choc-3: #4B2F1E;
  --toast: #8A4B1C;
  --butter: #E3A449;
  --butter-2: #F0BC66;
  --parch: #EFDFC2;
  --parch-2: #E4CFA9;
  --milk: #FFF8EA;
  --ink: #2B1810;
  --ink-2: #5E4330;
  --line: rgba(43, 24, 16, 0.18);
  --line-dark: rgba(255, 248, 234, 0.18);

  --font-display: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 12px;
  --r-s: 8px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--parch);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.75rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.1; max-width: 20ch; }
h3 { font-size: 1.45rem; line-height: 1.2; }

p { margin: 0; }
a { color: var(--toast); }
a:hover { color: var(--choc); }

:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--choc); color: var(--milk); padding: 10px 14px; border-radius: 999px;
}
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow .lede, .wrap-narrow .form, .wrap-narrow .form-done, .wrap-narrow .faq { max-width: 740px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--font-body);
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1.1rem; padding: 17px 30px; }
.btn-butter { background: var(--butter); color: var(--choc); }
.btn-butter:hover { background: var(--butter-2); color: var(--choc); }
.btn-choc { background: var(--choc); color: var(--milk); }
.btn-choc:hover { background: var(--choc-3); color: var(--milk); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  color: var(--milk);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.nav.scrolled {
  background: rgba(43, 24, 16, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.brand {
  font-family: var(--font-display); font-size: 1.35rem; color: var(--milk);
  text-decoration: none; margin-right: auto;
}
.brand:hover { color: var(--butter-2); }
.nav-links { display: none; gap: 22px; }
.nav-links a { color: var(--milk); text-decoration: none; font-weight: 500; opacity: .9; }
.nav-links a:hover { opacity: 1; color: var(--butter-2); }
.nav-cta { padding: 11px 18px; }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: var(--milk); background: var(--choc); isolation: isolate;
}
.hero-media, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero-media img { object-position: 50% 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(43,24,16,.95) 0%, rgba(43,24,16,.72) 32%, rgba(43,24,16,.18) 62%, rgba(43,24,16,.25) 100%);
}
.hero-content {
  position: relative; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 120px var(--gutter) clamp(40px, 7vh, 72px);
}
.hero h1 { max-width: 13ch; text-wrap: balance; }
.hero-sub { max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin-top: 18px; opacity: .95; }
.rating { margin-top: 18px; font-weight: 500; color: var(--butter-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rating .stars { letter-spacing: 2px; font-size: 1.15rem; }
.rating .rating-text { color: var(--milk); opacity: .9; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.hero-price { font-weight: 500; font-size: 1.05rem; opacity: .95; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-tight { padding-top: 0; }
.section-parch { background: var(--parch); }
.section-milk { background: var(--milk); }
.section-choc { background: var(--choc); color: var(--milk); }
.lede { max-width: 56ch; margin-top: 14px; font-size: 1.1rem; color: var(--ink-2); }
.section-choc .lede { color: rgba(255,248,234,.8); }

/* The cookie */
.cookie-grid { display: grid; gap: 40px; align-items: center; }
.cookie-points { display: grid; gap: 18px; margin-top: 28px; max-width: 58ch; }
.cookie-points strong { font-weight: 600; }
.cookie-steps {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--ink-2); max-width: 52ch;
}
.cookie-figure { margin: 0; }
.cookie-figure img {
  border-radius: 50% 50% 50% 50% / 48% 48% 52% 52%;
  box-shadow: 0 30px 60px -30px rgba(43,24,16,.55);
}
@media (min-width: 860px) {
  .cookie-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .cookie-points { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */
.form { margin-top: 36px; }
.fields { display: grid; gap: 18px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; gap: 20px 24px; } .field-wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: .95rem; }
.field em { font-style: normal; font-weight: 400; opacity: .65; }
.field legend { padding: 0; margin-bottom: 8px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; font: inherit; color: inherit;
  padding: 13px 14px; border-radius: var(--r-s);
  background: rgba(255,248,234,.07); border: 1px solid var(--line-dark);
  transition: border-color .15s ease, background-color .15s ease;
}
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23E3A449' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
select option { color: var(--ink); background: var(--milk); }
input::placeholder, textarea::placeholder { color: currentColor; opacity: .45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--butter); background-color: rgba(255,248,234,.11); }
textarea { resize: vertical; min-height: 88px; }
input[type="date"], select { color-scheme: dark; }
input.invalid, select.invalid, textarea.invalid { border-color: #F08A5D; }

.form-light input[type="text"], .form-light input[type="email"], .form-light input[type="tel"],
.form-light input[type="date"], .form-light select, .form-light textarea {
  background-color: #fff; border-color: var(--line);
}
.form-light input:focus, .form-light select:focus, .form-light textarea:focus { border-color: var(--toast); background-color: #fff; }
.form-light input[type="date"], .form-light select { color-scheme: light; }

.choice-row .choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line-dark);
  font-weight: 500; transition: border-color .15s, background-color .15s;
}
.choice input { margin: 0; accent-color: var(--butter); }
.choice em { font-style: normal; font-weight: 400; opacity: .7; font-size: .9em; }
.choice:has(input:checked) { border-color: var(--butter); background: rgba(227,164,73,.14); }
.form-light .choice { border-color: var(--line); }
.form-light .choice:has(input:checked) { border-color: var(--toast); background: rgba(138,75,28,.08); }
.choice.locked { opacity: .45; cursor: not-allowed; }
.choice-note { margin-top: 10px; font-size: .95rem; color: rgba(255,248,234,.72); min-height: 0; }
.choice-note:empty { display: none; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: var(--choc); padding: 6px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.gallery .gallery-tall { grid-column: 1 / -1; aspect-ratio: 3 / 2; object-position: 50% 45%; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
  .gallery .gallery-tall { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; object-position: 50% 50%; }
}

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

.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.form-status { font-weight: 500; min-height: 1.4em; }
.form-status.error { color: #F08A5D; }
.form-light .form-status.error { color: #B4471B; }
.form-status a { color: inherit; }
.form-note { margin-top: 14px; font-size: .95rem; color: rgba(255,248,234,.72); }

.form-done {
  margin-top: 36px; padding: 32px; border-radius: var(--r);
  background: var(--choc-2); border: 1px solid var(--butter);
}
.form-done p { margin-top: 10px; }
.form-done-light { background: var(--parch); border-color: var(--toast); }
.section-parch .form-done-light { background: var(--milk); }

/* ---------- Order: tickets ---------- */
.tickets { display: grid; gap: 14px; margin-bottom: 34px; }
@media (min-width: 700px) { .tickets { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.ticket {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 4px 16px;
  padding: 18px 18px 18px 22px; border-radius: var(--r);
  background: var(--choc-2); border: 1px solid var(--line-dark);
  transition: border-color .15s ease, background-color .15s ease;
}
.ticket.active { border-color: var(--butter); background: var(--choc-3); }
.ticket-name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.ticket-meta { color: rgba(255,248,234,.7); font-size: .95rem; grid-column: 1; }
.ticket-price { grid-column: 2; grid-row: 1; font-family: var(--font-display); font-size: 1.6rem; color: var(--butter-2); text-align: right; }
.stepper {
  grid-column: 2; grid-row: 2; display: inline-flex; align-items: center; justify-self: end;
  border: 1px solid var(--line-dark); border-radius: 999px; overflow: hidden;
}
.stepper button {
  width: 42px; height: 40px; border: 0; background: transparent; color: var(--milk);
  font: 600 1.35rem/1 var(--font-body); cursor: pointer; display: grid; place-items: center;
}
.stepper button:hover { background: rgba(255,248,234,.1); }
.stepper button:disabled { opacity: .35; cursor: default; background: transparent; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .ticket { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 22px; }
  .ticket-price { grid-column: 1; grid-row: 2; text-align: left; font-size: 2rem; margin-top: 2px; }
  .ticket-meta { grid-row: 3; }
  .stepper { grid-column: 1; grid-row: 4; justify-self: start; margin-top: 14px; }
}

.order-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-dark);
}
.summary { display: flex; flex-direction: column; gap: 2px; }
.summary-items { color: rgba(255,248,234,.75); }
.summary-fee { color: rgba(255,248,234,.75); font-size: .95rem; }
.summary-total { font-size: 1.15rem; }
.summary-total strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--butter-2); margin-left: 6px; font-weight: 400; }

/* ---------- Reviews ---------- */
.sample-notice {
  margin-top: 18px; padding: 12px 16px; border-radius: var(--r-s);
  background: rgba(227,164,73,.22); border: 1px solid var(--butter); font-size: .95rem; max-width: 70ch;
}
.sample-notice code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.reviews { margin-top: 36px; column-gap: 40px; }
@media (min-width: 640px) { .reviews { column-count: 2; } }
@media (min-width: 960px) { .reviews { column-count: 3; } }
.review { break-inside: avoid; margin: 0 0 34px; padding: 0; }
.review .stars { color: var(--toast); letter-spacing: 2px; font-size: 1.05rem; }
.review-title { margin-top: 6px; font-weight: 700; font-size: 1.05rem; }
.review blockquote { margin: 6px 0 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.35; }
.review-where { font-weight: 400; opacity: .8; }
.review blockquote::before { content: "“"; color: var(--butter); margin-right: 2px; }
.review blockquote::after { content: "”"; color: var(--butter); margin-left: 2px; }
.review figcaption { margin-top: 10px; font-weight: 600; color: var(--ink-2); }
.review-form { margin-top: 24px; padding-top: 36px; border-top: 1px solid var(--line); }
.review-form h3 { margin-bottom: 20px; }
.star-picker { display: inline-flex; gap: 2px; }
.star-picker button {
  border: 0; background: transparent; cursor: pointer; padding: 4px 2px;
  font-size: 1.7rem; line-height: 1; color: var(--parch-2); transition: color .1s;
}
.star-picker button.on, .star-picker:hover button.hover { color: var(--toast); }

/* ---------- FAQ ---------- */
.faq { margin: 28px 0 0; display: grid; gap: 22px; }
.faq dt { font-weight: 600; font-size: 1.05rem; }
.faq dd { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }

/* ---------- Footer ---------- */
.footer { background: var(--choc); color: rgba(255,248,234,.8); padding: 40px 0 110px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; }
.footer-brand { font-family: var(--font-display); font-size: 1.25rem; color: var(--milk); line-height: 1.35; }
.footer-note { max-width: 40ch; font-size: .95rem; }
.footer-links a { color: var(--butter-2); font-weight: 500; }
@media (min-width: 700px) { .footer { padding-bottom: 48px; } }

/* ---------- Floating order button ---------- */
.float-cta {
  position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%);
  box-shadow: 0 10px 30px -8px rgba(43,24,16,.6);
  padding: 15px 26px; font-size: 1.05rem;
}
.float-cta[hidden] { display: none; }
@media (min-width: 700px) {
  .float-cta { left: auto; right: 24px; bottom: 24px; transform: none; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
