/* Rea's Baked Goods — styles
   Purple, white and black.
     logo purple #5D038F · deep #4A026F · light #C9A6E8 · black · white
   The logo badge is still its original peach; see README before replacing it. */

:root {
  --ink: #000000;          /* the logo's lettering */
  --text: #16111F;
  --muted: #4A4458;
  --cream: #FFFFFF;        /* page background */
  --peach: #EDE2F7;        /* light tint of the logo purple */
  --glaze: #F7F1FC;
  --cake: #5D038F;         /* the logo purple */
  --crust: #4A026F;        /* darker logo purple, for text on white */
  --lilac: #C9A6E8;        /* light logo purple, for text on black */
  --line: #E5D8F2;
  --card: #FFFFFF;
  --display: Yellowtail, "Brush Script MT", "Segoe Script", cursive;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  padding-top: env(safe-area-inset-top, 0px);
}

/* The logo is the only script on the page. Headings are set in the sans as a
   deliberate counterpoint — two competing scripts make both look weaker. */
.display, h1, .section h2, .order-rules h2, .modal-card h2, .drawer-header h2 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 10px 5%;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(253, 246, 234, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav nav { display: flex; gap: 20px; align-items: center; }
.nav nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; }
.nav nav a:hover { color: var(--crust); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
/* The logo already says the name in script; the typed name repeats it in the
   sans so the header reads as a title block rather than a lone picture. */
.brand-name {
  color: #fff; font-weight: 800; font-size: 1rem;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.1;
  padding-left: 12px; border-left: 1px solid rgba(201, 166, 232, .45);
  white-space: nowrap;
}

.cart-button {
  border: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; cursor: pointer;
  font-size: .95rem; font-family: inherit;
}
.cart-button span { background: var(--peach); color: var(--ink); padding: 1px 8px; border-radius: 999px; margin-left: 6px; }

/* ---------- hero ---------- */
.hero {
  display: flex; align-items: center; gap: 48px;
  padding: clamp(40px, 7vw, 88px) 7%;
  background:
    radial-gradient(120% 90% at 85% 10%, var(--glaze), transparent 60%),
    linear-gradient(160deg, #230536, #080310 70%);
}
.hero-text { max-width: 620px; }
.hero h1 { margin: 0 0 18px; }
.hero-copy { font-size: 1.08rem; max-width: 50ch; margin: 0; color: #E7E1F2; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-meta { margin-top: 22px; font-size: .9rem; color: #CFC6E6; }
.hero-mark { width: min(300px, 32vw); height: auto; flex: none; }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; justify-content: center; align-items: center;
  text-decoration: none; border-radius: 12px; padding: 13px 20px;
  font-weight: 800; font-size: 1rem; border: 2px solid var(--ink);
  cursor: pointer; font-family: var(--sans);
}
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #241C15; }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: rgba(0, 0, 0, .06); }
.button[disabled] { opacity: .45; cursor: not-allowed; }
.full { width: 100%; margin-top: 14px; }

.icon-button {
  border: 0; background: none; font-size: 2rem; line-height: 1;
  cursor: pointer; color: inherit; padding: 4px 8px; border-radius: 8px;
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 88px) 7%; max-width: var(--max); margin: 0 auto; }
.section h2 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin: 0 0 10px; }
.section-heading { max-width: 60ch; margin-bottom: 30px; }
.section-heading p { color: var(--muted); margin: 0; }

