/* Wrapped website.
   Direction: the page is the object (tasteskill, seed 395301006). Every section is a piece of Wrapped's
   stationery: the card tucked in the box, a delivery slip, a coupon, a gift tag. Brand colours and faces
   are kept from the Instagram: blush paper, burgundy ink, a script wordmark, a soft serif.
   One radius on the whole site: square. One button shape: a filled rectangle. */

:root {
  --blush: #f8d8dd;        /* the ground of the brand */
  --blush-deep: #efc3ca;   /* one step down, for wells on blush */
  --paper: #ffffff;        /* the card */
  --petal: #fcecef;        /* a tone off paper */
  --ink: #3b1e25;          /* text */
  --soft: #6a4a52;         /* secondary text, 6.4:1 on white, 4.9:1 on blush */
  --wine: #8b2a3a;         /* the accent: actions, prices, the wordmark */
  --wine-dark: #6e1f2c;
  --rose: #b73a4c;
  --gold: #d9a441;
  --ok: #24653f;
  --bad: #b3261e;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;

  /* Five type steps. */
  --t-hero: clamp(40px, 6.2vw, 92px);
  --t-big: clamp(32px, 4.2vw, 60px);
  --t-mid: clamp(24px, 2.4vw, 34px);
  --t-body: 17px;
  --t-small: 14px;

  --margin: clamp(16px, 4vw, 56px);
  --gap: 24px;
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }
::selection { background: var(--wine); color: var(--paper); }
.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; }
.num { font-variant-numeric: tabular-nums; }
.wrap { padding-left: var(--margin); padding-right: var(--margin); }
.skip { position: absolute; left: 8px; top: -60px; background: var(--wine); color: var(--paper); padding: 10px 14px; z-index: 50; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 600; line-height: 0.98; letter-spacing: -0.015em; }
h1.display { font-size: var(--t-hero); }
h2.display { font-size: var(--t-big); }
h3 { font-family: var(--display); font-weight: 600; font-size: var(--t-mid); line-height: 1.1; }
.lede { font-size: 19px; line-height: 1.5; max-width: 40ch; }
.soft { color: var(--soft); }
.script { font-family: var(--script); font-weight: 400; }
.price { font-family: var(--text); font-weight: 600; color: var(--wine); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; background: var(--wine); color: var(--paper); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background 160ms var(--ease), transform 120ms var(--ease); }
.btn:hover { background: var(--wine-dark); }
.btn:active { transform: translateY(1px); }
.btn.quiet { background: var(--blush); color: var(--ink); }
.btn.quiet:hover { background: var(--blush-deep); }
.btn.paper { background: var(--paper); color: var(--wine); }
.btn.paper:hover { background: var(--petal); }
.btn[disabled], .btn[aria-disabled="true"] { background: #e9dfe1; color: #6a5a5e; cursor: not-allowed; }
.link { color: var(--wine); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { color: var(--wine-dark); }

/* ---------- header ---------- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; background: var(--paper); transition: background 200ms var(--ease); }
.bar.on-blush { background: var(--blush); }
.wordmark { font-family: var(--script); font-size: 38px; line-height: 1; color: var(--wine); text-decoration: none; padding-top: 6px; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color 160ms var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--wine); }
.bar-end { display: flex; gap: 6px; align-items: center; }
.icon-link { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; text-decoration: none; background: none; border: 0; cursor: pointer; color: var(--ink); gap: 6px; }
.icon-link:hover { color: var(--wine); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cart-count { min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; background: var(--wine); color: var(--paper); font-size: 13px; font-variant-numeric: tabular-nums; }
.cart-count.bump { animation: bump 400ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }
.menu-btn { display: none; }
.sheet-nav { display: none; }

/* ---------- footer: the back of the card ---------- */
.foot { background: var(--wine); color: var(--paper); padding-top: 72px; padding-bottom: 40px; overflow: hidden; }
.foot-name { font-family: var(--script); font-size: clamp(96px, 22vw, 340px); line-height: 0.9; color: var(--blush); margin-bottom: 64px; }
.foot-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.foot-places { grid-column: 1 / span 5; display: grid; gap: 6px; }
.foot-places a { font-family: var(--display); font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; text-decoration: none; color: var(--paper); }
.foot-places a:hover { color: var(--blush); }
.foot-links { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); font-size: 15px; }
.foot-links h2 { font-family: var(--text); font-size: 15px; font-weight: 600; color: var(--blush); margin-bottom: 10px; }
.foot-links li { margin-bottom: 8px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 96px; font-size: 14px; color: #f3d3d9; }
.foot-legal a { color: #f3d3d9; }
.credits { max-width: 68ch; font-size: 16px; line-height: 1.6; }

/* ---------- drawn boxes ---------- */
.plate { background: var(--blush); display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; }
.plate svg { width: 78%; height: auto; }
.plate img.photo { width: 100%; height: 100%; object-fit: cover; }
.plate.petal { background: var(--petal); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: var(--t-small); color: var(--soft); }
.field .err { font-size: var(--t-small); color: var(--bad); font-weight: 500; min-height: 0; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], select, textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #c9b3b8; background: var(--paper); font-size: 16px; border-radius: 0; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--wine); flex: none; }

/* Chips: the date and choice buttons, square like everything else. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; padding: 6px 16px; border: 0; background: var(--petal); cursor: pointer; text-align: left; line-height: 1.2; transition: background 140ms var(--ease); }
.chip small { display: block; font-size: 13px; color: var(--soft); }
.chip:hover { background: var(--blush); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--wine); color: var(--paper); }
.chip[aria-pressed="true"] small, .chip[aria-checked="true"] small { color: #f6d9de; }
.chip[disabled] { color: #8a7a7e; background: #f4eff0; cursor: not-allowed; text-decoration: line-through; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 14px 18px; z-index: 60; max-width: calc(100vw - 32px); display: flex; gap: 16px; align-items: center; }
.toast a { color: var(--blush); font-weight: 600; }

/* ---------- entrances (only when motion is welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
  .js [data-rise].in { opacity: 1; transform: none; }
}

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .wordmark { font-size: 32px; }
  .sheet-nav { position: fixed; inset: 68px 0 0 0; background: var(--blush); z-index: 29; padding: 24px var(--margin); }
  .sheet-nav.open { display: grid; align-content: start; gap: 4px; }
  .sheet-nav a { font-family: var(--display); font-size: 34px; font-weight: 600; text-decoration: none; padding: 8px 0; }
  .foot-row { grid-template-columns: 1fr; }
  .foot-places, .foot-links { grid-column: 1 / -1; }
  .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-legal { margin-top: 56px; }
  .lede { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
.plate.deep { background: var(--wine-dark); }
.plate.photo-plate { background: #eeeeee; }
.phone-only { display: none !important; }
@media (max-width: 900px) {
  .wide-only { display: none !important; }
  .phone-only { display: inline-flex !important; }
}
input, select, textarea, .chips, [id$="-err"] { scroll-margin-top: calc(var(--head) + 24px); }

/* ---------- masthead: bar, deliver-to, category row (Presentail-style separation) ---------- */
:root { --head: 112px; }
.masthead { position: sticky; top: 0; z-index: 30; background: var(--paper); }
.masthead .bar { position: static; height: 68px; }
.deliver { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; border: 0; background: var(--petal); cursor: pointer; text-align: left; margin-right: auto; margin-left: 28px; max-width: 340px; transition: background 160ms var(--ease); }
.deliver:hover { background: var(--blush); }
.deliver small { display: block; font-size: 13px; color: var(--soft); line-height: 1.1; }
.deliver b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cats { background: var(--blush); }
.cats-row { display: flex; gap: 28px; height: 44px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cats-row a { text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; padding: 10px 0; border-bottom: 2px solid transparent; flex: none; }
.cats-row a:hover, .cats-row a[aria-current="page"] { border-bottom-color: var(--wine); color: var(--wine); }
.deliver-sheet { border: 0; padding: 28px; width: min(480px, calc(100vw - 24px)); color: var(--ink); }
.deliver-sheet::backdrop { background: rgba(59, 30, 37, 0.45); }
.dlv-form { display: grid; gap: 20px; }
.dlv-form h2 { font-family: var(--display); font-size: var(--t-mid); font-weight: 600; color: var(--wine); }
.dlv-actions { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 900px) {
  :root { --head: 104px; }
  .masthead .bar { height: 60px; }
  .deliver { margin-left: 10px; padding: 4px 10px; min-height: 44px; max-width: 52vw; }
  .deliver svg { display: none; }
  .deliver b { font-size: 14px; max-width: 46vw; }
  .cats-row { gap: 22px; }
  .sheet-nav { inset: var(--head) 0 0 0; overflow-y: auto; }
}

@media (max-width: 900px) {
  .wordmark { font-size: 28px; }
  .bar-end { margin-right: -6px; gap: 0; }
  .icon-link { min-width: 42px; padding: 0 6px; }
  .deliver { margin-left: 8px; padding: 4px 8px; max-width: 46vw; }
  .deliver b { font-size: 13px; max-width: 40vw; }
}
.phone { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid #c9b3b8; background: var(--paper); }
.phone:focus-within { outline: 3px solid var(--wine); outline-offset: 2px; }
.phone select, .phone input { border: 0; min-height: 50px; border-radius: 0; background-color: transparent; outline: none; }
.phone select { -webkit-appearance: none; appearance: none; padding: 0 30px 0 14px; font-weight: 600; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
  background: var(--petal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238b2a3a' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center; }
.phone input { padding-left: 12px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.phone:has(input[aria-invalid="true"]) { border-color: var(--bad); }
