/* ==========================================================================
   PUR BAR — storefront styles
   Palette, photography and wordmark are fixed brand assets.
   Every colour pair used for text meets WCAG AA; see the notes inline.
   ========================================================================== */

/* --- Work Sans, self-hosted variable font ------------------------------- */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/worksans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/worksans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/worksans-viet.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
                 U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
                 U+0329, U+1EA0-1EF9, U+20AB;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  --cream:      #FBF4EC;
  --tint:       #F3E4D6;
  --deep:       #2E211A;
  --accent:     #C24C64;
  --accent-ink: #B84157;
  --border:     #EAD9C6;

  --ink:        #3B2A22;
  --ink-2:      #5C493E;
  --muted:      #7A6857;   /* 5.32:1 on white — safe for body text        */
  --field:      #8A7768;   /* 3.02:1 on white — safe for control borders  */
  --on-dark:    #F3E7DA;
  --on-dark-2:  #C9B7A6;   /* 8.01:1 on --deep                            */
  --on-accent:  #FFFFFF;   /* 4.65:1 on --accent; cream was 4.27:1        */

  --ok:         #1F6B4F;
  --err:        #A3283F;   /* 6.05:1 on white                             */

  --shell:      1240px;
  --gutter:     clamp(1.25rem, 5vw, 4rem);
  --radius:     8px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* The UA rule for [hidden] is `display: none`, which ANY author `display`
   declaration outranks — `.co-grid { display: grid }` silently defeated it and
   left the order form on screen underneath the confirmation. Author-level and
   !important so the attribute always means hidden. */
[hidden] { display: none !important; }

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

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

/* height:auto is load-bearing — an HTML `height` attribute is a presentational
   hint that otherwise beats CSS `aspect-ratio` and stretches the box. */
img { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--deep); color: var(--on-dark);
  padding: .75rem 1.25rem; z-index: 300; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; top: 0; }

/* Visually hidden. Declared !important because it is a utility that must
   win over component rules such as `.news__form input { width: 100% }`. */
.vh {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  min-height: 0 !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important;
}

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* --- Typography --------------------------------------------------------- */
h1, h2, h3 { line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; color: var(--deep); }
h1 { font-size: clamp(2.1rem, 7vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 4.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  font-size: .8125rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-ink);
}

.lede { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); max-width: 46ch; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.6rem;
  font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--dark { background: var(--deep); color: var(--on-dark); }
.btn--dark:hover { background: #1D140F; }
.btn--outline { background: transparent; border-color: currentColor; }
.btn--outline:hover { background: rgba(255,255,255,.1); }
.btn--full { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* --- Announcement ------------------------------------------------------- */
.announce {
  background: var(--deep); color: var(--on-dark);
  text-align: center; padding: .7rem var(--gutter);
  font-size: .8125rem; letter-spacing: .03em;
}

/* --- Header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream); border-bottom: 1px solid var(--border);
}
.site-head__inner {
  display: flex; align-items: center; gap: 1rem;
  padding-block: .85rem; min-height: 68px;
}
.brand { flex: 0 0 auto; }
.brand img { height: 44px; width: auto; }

.nav { display: none; margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 500; font-size: 1rem;
  padding: .6rem .25rem; letter-spacing: .02em;
}
.nav a:hover { color: var(--accent-ink); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px;
  background: none; border: 0; cursor: pointer; border-radius: var(--radius);
}
.icon-btn:hover { background: var(--tint); }

.currency {
  min-height: 48px; padding: 0 .9rem;
  background: none; border: 1px solid var(--field); border-radius: var(--radius);
  font-size: .9375rem; font-weight: 500; cursor: pointer;
}
.currency:hover { border-color: var(--deep); }

.cart-count {
  position: absolute; top: 5px; right: 5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: var(--on-accent);
  font-size: .6875rem; font-weight: 700; line-height: 20px;
  border-radius: 10px; text-align: center;
}
.cart-count[hidden] { display: none; }

/* --- Mobile menu -------------------------------------------------------- */
.menu-panel {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--cream);
  padding-block: .5rem 1rem;
}
.menu-panel.is-open { display: block; }
.menu-panel a {
  display: block; padding: .85rem .25rem;
  text-decoration: none; font-size: 1.0625rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.menu-panel a:last-child { border-bottom: 0; }

@media (min-width: 860px) {
  .nav { display: flex; gap: 2.25rem; align-items: center; }
  .head-actions { margin-left: 2.25rem; }
  .menu-toggle, .menu-panel { display: none !important; }
  .brand img { height: 52px; }
}

/* --- Hero --------------------------------------------------------------- */
.hero { display: grid; gap: 0; }
.hero__text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
  padding: 3rem var(--gutter) 3.25rem;
  max-width: var(--shell); margin-inline: auto; width: 100%;
}
.hero__price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  font-size: 1.0625rem; color: var(--ink-2);
}
.hero__price b { font-size: 1.375rem; font-weight: 600; color: var(--deep); }
.hero__media { min-height: 320px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero__text { padding-block: 4.5rem; justify-content: center; margin-inline: 0; padding-left: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter))); }
  .hero__media { min-height: 620px; }
  .hero__media img { height: 100%; aspect-ratio: auto; }
}

