/* ==========================================================================
   Whimwhirl Confections — main stylesheet
   Handmade candy shop · Minneapolis, MN
   ========================================================================== */

:root {
  --cream: #faf5ee;
  --paper: #fffdf9;
  --ink: #241a33;
  --muted: #7a6f84;
  --berry: #a6305f;
  --berry-d: #8a2450;
  --plum: #573d85;
  --plum-d: #46306b;
  --gold: #c9a227;
  --line: #e8dcc8;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(36, 26, 51, .08);
  --shadow-lg: 0 18px 50px rgba(36, 26, 51, .14);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 700;
}

p { margin: 0 0 1em; }

a { color: var(--berry-d); }
a:hover { color: var(--plum); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

:focus-visible {
  outline: 3px solid rgba(87, 61, 133, .35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn--solid { background: var(--plum); color: #fff; }
.btn--solid:hover { background: var(--plum-d); color: #fff; transform: translateY(-1px); }
.btn--berry { background: var(--berry); color: #fff; }
.btn--berry:hover { background: var(--berry-d); color: #fff; transform: translateY(-1px); }
.btn--ghost { border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }
.btn--dark-ghost { border-color: var(--ink); color: var(--ink); }
.btn--dark-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 245, 238, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--berry-d); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: .95rem;
}
.site-nav a:hover { color: var(--berry-d); }
.site-nav .nav-cta { margin-left: 4px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(330px, 86vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    background: var(--paper);
    padding: 84px 26px 32px;
    box-shadow: -14px 0 44px rgba(36, 26, 51, .2);
    transform: translateX(106%);
    transition: transform .26s ease;
  }
  .site-header.nav-open .site-nav { transform: none; }
  .site-nav a { font-size: 1.05rem; padding: 8px 0; width: 100%; }
  .site-nav .nav-cta { margin: 14px 0 0; width: 100%; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 62vh;
  display: flex;
  align-items: center;
}
.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(36, 26, 51, .30) 0%, rgba(36, 26, 51, .55) 60%, rgba(36, 26, 51, .82) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(90px, 15vh, 170px) 24px clamp(80px, 12vh, 140px);
  text-align: center;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  margin-bottom: .45em;
}
.hero__lead {
  max-width: 620px;
  margin: 0 auto 2em;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: rgba(255, 255, 255, .92);
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--plum) 0%, var(--ink) 100%);
  color: #fff;
  padding: clamp(56px, 9vh, 100px) 0;
}
.page-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 14px;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 14ch; }
.page-hero p { max-width: 56ch; color: rgba(255, 255, 255, .88); margin-bottom: 0; }

/* ---------- Eyebrow / section scaffolding ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--berry);
  margin-bottom: 12px;
}
.section { padding: clamp(56px, 8vh, 96px) 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #f4eee9; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: 44px; }
.section__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.lead { font-size: 1.12rem; color: var(--muted); }
.section--ink .lead { color: rgba(244, 238, 233, .82); }
.text-center { text-align: center; }
.text-center .section__head { margin-left: auto; margin-right: auto; }

/* ---------- Tagline strip ---------- */
.tagline-strip {
  background: var(--berry);
  color: #fff;
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
}
.tagline-strip__track {
  display: inline-flex;
  gap: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
}
.tagline-strip__track span { display: inline-flex; align-items: center; gap: 48px; }
.tagline-strip__track::before,
.tagline-strip__track::after {
  content: "✦";
  color: var(--gold);
  font-style: normal;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.3rem; }
.card__title a { text-decoration: none; color: var(--ink); }
.card__title a:hover { color: var(--berry-d); }
.card__excerpt { color: var(--muted); font-size: .97rem; margin-bottom: 1em; }
.card__meta {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .6em;
}

.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 920px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Product blocks (candies page) ---------- */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vh, 72px) 0;
  border-top: 1px solid var(--line);
}
.product:nth-child(even) .product__media { order: 2; }
.product__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.product h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.product__tag {
  display: inline-block;
  background: rgba(166, 48, 95, .12);
  color: var(--berry-d);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.product__story { color: var(--muted); }
.product__flavors {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 0 0 20px;
}
.product__flavors h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--plum); margin-bottom: 8px; }
.product__flavors ul { margin: 0; padding-left: 1.15em; font-size: .95rem; }

@media (max-width: 820px) {
  .product, .product:nth-child(even) .product__media { grid-template-columns: 1fr; }
  .product__media { order: 0 !important; }
}

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Step list (process page) ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
  margin-bottom: clamp(44px, 6vh, 72px);
}
.step:nth-child(even) .step__media { order: 2; }
.step__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step__number {
  counter-increment: step;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--berry);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step__number::before { content: "Step " counter(step) " — "; }