/* ---------- menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column;
}
.card .thumb {
  height: 96px; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(140deg, var(--peach), var(--glaze));
  border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 2rem;
}
.card .tag { font-size: .75rem; font-weight: 800; color: var(--crust); margin: 0; }
.card h3 { margin: 6px 0 4px; font-size: 1.18rem; font-weight: 800; }
.card p { color: var(--muted); font-size: .94rem; margin: 0 0 14px; flex: 1; }
.card .price { font-size: 1.2rem; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.card .soldout { font-size: .85rem; color: var(--muted); font-weight: 700; }

.in-cart {
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid var(--ink); border-radius: 12px; padding: 5px 7px;
}
.in-cart span { font-weight: 800; }
.step {
  border: 0; background: var(--ink); color: #fff; width: 34px; height: 34px;
  border-radius: 9px; font-size: 1.2rem; cursor: pointer; line-height: 1;
}

/* ---------- ordering rules ---------- */
.order-rules { padding: clamp(52px, 7vw, 76px) 7%; background: var(--ink); color: var(--cream); }
.order-rules h2 { color: var(--lilac); font-size: clamp(2.1rem, 4.4vw, 3rem); max-width: var(--max); margin: 0 auto; }
.rules-grid {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 26px auto 0; max-width: var(--max);
}
.rules-grid li { border: 1px solid rgba(196, 181, 253, .3); border-radius: var(--radius); padding: 20px; }
.rules-grid strong { font-size: 1.05rem; display: block; margin-bottom: 6px; color: #fff; }
.rules-grid p { color: #E7E1F2; margin: 0; font-size: .95rem; }
.lead-time { max-width: var(--max); margin: 18px auto 0; color: #E7E1F2; font-size: .92rem; }

.large-order { background: var(--peach); max-width: none; }
.large-order > * { max-width: var(--max); margin-inline: auto; }
.large-order p { max-width: 58ch; color: var(--text); }
.large-order .button { margin-top: 18px; }

.about { max-width: 780px; }
.about p { color: var(--muted); }
.allergy { font-size: .9rem; border-left: 3px solid var(--cake); padding-left: 14px; }

.footer {
  padding: 34px 7% calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.footer .fine { max-width: 70ch; }

/* ---------- cart drawer ---------- */
.drawer {
  position: fixed; right: 0; top: 0; z-index: 40;
  width: min(430px, 100%); height: 100%;
  background: var(--cream); transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column;
  box-shadow: -15px 0 50px rgba(0, 0, 0, .18);
  visibility: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: #000;
}
.drawer-header h2 { margin: 0; font-size: 1.7rem; }
.cart-items { padding: 16px 20px; overflow-y: auto; flex: 1; }
.cart-line { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.cart-line .line-price { font-weight: 800; white-space: nowrap; }
.cart-line-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty { display: flex; gap: 6px; align-items: center; }
.qty button { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 1.05rem; }
.remove { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .85rem; font-family: inherit; }
.empty-cart { color: var(--muted); }

.cart-summary { padding: 18px 20px; border-top: 1px solid var(--line); background: var(--glaze); }
.summary-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: .97rem; }
.summary-row.total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.note { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.error { color: #8C2417; font-weight: 700; font-size: .92rem; background: #FBE6E1; border-radius: 10px; padding: 10px 12px; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 30; }
.overlay[hidden] { display: none; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .5); padding: 16px; }
.modal[hidden] { display: none; }
.modal-card {
  width: min(640px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--cream); border-radius: 20px; padding: 26px; position: relative;
  border-top: 6px solid var(--cake);
}
.modal-card h2 { margin: 0 0 14px; font-size: 2rem; }
.modal-close { position: absolute; right: 14px; top: 10px; }

.checkout-summary {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 18px; font-size: .94rem;
}
.checkout-summary .summary-row.total { font-size: 1.05rem; }

fieldset { border: 0; padding: 0; margin: 0 0 6px; }
legend { font-weight: 800; padding: 0; margin-bottom: 6px; }

label { display: block; font-weight: 700; margin: 14px 0 0; font-size: .95rem; }
label .optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; margin-top: 6px; border: 1px solid #D9C7B2; border-radius: 10px;
  padding: 12px; background: #fff; font: inherit; color: inherit;
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #8C2417; }
.field-row { display: flex; gap: 12px; }
.field-row label { flex: 1; }

label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--muted); margin-top: 16px; }
label.check input { width: auto; margin-top: 3px; flex: none; }

.segmented { display: flex; gap: 10px; margin-top: 4px; }
.segmented button {
  flex: 1; padding: 12px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.segmented button[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.segmented button[disabled] { opacity: .45; cursor: not-allowed; }

.checkout-actions { display: flex; gap: 10px; margin-top: 22px; }
.checkout-actions > * { flex: 1; }

.confirm-detail { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.confirm-detail dt { font-weight: 800; font-size: .82rem; color: var(--muted); }
.confirm-detail dd { margin: 2px 0 12px; }
.confirm-detail dd:last-child { margin-bottom: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
  .hero-mark { width: 150px; }
}
@media (max-width: 760px) {
  .rules-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .nav { padding: 8px 5%; }
  .nav nav { gap: 14px; }
  .nav nav a[href="#about"] { display: none; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-card { max-height: 94vh; border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .checkout-actions { flex-direction: column-reverse; }
}
@media (max-width: 380px) {
  .nav nav a { display: none; }
}

/* ---------- multi-page additions ---------- */
.centered-link { margin-top: 26px; }

/* The ordering page repeats the rules block on cream instead of black,
   so two dark bands don't stack on one screen. */
.rules-grid.light { margin-top: 0; }
.rules-grid.light li { border-color: var(--line); background: var(--card); }
.rules-grid.light strong { color: var(--ink); }
.rules-grid.light p { color: var(--muted); }

.inverse-link { color: var(--lilac); }
.inverse-link:hover { color: #fff; }

.section.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.section.split h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section.split p { color: var(--muted); }

.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.plain-list li:first-child { border-top: 0; padding-top: 0; }

.zip-list {
  font-variant-numeric: tabular-nums; background: var(--glaze);
  border-radius: 12px; padding: 14px 16px; color: var(--text) !important;
}

.about h3 { font-size: 1.1rem; margin: 30px 0 6px; font-weight: 800; }
.section a { color: var(--crust); }
.section a.button { color: inherit; }
[aria-current="page"] { color: var(--crust) !important; text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 760px) {
  .section.split { grid-template-columns: 1fr; gap: 34px; }
}

/* ============================================================
   Photo-forward pass — dark chrome, full-bleed product shots,
   pill buttons, a promo marquee. The structure borrows from
   late-night cookie delivery sites; the palette stays Rea's.
   ============================================================ */

body { background: var(--cream); }

/* --- dark sticky header --- */
.nav {
  background: rgba(0, 0, 0, .92);
  border-bottom: 0;
}
.nav nav a { color: var(--cream); }
.nav nav a:hover { color: var(--lilac); }
.cart-button { background: var(--cake); color: #fff; padding: 11px 18px; }
.cart-button span { background: #fff; color: var(--cake); }
[aria-current="page"] { color: var(--lilac) !important; text-decoration-color: var(--lilac); }

/* --- hero --- */
.hero {
  background: #000;
  color: var(--cream);
  align-items: center;
  gap: 40px;
  padding: clamp(36px, 5vw, 64px) 7% clamp(44px, 6vw, 72px);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.hero h1 em {
  display: block; font-style: normal; color: var(--lilac);
}
.hero-copy { color: #E7E1F2; }
.kicker {
  margin: 0 0 10px; font-weight: 800; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--lilac);
}
.hero-media { position: relative; flex: 1; min-width: 0; }
.hero-shot {
  width: 100%; height: auto; display: block;
  border-radius: 22px; object-fit: cover; aspect-ratio: 16 / 10;
}
.hero-clip {
  position: absolute; right: -14px; bottom: -28px;
  width: 30%; max-width: 180px; border-radius: 16px;
  border: 5px solid #000; object-fit: cover; aspect-ratio: 9 / 16;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.button.ghost {
  background: transparent; color: var(--cream); border-color: var(--cream);
}
.button.ghost:hover { background: rgba(255, 255, 255, .12); }
.hero .button { border-radius: 999px; padding: 15px 26px; }
.hero .button.primary { background: var(--cake); color: #fff; border-color: var(--cake); }
.hero .button.primary:hover { background: #76169F; }

/* --- marquee --- */
.marquee {
  background: var(--cake); color: #fff; overflow: hidden;
  padding: 11px 0; font-weight: 800; font-size: .92rem;
  border-top: 3px solid #000; border-bottom: 3px solid #000;
}
.marquee-track {
  display: flex; gap: 42px; width: max-content;
  animation: slide 26s linear infinite;
}
.marquee-track span { white-space: nowrap; }
.marquee-track span::after { content: " ✦"; opacity: .6; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; padding: 0 7%; }
}

/* --- product cards --- */
.menu-grid { gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  padding: 0; overflow: hidden; border: 2px solid #000; border-radius: 20px;
  box-shadow: 0 10px 0 -4px rgba(0, 0, 0, .12);
}
.card-media { position: relative; background: var(--peach); }
.card .shot {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
}
.card .shot.placeholder {
  display: grid; place-items: center; font-size: 3rem;
  background: linear-gradient(140deg, var(--peach), var(--glaze));
}
.price-chip, .vegan-chip {
  position: absolute; top: 12px; font-weight: 800; font-size: .88rem;
  padding: 6px 12px; border-radius: 999px; border: 2px solid #000;
}
.price-chip { right: 12px; background: #000; color: #fff; }
.vegan-chip { left: 12px; background: var(--cream); color: #000; }
.card-body { padding: 18px 18px 20px; }
.card-body h3 { margin: 0 0 6px; font-size: 1.22rem; }
.card-body p { margin-bottom: 16px; }
.full-add { width: 100%; border-radius: 999px; }
.in-cart { border-radius: 999px; }
.card .thumb, .card .tag, .card .price { display: none; }

/* --- category chips --- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  border: 2px solid #000; background: transparent; color: #000;
  border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 800;
  font-size: .9rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: #000; color: #fff; }

/* --- misc alignment with the darker chrome --- */
.footer { background: #000; color: #CFC6E6; border-top: 0; }
.footer a { color: var(--lilac); }
.drawer-header { background: #000; }
.drawer-header h2 { color: var(--lilac); }
.button { border-radius: 999px; }
.section h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; text-align: left; }
  .hero-media { margin-top: 8px; }
  .hero-clip { width: 34%; right: 8px; bottom: -18px; }
}
@media (max-width: 760px) {
  .hero-clip { max-width: 120px; }
}

/* ---------- two locations ---------- */
.location-switch {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); margin-left: auto;
}
.location-switch button {
  border: 0; background: transparent; color: var(--cream);
  font: inherit; font-weight: 700; font-size: .85rem;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.location-switch button[aria-pressed="true"] { background: var(--cake); color: #fff; }

.link-button {
  border: 0; background: none; color: var(--lilac); font: inherit; font-weight: 800;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 0;
  margin-top: 10px;
}
body.no-cart .full-add { background: transparent; color: #000; }
body.no-cart .full-add:hover { background: rgba(0, 0, 0, .07); }

.catering-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.catering-shot { width: 100%; height: auto; border-radius: 20px; border: 2px solid #000; }
.catering-grid h3 { font-size: 1.05rem; font-weight: 800; margin: 26px 0 8px; }
.catering-grid h3:first-child { margin-top: 0; }
.steps { padding-left: 20px; color: var(--muted); }
.steps li { margin-bottom: 8px; }

@media (max-width: 860px) {
  .catering-grid { grid-template-columns: 1fr; gap: 26px; }
  .nav { flex-wrap: wrap; row-gap: 10px; }
  .location-switch { order: 3; width: 100%; justify-content: center; margin-left: 0; }
}

/* ---------- about ---------- */
.kicker.dark { color: var(--crust); }
.about .lede {
  font-size: 1.15rem; line-height: 1.6; color: var(--text);
  border-left: 4px solid var(--cake); padding-left: 18px; margin: 18px 0 8px;
}
.about .button { margin: 4px 8px 4px 0; }

.catering-media { margin: 0; }
.catering-media video { width: 100%; aspect-ratio: 9 / 16; max-height: 640px; object-fit: cover; background: #000; }
.catering-media figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }

.footer-slogan { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; text-transform: uppercase; color: var(--lilac); margin: 0 0 6px; line-height: 1.2; }
.about-slogan { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: 1rem; color: var(--crust); margin: -4px 0 6px; }

.soldout.pending { color: var(--crust); }


/* ---------- wordmark logo ---------- */
.hero-wordmark { width: min(420px, 78%); height: auto; display: block; margin-bottom: 18px; }
.footer-mark { height: 44px; width: auto; display: block; margin-bottom: 14px; opacity: .9; }

@media (max-width: 760px) {
  .brand img { height: 34px; }
  .brand { gap: 8px; }
  .brand-name { font-size: .8rem; padding-left: 8px; letter-spacing: .04em; white-space: normal; max-width: 7ch; }
  .hero-wordmark { width: min(300px, 82%); }
}
@media (max-width: 380px) {
  .brand img { height: 30px; }
  .brand-name { display: none; }   /* no room beside the cart button */
}
