@import url('fonts.css');

/* ==========================================================================
   POTOMAC FUR MAMA — design system
   Single stylesheet. Sections, in order:
     1. Tokens         6. Sections        11. Forms
     2. Reset          7. Hero            12. Cart drawer
     3. Typography     8. Product         13. Footer
     4. Layout         9. Accordion       14. Motion & print
     5. Buttons       10. Trust rows
   ========================================================================== */

/* 1. TOKENS ================================================================ */

:root {
  /* Palette — sampled from the brand mockup.
     CONTRAST RULES (measured against WCAG 2.1):
       --moss on --paper = 3.9:1  -> large display headings ONLY (needs 3:1)
       --moss on --stone = 2.9:1  -> NEVER. Use --moss-deep on stone.
       --moss-deep on --paper = 7.7:1, on --cream = 7.1:1, on --stone = 5.7:1 -> safe anywhere
       --ink on --paper = 17.1:1, on --cream = 16.5:1, on --stone = 13.2:1 -> body text */
  --ink: #14140f;
  --ink-soft: #4a4a42;
  --moss: #75853c;
  --moss-deep: #4a5526;
  --cream: #f2f3ce;
  --cream-deep: #e6e8b8;
  --stone: #d8d9d3;
  --stone-soft: #eceded;
  --paper: #fbfbf7;
  --white: #fff;

  --rule: rgba(20, 20, 15, 0.14);
  --rule-light: rgba(255, 255, 255, 0.22);

  /* Type */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-wordmark: clamp(2.75rem, 8.5vw, 7rem);
  --fs-h1: clamp(2.25rem, 5.5vw, 4.25rem);
  --fs-h2: clamp(1.875rem, 3.8vw, 3rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.75rem);
  --fs-body: clamp(0.9375rem, 0.35vw + 0.875rem, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 0.5vw + 0.95rem, 1.25rem);
  --fs-small: 0.8125rem;
  --fs-micro: 0.6875rem;

  /* Spacing */
  --space-2xs: 0.375rem;
  --space-xs: 0.625rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: clamp(3.5rem, 7vw, 6.5rem);
  --space-2xl: clamp(5rem, 11vw, 10rem);

  --wrap: 1280px;
  --wrap-narrow: 720px;
  --radius-pill: 999px;
  --radius-sm: 4px;

  --ease: cubic-bezier(0.4, 0.1, 0.2, 1);
  --dur: 0.32s;

  --header-h: 4.5rem;
}

/* 2. RESET ================================================================= */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-xs) var(--space-md);
  background: var(--ink);
  color: var(--cream);
  font-size: var(--fs-small);
}

.skip-link:focus {
  left: 0;
}

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

/* 3. TYPOGRAPHY ============================================================ */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-sm);
}

em {
  font-style: italic;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
}

/* Small wide-tracked sans label — the nav / eyebrow voice from the mockup */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss-deep);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.9);
}

/* --moss is only ever used at display sizes; see contrast rules in Tokens. */
.t-moss {
  color: var(--moss);
}

.t-moss-deep {
  color: var(--moss-deep);
}

.t-soft {
  color: var(--ink-soft);
}

.t-center {
  text-align: center;
}

/* 4. LAYOUT ================================================================ */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2.5rem, var(--wrap-narrow));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-xl);
}

.section--tight {
  padding-block: var(--space-lg);
}

.section--flush {
  padding-block: 0;
}

.stack > * + * {
  margin-top: var(--space-sm);
}

.stack-lg > * + * {
  margin-top: var(--space-md);
}

/* Asymmetric two-column band — the mockup's dominant layout */
.split {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

.split__pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) clamp(1.25rem, 4vw, 4rem);
  /* Grid items default to min-width:auto, so an over-wide child can stretch
     the track past the viewport. Pin it so panes can always shrink. */
  min-width: 0;
}

.split__pane img {
  max-width: 100%;
}

.split__pane > * + * {
  margin-top: var(--space-md);
}

.split__media {
  position: relative;
  min-height: 22rem;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-cream {
  background: var(--cream);
}

.bg-stone {
  background: var(--stone);
}

.bg-stone-soft {
  background: var(--stone-soft);
}

.bg-white {
  background: var(--white);
}

.bg-ink {
  background: var(--ink);
  color: var(--paper);
}

/* Full-bleed photo with a scrim so overlaid text always clears 4.5:1.
   The mockup places white type straight onto busy photography; the scrim is
   what makes that readable rather than merely pretty. */
.photo-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.photo-panel > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(12, 18, 8, 0.68) 0%,
    rgba(12, 18, 8, 0.5) 45%,
    rgba(12, 18, 8, 0.72) 100%
  );
}