.step h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
@media (max-width: 820px) {
  .step, .step:nth-child(even) .step__media { grid-template-columns: 1fr; }
  .step__media { order: 0 !important; }
}

/* ---------- Note / callout ---------- */
.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.section--ink .note { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); color: #f4eee9; }
.note h3 { font-size: 1rem; margin-bottom: 8px; }
.note p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--berry) 0%, var(--plum) 100%);
  color: #fff;
  text-align: center;
  padding: clamp(56px, 8vh, 90px) 0;
}
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.cta-band p { max-width: 54ch; margin: 0 auto 2em; color: rgba(255, 255, 255, .9); }
.cta-band .hero__cta { justify-content: center; }

/* ---------- Article / journal ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article__back { display: inline-block; margin-bottom: 26px; font-size: .92rem; }
.article__header { margin-bottom: 36px; }
.article__meta {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 18px;
}
.article__meta time { font-weight: 600; color: var(--berry-d); }
.article__lead { font-size: 1.15rem; color: var(--muted); }
.article__media { margin: 34px 0; }
.article__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.article h2 { margin-top: 1.6em; }
.article p:last-child { margin-bottom: 0; }
.article blockquote {
  margin: 34px 0;
  padding: 22px 28px;
  background: var(--paper);
  border-left: 4px solid var(--berry);
  border-radius: var(--radius-sm);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  box-shadow: var(--shadow);
}
.article__related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.article__related h2 { font-size: 1.3rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
details.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 26px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
details.faq summary {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.5rem;
  color: var(--berry);
  line-height: 1;
  flex: none;
}
details.faq[open] summary::after { content: "–"; }
details.faq .faq-answer { margin-top: 12px; color: var(--muted); }
details.faq .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(30px, 5vw, 56px); }
@media (max-width: 920px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-info__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 22px;
}
.contact-info__card h2 { font-size: 1.2rem; }
.contact-info__card ul { list-style: none; padding: 0; margin: 0; }
.contact-info__card li { margin-bottom: 12px; }
.contact-info__card li:last-child { margin-bottom: 0; }
.contact-info__card .label {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- Forms ---------- */
.order-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field--full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.label-optional { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--cream);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(87, 61, 133, .18);
}
textarea { min-height: 130px; resize: vertical; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: #b3261e; }
.field-error {
  display: none;
  color: #b3261e;
  font-size: .84rem;
  margin-top: 6px;
}
.field--invalid .field-error { display: block; }
.form-note { font-size: .86rem; color: var(--muted); margin-top: 14px; }
.form-consent { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.form-consent input { width: auto; margin-top: 5px; }
.form-consent label { font-weight: 400; font-size: .92rem; color: var(--muted); margin: 0; }
.form-success-note {
  display: none;
  background: rgba(76, 124, 60, .12);
  border: 1px solid rgba(76, 124, 60, .4);
  color: #2f5320;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .9rem;
  margin-bottom: 16px;
}
/* Honeypot: hidden from humans, visible to bots */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Thank you page ---------- */
.thanks { max-width: 640px; margin: 0 auto; text-align: center; }
.thanks__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(76, 124, 60, .15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thanks h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.thanks__steps {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin: 26px 0;
}
.thanks__steps ol { margin: 0; padding-left: 1.3em; }
.thanks__steps li { margin-bottom: .6em; }
.thanks__steps p { margin: .6em 0 0; font-size: .9rem; color: var(--muted); }
.thanks__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal h2 { margin-top: 1.8em; font-size: 1.35rem; }
.legal p:last-child, .legal ul:last-child { margin-bottom: 0; }
.legal ul { padding-left: 1.3em; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-bottom: 34px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d8cfe2;
  padding: clamp(52px, 7vh, 80px) 0 28px;
}
.site-footer a { color: #d8cfe2; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr;
  gap: 36px;
  margin-bottom: 44px;
}
.brand--footer { color: #fff; margin-bottom: 14px; }
.brand--footer .brand__name { color: #fff; }
.site-footer p { font-size: .92rem; color: rgba(216, 207, 226, .78); }
.site-footer h2 {
  font-family: var(--sans);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #fff;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; font-size: .94rem; }
.site-footer address { font-style: normal; font-size: .94rem; line-height: 1.7; }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 22px;
  font-size: .84rem;
  color: rgba(216, 207, 226, .65);
}

@media (max-width: 920px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .cta-band, .tagline-strip { display: none; }
}