/* --- Trust bar ---------------------------------------------------------- */
.trust {
  background: var(--deep);
  padding-block: 1.4rem;
}
.trust ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem;
}
/* A grid, not centred flex: centring each item independently put the four
   ticks at four different x positions once a label wrapped to two lines. */
.trust li {
  display: grid; grid-template-columns: 1rem 1fr; gap: .55rem;
  align-items: start;
  color: var(--on-dark); font-size: .75rem; letter-spacing: .05em;
  text-transform: uppercase; text-align: left; line-height: 1.35;
}
.trust svg { color: #E2A2AE; margin-top: .12em; }
@media (min-width: 760px) {
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .trust li { font-size: .8125rem; justify-content: center; grid-template-columns: 1rem auto; }
}

/* --- Sections ----------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section__head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head h2 { margin-top: .6rem; }

/* --- Product grid ------------------------------------------------------- */
.grid {
  display: grid; gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
/* Five products in an auto-fill grid land 4 + 1 orphan on a wide screen.
   Pin it to five across so the whole collection reads as one row. */
@media (min-width: 1080px) {
  .grid { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
}

/* Full height + auto margin on the foot keeps price and button on one line
   across the row even when a description wraps to two lines. */
.card { display: flex; flex-direction: column; gap: 1rem; min-width: 0; height: 100%; }

/* Square, not portrait: the bar is a horizontal object, so a square frame
   gives it more of the card and takes ~600px off the phone page. */
.card__media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--radius); background: var(--tint);
  box-shadow: 0 2px 12px rgba(59,42,34,.08);
}
.card__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.card__media img + img { opacity: 0; transition: opacity .3s ease; }
.card:hover .card__media img + img,
.card:focus-within .card__media img + img { opacity: 1; }

.card__body { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.card__desc { font-size: .9375rem; color: var(--muted); }
/* --muted is 5.32:1 on white but only 4.28:1 on --tint, so the bundle
   panel steps up to --ink-2 (6.80:1). */
.bundle .card__desc { color: var(--ink-2); }
.card__meta { font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }
.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: auto; padding-top: .6rem; flex-wrap: wrap;
}
.price { font-size: 1.125rem; font-weight: 600; color: var(--deep); }

/* --- Bundle ------------------------------------------------------------- */
.bundle {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--tint); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.bundle__media { border-radius: var(--radius); overflow: hidden; }
.bundle__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bundle__cta { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.bundle__price { font-size: 1.5rem; font-weight: 600; color: var(--deep); }
.badge {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 100px;
}
@media (min-width: 760px) {
  .bundle { grid-template-columns: 280px 1fr auto; gap: 2.5rem; }
  .bundle__cta { align-items: flex-end; text-align: right; }
}

/* --- Story -------------------------------------------------------------- */
.story { background: var(--cream); }
.story__inner { display: grid; gap: 2rem; align-items: center; }
.story__inner img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.story__text { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.story__text p { color: var(--ink-2); max-width: 52ch; }
/* On the tint background --accent-ink measures 4.29:1, just under AA.
   Dark ink for the text (10.9:1) with the accent kept on the underline. */
.story__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--ink);
  border-bottom: 2px solid var(--accent); text-decoration: none; padding-bottom: 2px;
}
.story__link:hover { border-bottom-color: var(--deep); }
@media (min-width: 860px) { .story__inner { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* --- Newsletter --------------------------------------------------------- */
.news { background: var(--deep); color: var(--on-dark); text-align: center; }
.news h2 { color: var(--on-dark); }
.news p { color: var(--on-dark-2); }
.news__inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.news__form {
  display: flex; flex-direction: column; gap: .75rem;
  width: 100%; max-width: 440px; margin-top: .5rem; text-align: left;
}
.news__form label { font-size: .875rem; color: var(--on-dark-2); }
.news__form input {
  width: 100%; min-height: 48px; padding: .75rem 1rem;
  border: 1px solid var(--on-dark-2); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.news .btn--outline { color: var(--on-dark); }
@media (min-width: 560px) {
  .news__row { display: flex; gap: .75rem; }
  .news__row input { flex: 1; }
  .news__row .btn { flex: 0 0 auto; }
}

/* --- Footer ------------------------------------------------------------- */
.site-foot { background: var(--deep); color: var(--on-dark); padding-block: 3.5rem 2rem; }
.site-foot__grid {
  display: grid; gap: 2.25rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid #4A3A2E;
}
.site-foot h2 { font-size: 1.375rem; color: var(--on-dark); }
.site-foot p { color: var(--on-dark-2); font-size: .9375rem; max-width: 34ch; }
.site-foot h3 {
  font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase;
  color: #E2A2AE; font-weight: 600;
}
.site-foot ul { list-style: none; padding: 0; margin: .75rem 0 0; }
.site-foot li + li { margin-top: .25rem; }
.site-foot ul a {
  display: inline-block; padding: .6rem 0; min-height: 44px;
  font-size: .9375rem; text-decoration: none;
}
.site-foot ul a:hover { text-decoration: underline; }
.foot-base {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding-top: 1.75rem; text-align: center;
}
.foot-base small { color: var(--on-dark-2); font-size: .8125rem; }
.pill {
  border: 1px solid #6B5949; border-radius: 4px;
  padding: .4rem .8rem; font-size: .75rem; letter-spacing: .06em;
  color: var(--on-dark); text-transform: uppercase;
}
@media (min-width: 760px) { .site-foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* --- Cart drawer -------------------------------------------------------- */
.cart {
  width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0 0 0 auto; padding: 0; border: 0;
  background: var(--cream); color: var(--ink);
  box-shadow: -12px 0 32px rgba(0,0,0,.15);
}
.cart::backdrop { background: rgba(46,33,26,.45); }
.cart__inner { display: flex; flex-direction: column; height: 100%; }
.cart__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.cart__head h2 { font-size: 1.25rem; }
.cart__body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.cart__empty { text-align: center; color: var(--muted); padding-block: 3.5rem; }

.line { display: flex; gap: 1rem; align-items: flex-start; }
.line + .line { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.line__media {
  flex: 0 0 auto; width: 64px; aspect-ratio: 3 / 4;
  border-radius: 6px; overflow: hidden; background: var(--tint);
}
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.line__name { font-weight: 600; font-size: .9375rem; }
.line__unit { font-size: .8125rem; color: var(--muted); }
.line__total { font-weight: 600; font-size: .9375rem; white-space: nowrap; }

.qty { display: flex; align-items: center; gap: .25rem; margin-top: .35rem; }
.qty button {
  width: 44px; height: 44px;
  border: 1px solid var(--field); background: none; border-radius: 6px;
  font-size: 1.125rem; line-height: 1; cursor: pointer;
}
.qty button:hover { border-color: var(--deep); background: var(--tint); }
.qty output { min-width: 2.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.line__remove {
  align-self: flex-start; margin-top: .35rem;
  background: none; border: 0; padding: .5rem 0; min-height: 44px;
  color: var(--accent-ink); font-size: .875rem; cursor: pointer;
  border-bottom: 1px solid currentColor;
}

.cart__foot { padding: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.cart__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cart__row--total { font-size: 1.0625rem; font-weight: 600; }
.cart__ship { font-size: .875rem; color: var(--muted); }

/* --- Toast -------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--deep); color: var(--on-dark);
  padding: .85rem 1.5rem; border-radius: var(--radius);
  font-size: .9375rem; font-weight: 500; z-index: 250;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-width: calc(100vw - 2rem);
}
.toast[hidden] { display: none; }

/* --- Checkout ----------------------------------------------------------- */
/* Left inset uses the same expression as .co-form-col so the logo and the
   first form field sit on exactly the same line. Deriving both from one
   formula avoids the ~7px drift you get comparing 100vw against .shell,
   which centres on clientWidth and so excludes the scrollbar. */
.co-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .9rem; border-bottom: 1px solid var(--border);
  padding-inline: var(--gutter);
}
@media (min-width: 900px) {
  .co-head {
    padding-inline: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)))
                    var(--gutter);
  }
}
/* flex-start, not center: the 44px minimum touch target is kept, but the
   wordmark sits flush on the padding edge so it lines up with the form. */
.co-head a {
  display: inline-flex; align-items: center; justify-content: flex-start;
  min-height: 44px; min-width: 44px;
}
.co-head img { height: 36px; width: auto; }
.co-head span { font-size: .8125rem; color: var(--muted); }

.co-grid { display: grid; gap: 0; align-items: start; }
@media (min-width: 900px) {
  /* Form on the left, summary rail on the right. The DOM keeps the summary
     first so it stacks above the form on a phone; `order` flips it here only. */
  .co-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: stretch; }
  .summary      { order: 2; }
  .co-form-col  { order: 1; border-right: 1px solid var(--border); }
}

.co-form-col { padding: 2rem var(--gutter) 3.5rem; min-width: 0; }
/* Keep the fields at a readable measure instead of stretching to the window. */
.co-form-col form { max-width: 34rem; }
@media (min-width: 900px) {
  /* Left padding matches the header's .shell inset so the form starts directly
     under the logo rather than at the window edge. */
  .co-form-col {
    padding: 2.75rem clamp(2rem, 4vw, 4rem) 4rem
             max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  }
}

/* Summary: a tappable bar on phones, a panel on desktop */
.summary { background: var(--tint); min-width: 0; }
.summary__toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem var(--gutter); min-height: 56px;
  background: var(--tint); border: 0; border-bottom: 1px solid var(--border);
  cursor: pointer; text-align: left; font-size: .9375rem; font-weight: 600;
}
.summary__toggle .chev { transition: transform .2s ease; }
.summary__toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.summary__panel { padding: 1.25rem var(--gutter) 1.5rem; }
.summary__panel[hidden] { display: none; }
.summary__lines { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.summary__rows { border-top: 1px solid var(--border); padding-top: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; color: var(--ink-2); }
.summary__row--total {
  font-size: 1.125rem; font-weight: 700; color: var(--deep);
  border-top: 1px solid var(--border); padding-top: .85rem; margin-top: .35rem;
}
.summary__row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary__row--off span:last-child { color: var(--ok); }

/* --- Discount code ------------------------------------------------------ */
.promo {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .5rem;
}
.promo__label { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.promo__row { display: flex; gap: .6rem; align-items: stretch; }
.promo__row input {
  flex: 1; min-width: 0; min-height: 48px; padding: .7rem .9rem;
  border: 1px solid var(--field); border-radius: var(--radius);
  background: #fff; text-transform: uppercase; letter-spacing: .04em;
}
.promo__row input::placeholder { color: var(--muted); text-transform: none; letter-spacing: 0; }
.promo__row input:focus { border-color: var(--deep); }
/* 1px, matching the input beside it — the .btn default of 2px reads as heavy
   next to a form field. */
.promo__row .btn {
  flex: 0 0 auto; padding-inline: 1.1rem; color: var(--ink);
  border-width: 1px; border-color: var(--field);
}
.promo__row .btn:hover { background: rgba(59, 42, 34, .06); border-color: var(--deep); }

.promo__msg { font-size: .8125rem; line-height: 1.5; }
.promo__msg:empty { display: none; }
.promo__msg[data-state="ok"]  { color: var(--ok); }
.promo__msg[data-state="bad"] { color: var(--err); }

.promo__clear {
  align-self: flex-start; background: none; border: 0; padding: .4rem 0;
  min-height: 44px; font-size: .8125rem; color: var(--accent-ink);
  border-bottom: 1px solid currentColor; cursor: pointer;
}

@media (min-width: 900px) {
  /* Full-height rail pinned to the viewport, scrolling on its own when the
     bag is long, so the total stays in view for the whole form. */
  .summary {
    position: sticky; top: 0; align-self: stretch;
    height: 100dvh; overflow-y: auto;
  }
  .summary__toggle { display: none; }
  .summary__panel { display: block !important; padding: 2rem clamp(1.25rem, 2vw, 1.75rem); }
  .summary__panel[hidden] { display: block !important; }
}

/* --- Forms -------------------------------------------------------------- */
fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend { font-size: 1.0625rem; font-weight: 700; color: var(--deep); padding: 0 0 .85rem; }

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field label { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.field .opt { color: var(--muted); font-weight: 400; }

.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  border: 1px solid var(--field); border-radius: var(--radius);
  background: #fff;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { border-color: var(--deep); }

.field .hint { font-size: .8125rem; color: var(--muted); }

.field--bad input, .field--bad textarea { border-color: var(--err); border-width: 2px; }
.err { font-size: .8125rem; font-weight: 500; color: var(--err); }
.err:empty { display: none; }

.row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .row--2 { grid-template-columns: 1fr 1fr; } }

.check { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; padding: .5rem 0; min-height: 44px; }
.check input { flex: 0 0 auto; width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--accent); }
.check span { font-size: .9375rem; color: var(--ink-2); }

.pay-method {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem; border: 2px solid var(--accent); background: #FBF0F1;
  border-radius: var(--radius); font-weight: 500;
}
.pay-method svg { color: var(--accent-ink); flex: 0 0 auto; }

.form-status { margin-top: 1rem; }
.form-status:empty { display: none; }
.form-status[data-state="error"] {
  color: var(--err); font-size: .9375rem; font-weight: 500;
  border-left: 3px solid var(--err); padding-left: .85rem;
}

/* --- Confirmation ------------------------------------------------------- */
.done { max-width: 560px; margin-inline: auto; padding-block: clamp(3rem, 8vw, 5rem); }
.done__tick {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
}
.done h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin-bottom: .75rem; }
.done > p { color: var(--ink-2); margin-bottom: 1.75rem; }
.done__facts {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; padding: 1.25rem; margin-bottom: 1.75rem;
}
.done__facts dl { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.25rem; margin: 0; }
.done__facts dt { font-size: .875rem; color: var(--muted); }
.done__facts dd { margin: 0; font-size: .9375rem; font-weight: 500; }
.done__facts dd ul { list-style: none; padding: 0; margin: 0; }
.done__note {
  background: var(--tint); border-radius: var(--radius);
  padding: 1rem 1.25rem; font-size: .9375rem; color: var(--ink-2); margin-bottom: 1.75rem;
}

/* --- Motion ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