.photo-panel--soft::after {
  background: rgba(12, 18, 8, 0.52);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
}

/* 5. BUTTONS =============================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.9em 2.4em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Cream pill — the mockup's primary CTA */
.btn--cream {
  background: var(--cream);
  color: var(--ink);
}

.btn--cream:hover {
  background: var(--cream-deep);
}

.btn--ink {
  background: var(--ink);
  color: var(--cream);
}

.btn--ink:hover {
  background: var(--moss-deep);
}

.btn--moss {
  background: var(--moss-deep);
  color: var(--paper);
}

.btn--moss:hover {
  background: var(--ink);
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn--outline-light:hover {
  background: var(--white);
  color: var(--ink);
}

.btn--full {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.link-quiet {
  color: var(--moss-deep);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 6. HEADER / NAV ========================================================== */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* Transparent over the hero, solid once scrolled or on interior pages. */
.header--solid,
.header.is-scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.header__brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.header__nav {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}

.header__nav a {
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.header__nav a:hover,
.header__nav a[aria-current='page'] {
  text-decoration: underline;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Header text flips to light while transparent over the dark hero. */
.header:not(.header--solid):not(.is-scrolled) .header__brand,
.header:not(.header--solid):not(.is-scrolled) .header__nav a,
.header:not(.header--solid):not(.is-scrolled) .cart-toggle,
.header:not(.header--solid):not(.is-scrolled) .nav-toggle {
  color: var(--white);
}

.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--space-2xs);
}

.cart-toggle__count {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding-inline: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--moss-deep);
  color: var(--white);
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.15rem;
  text-align: center;
}

.cart-toggle__count[hidden] {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile overlay menu */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl) var(--space-md);
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  text-decoration: none;
  text-align: center;
}

/* 7. HERO ================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(92vh, 54rem);
  padding: calc(var(--header-h) + var(--space-xl)) var(--space-md) var(--space-xl);
  overflow: hidden;
  text-align: center;
  color: var(--white);
}

.hero > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(10, 16, 6, 0.55) 0%,
    rgba(10, 16, 6, 0.34) 40%,
    rgba(10, 16, 6, 0.62) 100%
  );
}

.hero__wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  /* All caps, matching the brand lockup in the mockup. */
  text-transform: uppercase;
}

.hero__wordmark .l1 {
  display: block;
  font-size: var(--fs-wordmark);
  /* Wide tracking, but tightened on narrow screens so POTOMAC never wraps. */
  letter-spacing: clamp(0.06em, 2.2vw, 0.3em);
  text-indent: clamp(0.06em, 2.2vw, 0.3em);
}

.hero__wordmark .l2 {
  display: block;
  margin-top: 0.15em;
  font-size: calc(var(--fs-wordmark) * 0.42);
  letter-spacing: clamp(0.08em, 1.6vw, 0.24em);
  text-indent: clamp(0.08em, 1.6vw, 0.24em);
}

.hero__tagline {
  max-width: 46ch;
  margin-top: var(--space-md);
  font-size: var(--fs-body);
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.95);
}

.hero__cta {
  margin-top: var(--space-md);
}

/* 8. PRODUCT =============================================================== */

.product {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

.product__gallery {
  display: grid;
  gap: var(--space-sm);
}

.product__main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--stone-soft);
}

.product__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

.product__thumb {
  padding: 0;
  border: 1px solid transparent;
  background: var(--stone-soft);
  transition: border-color var(--dur) var(--ease);
}

.product__thumb img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.product__thumb[aria-current='true'] {
  border-color: var(--moss-deep);
}

.product__price {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.product__buy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.qty button {
  width: 2.75rem;
  height: 2.9rem;
  font-size: 1.125rem;
  line-height: 1;
  transition: background-color var(--dur) var(--ease);
}

.qty button:hover {
  background: var(--stone-soft);
}

.qty input {
  width: 2.75rem;
  height: 2.9rem;
  border: 0;
  background: none;
  text-align: center;
  font-size: var(--fs-body);
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Spec table — ingredients, guaranteed analysis, feeding guide */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.spec th,
.spec td {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.spec th {
  font-weight: 500;
  padding-right: var(--space-sm);
  white-space: nowrap;
}

/* 9. ACCORDION ============================================================= */

.accordion {
  border-top: 1px solid var(--rule);
}

.accordion__item {
  border-bottom: 1px solid var(--rule);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.25;
  text-align: left;
}

.accordion__icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  position: relative;
}

.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}

.accordion__icon::after {
  transform: rotate(90deg);
}

.accordion__trigger[aria-expanded='true'] .accordion__icon::after {
  transform: rotate(0deg);
}

.accordion__panel {
  overflow: hidden;
  /* Animates via inline max-height set in main.js; hidden by default so the
     content is still in the DOM for SEO and in-page search. */
  max-height: 0;
  transition: max-height var(--dur) var(--ease);
}

.accordion__panel > div {
  padding-bottom: var(--space-md);
  max-width: 68ch;
}

/* 10. TRUST ROWS =========================================================== */

.trust {
  display: grid;
  gap: var(--space-md);
}

.trust__row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) 1fr;
  gap: var(--space-sm);
  align-items: center;
}

.trust__row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--stone-soft);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
}

.badges li {
  padding: 0.45em 1.1em;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
}

/* 11. FORMS ================================================================ */

/* Cream card that floats over photography — the mockup's newsletter/contact pattern */
.form-card {
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--cream);
  color: var(--ink);
}

.form-card--wide {
  width: min(100%, 44rem);
}

.field {
  display: block;
}

.field + .field,
.field + .btn,
.form-row + .form-row {
  margin-top: var(--space-sm);
}

.field > span {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-small);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: var(--fs-body);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input[type='file'] {
  padding: 0.55rem;
  font-size: var(--fs-small);
}

.form-note {
  margin-top: var(--space-sm);
  font-size: var(--fs-micro);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Honeypot — hidden from people, visible to naive bots */
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: var(--space-sm);
  font-size: var(--fs-small);
}

.form-status:empty {
  margin-top: 0;
}

/* 12. CART DRAWER ========================================================== */

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(12, 18, 8, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 151;
  display: flex;
  flex-direction: column;
  width: min(100%, 27rem);
  background: var(--paper);
  transform: translateX(100%);
  /* visibility keeps the closed drawer out of the tab order and prevents the
     off-screen panel from creating horizontal overflow. */
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--rule);
}

.cart-drawer__head h2 {
  font-size: var(--fs-h3);
}

.cart-drawer__close {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.5rem;
  line-height: 1;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.cart-drawer__foot {
  padding: var(--space-md);
  border-top: 1px solid var(--rule);
}

.cart-empty {
  padding-block: var(--space-lg);
  text-align: center;
  color: var(--ink-soft);
}

.cart-line {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--rule);
}

.cart-line:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.cart-line img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--stone-soft);
}

.cart-line__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.2;
}

.cart-line__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.cart-line__remove {
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: underline;
}

.cart-line__remove:hover {
  color: var(--ink);
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: var(--fs-lead);
}

.cart-total strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.cart-drawer.is-busy .cart-drawer__body {
  opacity: 0.5;
  pointer-events: none;
}

/* Toast confirming an add, so the drawer isn't the only feedback */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-md);
  z-index: 160;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--cream);
  font-size: var(--fs-small);
  /* opacity/visibility rather than transform alone: an empty toast is short,
     so translateY(150%) of its own height doesn't always clear the viewport
     and a sliver peeks above the bottom edge. */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 150%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

.toast.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* 13. FOOTER =============================================================== */

.footer {
  padding-block: var(--space-xl) var(--space-md);
  background: var(--ink);
  color: var(--paper);
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer h3 {
  margin-bottom: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 251, 247, 0.65);
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li + li {
  margin-top: var(--space-2xs);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule-light);
  font-size: var(--fs-micro);
  color: rgba(251, 251, 247, 0.65);
}

/* 14. RESPONSIVE =========================================================== */

@media (min-width: 720px) {
  .trust__row {
    grid-template-columns: minmax(0, 10rem) 1fr;
    gap: var(--space-md);
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .product {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1080px) {
  :root {
    --header-h: 5.25rem;
  }

  .header__nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--wide-left {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .split--wide-right {
    grid-template-columns: 0.85fr 1.15fr;
  }

  /* Source order stays logical for screen readers; visual order flips. */
  .split__media--flip {
    grid-row: 1;
    grid-column: 1;
  }

  .footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

/* 15. MOTION & PRINT ======================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }
}

@media print {
  .header,
  .mobile-nav,
  .cart-drawer,
  .cart-overlay,
  .toast,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
