/* CratesInProvo — shared styles
   Mobile-first: base rules are the phone layout (design/homepage-mobile.html).
   Desktop rules (design/homepage-desktop.html etc.) start at 760px. */

/* ---------- Tokens ---------- */
:root {
  --cream: #F7F0E4;
  --espresso: #3B2418;
  --copper: #B86A32;
  --tan: #D6B38A;
  --white: #FFFFFF;
  --support: #6B5444;

  --line: rgba(59, 36, 24, 0.12);
  --line-strong: rgba(59, 36, 24, 0.14);
  --line-chip: rgba(59, 36, 24, 0.3);
  --line-dark: rgba(247, 240, 228, 0.2);

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1280px;
  --gutter: 20px;
  --gap: 28px;


  /* Corners: soft, not bubbly. Set both to 0 to return to the square original. */
  --radius: 8px;      /* cards, panels, photo mats */
  --radius-sm: 5px;   /* buttons, photos inside mats, tags */
}

@media (min-width: 760px) {
  :root { --gutter: 40px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* sticky phone header */
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 72px; /* room for the phone order bar */
}

img { display: block; max-width: 100%; }
/* <picture> only swaps the file format; it never affects layout */
picture { display: contents; }
picture > source { display: none; }  /* never a grid or flex item */
svg { flex: none; }

a { color: var(--espresso); }
a:hover { color: var(--copper); }

h1, h2, h3 { margin: 0; }

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
}
.on-dark :focus-visible { outline-color: var(--tan); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  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: 12px; top: -100px;
  z-index: 100;
  background: var(--espresso);
  color: var(--cream);
  padding: 12px 18px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--cream); }

/* Phone-only / desktop-only copy, where the two designs word things differently */
@media (max-width: 759.98px) { .only-lg { display: none !important; } }
@media (min-width: 760px) { .only-sm { display: none !important; } }

@media (min-width: 760px) {
  body { font-size: 17px; padding-bottom: 0; }
}
@media (min-width: 1100px) {
  html { scroll-padding-top: 0; }
}

/* ---------- Type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.6;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 24px;
  height: 2px;
  background: var(--copper);
}
.eyebrow--light::before { background: var(--tan); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 20px 0 18px;
}
.display em { font-style: italic; color: var(--copper); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 14px 0 28px;
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 28px;
}

.muted { color: var(--support); }

.label-caps {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.price {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

@media (min-width: 760px) {
  .eyebrow { font-size: 13px; gap: 12px; }
  .eyebrow::before { width: 32px; }
  .display {
    font-size: clamp(48px, 6.4vw, 92px);
    line-height: 0.98;
    margin: 28px 0;
  }
  .h2 {
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.06;
    margin: 18px 0 40px;
  }
  .h2--lg { font-size: clamp(38px, 4.2vw, 58px); line-height: 1.05; }
  .lead { font-size: 20px; margin-bottom: 40px; max-width: 520px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; }

/* Primary: copper. White-on-copper is 4.1:1, so labels stay 19px bold. */
.btn--primary {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
  padding: 0 32px;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--espresso);
  border-color: var(--espresso);
  color: var(--white);
}

.btn--secondary {
  background: transparent;
  border-color: var(--espresso);
  color: var(--espresso);
  font-size: 17px;
  font-weight: 600;
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--espresso);
  color: var(--cream);
}
.btn--secondary svg { width: 18px; height: 18px; }

.btn--sm { min-height: 46px; padding: 0 20px; font-size: 15px; }
.btn--tall { min-height: 58px; }
.btn--block { display: flex; width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--espresso);
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link__arrow { color: var(--copper); }

@media (min-width: 760px) {
  .text-link { gap: 8px; }
  .btn--block-sm { display: inline-flex; width: auto; }
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--espresso);
  color: var(--cream);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 9px 16px;
}
@media (min-width: 760px) {
  .topbar { font-size: 13px; letter-spacing: 0.06em; padding: 10px 24px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--cream);
  border-bottom: 1px solid var(--line-strong);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--espresso);
  min-height: 44px;
}
.brand:hover { color: var(--espresso); }
.brand__mark { width: 46px; height: 36px; object-fit: contain; }
.brand__name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-nav,
.header-cta { display: none; }

.header-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
}
.icon-btn--copper { color: var(--copper); }
.icon-btn svg { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  border-top: 1px solid var(--line-strong);
  background: var(--cream);
  padding: 8px 20px 24px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0 0 20px; padding: 0; }
.mobile-menu li + li { border-top: 1px solid var(--line); }
.mobile-menu a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: none;
}
.mobile-menu a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

@media (min-width: 1100px) {
  .site-header { position: static; }
  .site-header__inner {
    flex-wrap: wrap;
    gap: 16px 40px;
    padding: 18px 40px;
  }
  .brand { gap: 12px; }
  .brand__mark { width: 62px; height: 48px; }
  .brand__name { font-size: 25px; }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 36px;
    font-size: 15px;
    font-weight: 500;
  }
  .site-nav a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--copper);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
  }
  .header-cta { display: inline-flex; }
  .header-actions,
  .mobile-menu { display: none !important; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card__media { background: var(--cream); }
.card__media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card__category { color: var(--support); }
.card__title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.card__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.15;
}
.card__desc {
  margin: 0 0 8px;
  color: var(--support);
  font-size: 15px;
}
.card__body .btn { margin-top: auto; }

/* Compact card: secondary items on the homepage */
.card--compact {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
}
.card--compact img {
  width: 100%;
  height: 100%;
  min-height: 136px;
  object-fit: cover;
}
.card--compact .card__body { padding: 14px 16px; gap: 2px; }
.card--compact .card__name { font-size: 19px; line-height: 1.2; }
.compact__meta { margin: 0; font-size: 14px; color: var(--support); }
.compact__price {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--espresso);
  font-variant-numeric: tabular-nums;
}
.card--compact .text-link { margin-top: auto; align-self: flex-start; }

/* Placeholder if a product photo is ever missing */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border: 1px dashed rgba(59, 36, 24, 0.35);
  font-size: 14px;
  color: var(--support);
}

@media (min-width: 760px) {
  .card__media img { height: auto; aspect-ratio: 1 / 1; }
  .card__body { padding: 28px; gap: 12px; }
  .card__title-row { gap: 16px; }
  .card__name { font-size: 26px; }
  .card__desc { margin: 0; font-size: 16px; }

  .card--compact { grid-template-columns: 132px minmax(0, 1fr); }
  .card--compact img { min-height: 150px; }
  .card--compact .card__body { padding: 20px 22px; gap: 6px; }
  .card--compact .card__name { font-size: 21px; }
  .compact__price { display: inline; font-size: 17px; font-weight: 700; }
}

/* ---------- Homepage: hero ---------- */
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-areas: "text" "figure" "proof";
}
.hero__text { grid-area: text; padding: 44px 20px 0; }
.hero__actions { display: flex; flex-direction: column; gap: 10px; }
.hero__actions .btn--secondary { min-height: 54px; }

.hero__figure { grid-area: figure; margin: 36px 0 0; position: relative; }
.hero__figure img { width: 100%; height: 320px; object-fit: cover; }

.price-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--espresso);
  color: var(--cream);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}
.price-tag__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.price-tag__price { font-family: var(--serif); font-size: 22px; line-height: 1.2; }

.proof {
  grid-area: proof;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--white);
  border-bottom: 1px solid var(--line-strong);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}
.proof li { padding: 16px 6px; }
.proof li + li { border-left: 1px solid var(--line); }
.proof svg { display: none; color: var(--copper); }
.proof strong { font-weight: 600; }
.proof__sub { color: var(--support); }

@media (min-width: 760px) {
  .hero__inner {
    padding: 88px 40px 96px;
    grid-template-areas: "text" "proof" "figure";
  }
  .hero__text { padding: 0; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .hero__actions .btn { min-height: 58px; }

  .hero__figure { margin: 64px 0 0; }
  .hero__mat { background: var(--white); padding: 14px; border: 1px solid var(--line); }
  .hero__figure img { height: auto; aspect-ratio: 5 / 4; }
  .price-tag { left: -24px; bottom: 40px; padding: 16px 22px; gap: 2px; }
  .price-tag__label { font-size: 12px; }
  .price-tag__price { font-size: 26px; line-height: 1.6; }

  .proof {
    background: none;
    border-bottom: 0;
    border-top: 1px solid var(--line-strong);
    margin-top: 48px;
    padding-top: 32px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
  }
  .proof li { display: flex; gap: 10px; align-items: flex-start; padding: 0; }
  .proof li + li { border-left: 0; }
  .proof svg { display: block; width: 22px; height: 22px; }
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".     figure"
      "text  figure"
      "proof figure"
      ".     figure";
    column-gap: 64px;
    align-items: center;
  }
  .hero__figure { margin: 0; }
}

/* ---------- Homepage: "Built for" strip (desktop design only) ----------
   The audiences scroll slowly as a marquee. Paused on hover, keyboard focus
   and by the pause button; still and wrapped under reduced motion. */
.built-for { display: none; }
@media (min-width: 760px) {
  .built-for {
    display: block;
    background: var(--white);
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
  }
  .built-for__inner {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .built-for__label {
    flex: none;
    margin: 0;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    /* soft fade at both edges so words drift in and out */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  }
  .marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 48s linear infinite;
  }
  .marquee__list {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 32px 0 0;
    margin: 0;
    list-style: none;
  }
  .marquee__list li {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 48px;
    font-family: var(--serif);
    font-size: 21px;
    white-space: nowrap;
  }
  .marquee__list li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    background: var(--tan);
  }

  .marquee:hover .marquee__track,
  .built-for.is-paused .marquee__track { animation-play-state: paused; }

  .marquee__toggle { flex: none; border-radius: 50%; }
  .marquee__toggle:hover { background: var(--cream); }
  .marquee__toggle .icon-play { display: none; }
  .marquee__toggle[aria-pressed="true"] .icon-pause { display: none; }
  .marquee__toggle[aria-pressed="true"] .icon-play { display: block; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* No JavaScript: the button can't work, so hide it (hover still pauses) */
html:not(.js) .marquee__toggle { display: none; }

/* Reduced motion: no scrolling. Show one wrapped row of the six audiences. */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee__list { flex-wrap: wrap; gap: 8px 32px; padding: 0; }
  .marquee__list--copy,
  .marquee__toggle { display: none !important; }
}

/* ---------- Homepage: featured products ---------- */
.featured { padding-top: 64px; }
.featured__head .h2 { margin-bottom: 28px; }
.featured__grid,
.featured__compact { display: flex; flex-direction: column; gap: 20px; }
.featured__compact { margin-top: 20px; }
.featured .card__category { display: none; }
.featured__more { margin-top: 12px; }

@media (min-width: 760px) {
  .featured { padding-top: 112px; padding-bottom: 56px; }
  .featured__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 48px;
  }
  .featured__head .h2 { margin-bottom: 0; }
  .featured__all { font-size: 16px; font-weight: 600; text-underline-offset: 6px; }
  .featured__grid,
  .featured__compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: var(--gap);
  }
  .featured__compact { margin-top: var(--gap); }
  .featured .card__category { display: block; }
}

/* ---------- Homepage: benefits (espresso) ---------- */
.benefits {
  background: var(--espresso);
  color: var(--cream);
  margin-top: 64px;
}
.benefits__inner { padding-top: 64px; padding-bottom: 64px; }
.benefits__photo { display: none; }
.benefits__list { list-style: none; margin: 0; padding: 0; }
.benefits__list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--line-dark);
  font-size: 17px;
}
.benefits__list li:last-child { border-bottom: 1px solid var(--line-dark); }
.benefits__num { font-family: var(--serif); color: var(--tan); }

@media (min-width: 760px) {
  .benefits { margin-top: 88px; }
  .benefits__inner {
    padding-top: 112px;
    padding-bottom: 112px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 72px;
    align-items: center;
  }
  .benefits__photo { display: block; background: var(--cream); padding: 14px; }
  .benefits__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .benefits__list li { grid-template-columns: 56px minmax(0, 1fr); padding: 18px 0; font-size: 19px; }
  .benefits__num { font-size: 24px; line-height: 1.4; }
}

/* ---------- Homepage: how ordering works ---------- */
.how__inner { padding-top: 64px; padding-bottom: 64px; }
.how__intro { display: none; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.step__num { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--copper); }
.step__title { font-weight: 600; }
.step__desc { font-size: 15px; color: var(--support); }

/* Message bubbles (phone demo, Contact page starters) */
.bubble {
  max-width: 86%;
  padding: 14px 18px;
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}
.bubble--out {
  align-self: flex-end;
  background: var(--espresso);
  color: var(--cream);
  border-radius: 18px 18px 4px 18px;
}
.bubble--in {
  align-self: flex-start;
  background: var(--cream);
  border-radius: 18px 18px 18px 4px;
}

@media (min-width: 760px) {
  .how__inner {
    padding-top: 120px;
    padding-bottom: 120px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 72px;
    align-items: center;
  }
  .how .h2 { margin-bottom: 20px; }
  .how__intro { display: block; margin: 0 0 40px; color: var(--support); max-width: 480px; }
  .how .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px 28px;
  }
  .how .step { display: block; border-top: 2px solid var(--espresso); padding-top: 16px; }
  .how .step__num { font-size: 30px; line-height: 1.6; }
  .how .step__title { margin: 4px 0; }
}

/* ---------- Homepage: custom orders teaser ---------- */
.custom-teaser {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.custom-teaser__inner { padding-top: 56px; padding-bottom: 56px; }
.custom-teaser .h2 { font-size: 34px; margin-bottom: 14px; }
.custom-teaser__text { margin: 0 0 24px; color: var(--support); }
.custom-teaser__list,
.custom-teaser__photo { display: none; }
.custom-teaser__more { margin-top: 12px; }

@media (min-width: 760px) {
  .custom-teaser__inner {
    padding-top: 112px;
    padding-bottom: 112px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 72px;
    align-items: center;
  }
  .custom-teaser .h2 { font-size: clamp(36px, 4vw, 54px); margin-bottom: 20px; }
  .custom-teaser__text { margin-bottom: 32px; max-width: 500px; }
  .custom-teaser__list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    margin: 0 0 40px;
    font-size: 16px;
  }
  .custom-teaser__list li { display: flex; gap: 10px; }
  .custom-teaser__list li::before { content: "—"; color: var(--copper); }
  .custom-teaser__photo { display: block; background: var(--cream); padding: 14px; }
  .custom-teaser__photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
  .custom-teaser__more { margin-top: 16px; display: block; }
}

/* ---------- Homepage: about ---------- */
.about__inner { padding-top: 56px; padding-bottom: 56px; }
.about .h2 { font-size: 32px; line-height: 1.1; margin-bottom: 14px; }
.about__body p { margin: 0 0 16px; }
.about__body p:last-child { margin-bottom: 0; color: var(--support); }

@media (min-width: 760px) {
  .about__inner {
    padding-top: 120px;
    padding-bottom: 120px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 72px;
  }
  .about .h2 { font-size: clamp(36px, 4vw, 54px); line-height: 1.06; margin-bottom: 0; }
  .about__body { font-size: 19px; line-height: 1.65; padding-top: 44px; }
  .about__body p { margin-bottom: 20px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso); color: var(--cream); }
.site-footer__inner { padding-top: 56px; padding-bottom: 40px; }
.site-footer__label { color: var(--tan); }
.site-footer__label,
.footer-col__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-footer__phone {
  display: block;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-decoration: none;
  margin: 10px 0 14px;
}
.site-footer__phone:hover { color: var(--tan); }
.site-footer__summary { margin: 0; font-size: 15px; opacity: 0.85; max-width: 460px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
  font-size: 16px;
}
.footer-col { display: flex; flex-direction: column; }
.footer-col__title { color: var(--tan); margin-bottom: 6px; }
.footer-col a,
.footer-col span {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--cream);
  text-decoration: none;
}
.footer-col a { min-height: 44px; }
.footer-col a:hover { color: var(--tan); text-decoration: underline; text-underline-offset: 4px; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.logo-tile { background: var(--cream); padding: 5px 7px; display: inline-flex; }
.logo-tile img { width: 34px; height: 26px; object-fit: contain; }
.footer-brand__name { font-family: var(--serif); font-size: 18px; }
.site-footer__tagline { opacity: 0.85; }

@media (min-width: 760px) {
  .site-footer__inner { padding-top: 104px; }
  .site-footer__top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 56px;
    padding-bottom: 72px;
    border-bottom: 1px solid var(--line-dark);
  }
  .site-footer__label,
  .footer-col__title { font-size: 13px; }
  .site-footer__phone {
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.05;
    margin: 14px 0 20px;
  }
  .site-footer__summary { font-size: 17px; }
  .footer-cols { margin-top: 0; gap: 32px; align-content: start; }
  .site-footer__bottom { margin-top: 0; padding-top: 32px; border-top: 0; }
  .footer-brand { gap: 12px; }
  .logo-tile { padding: 6px 8px; }
  .logo-tile img { width: 40px; height: 31px; }
  .footer-brand__name { font-size: 20px; }
}

/* ---------- Phone order bar ---------- */
.order-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--cream);
  border-top: 1px solid var(--line-strong);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -6px 18px rgba(59, 36, 24, 0.08);
}
.order-bar__text { flex: 1; font-size: 13px; line-height: 1.3; }
.order-bar__text strong { font-weight: 600; }
.order-bar .btn { min-height: 50px; padding: 0 20px; gap: 8px; }
.order-bar .btn svg { width: 18px; height: 18px; }

@media (min-width: 760px) {
  .order-bar { display: none; }
}

/* ---------- Products page ---------- */
.catalog { padding-top: 48px; padding-bottom: 64px; }
.catalog__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-strong);
}
.catalog__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 18px 0 16px;
}
.catalog__intro { margin: 0; color: var(--support); max-width: 560px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-chip);
  background: transparent;
  color: var(--espresso);
  border-radius: 999px;
  font: 500 15px var(--sans);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--espresso); }
.chip[aria-pressed="true"] {
  background: var(--espresso);
  border-color: var(--espresso);
  color: var(--cream);
  font-weight: 600;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 48px var(--gap);
  margin-top: 40px;
}
.product { display: flex; flex-direction: column; }
.product[hidden] { display: none; }
.product__mat { background: var(--white); padding: 12px; border: 1px solid var(--line); }
.product__mat img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.product__body {
  padding: 22px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product .card__name { font-size: 23px; }
.product .card__desc { margin: 0 0 12px; font-size: 16px; }
.product .btn { margin-top: auto; }

.cta-panel {
  margin-top: 72px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px 28px;
}
.cta-panel__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 8px;
}
.cta-panel p { margin: 0; color: var(--support); }

@media (min-width: 760px) {
  .catalog { padding-top: 80px; padding-bottom: 112px; }
  .catalog__head { padding-bottom: 36px; }
  .catalog__grid { margin-top: 48px; }
  .product .card__name { font-size: 25px; }
  .cta-panel { margin-top: 96px; padding: 48px; }
  .cta-panel__title { font-size: 36px; }
}

/* ---------- Custom orders page ---------- */
.custom-hero__inner {
  padding-top: 48px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px 72px;
  align-items: center;
}
.custom-hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 20px 0 24px;
}
.custom-hero__title em { font-style: italic; color: var(--copper); }
.custom-hero__lead { margin: 0 0 32px; font-size: 18px; max-width: 520px; }

.include-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px 20px;
  margin-bottom: 32px;
}
.include-box__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.include-box ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 28px;
  font-size: 16px;
}
.include-box li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: baseline; }
/* 24px is large text at any weight, so copper (4.1:1 on white) passes WCAG AA */
.include-box__num { font-family: var(--serif); color: var(--copper); font-size: 24px; line-height: 1; }

.custom-hero .btn { min-height: 60px; padding: 0 34px; }
.custom-hero__hint { margin-top: 14px; font-size: 14px; color: var(--support); }

.custom-visual { position: relative; }
.custom-visual__mat { background: var(--white); padding: 12px; border: 1px solid var(--line); }
.custom-visual__mat img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
/* "Your text opens with": a new-message window with the template in the compose box */
.msg-window {
  position: relative;
  margin: 0;  /* <figure> has browser margins */
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(59, 36, 24, 0.06), 0 20px 40px -16px rgba(59, 36, 24, 0.3);
}
/* Custom Orders: overlaps the bottom of the photo */
.custom-visual .msg-window {
  width: min(320px, calc(100% - 24px));
  margin: -56px 12px 0 auto;
}
/* Contact: sits flat inside its starter card */
.starter .msg-window { box-shadow: none; }
.msg-window__caption {
  padding: 10px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  color: var(--support);
  text-align: center;
}
.msg-window__to {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.msg-window__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border-radius: 50%;
}
.msg-window__avatar img { width: 24px; height: auto; }
.msg-window__recipient { font-size: 15px; font-weight: 600; line-height: 1.3; }
.msg-window__to-label { font-weight: 400; color: var(--support); }
.msg-window__number { display: block; font-size: 13px; font-weight: 400; color: var(--support); }
.msg-window__compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 28px 12px 12px;
}
.msg-window__field {
  flex: 1;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-window__caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--copper);
  animation: caret-blink 1.1s steps(1, end) infinite;
}
.msg-window__send {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--copper);
  color: var(--white);
}
.msg-window__send svg { width: 16px; height: 16px; }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .msg-window__caret { animation: none; } }

.custom-points { background: var(--white); border-top: 1px solid var(--line); }
.custom-points__inner {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 32px 48px;
}
.custom-point { border-top: 2px solid var(--espresso); padding-top: 20px; }
.custom-point h2, .custom-point h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.custom-point p { margin: 0; color: var(--support); font-size: 16px; }

@media (min-width: 760px) {
  .custom-hero__inner { padding-top: 96px; padding-bottom: 104px; }
  .custom-hero__lead { font-size: 19px; margin-bottom: 40px; }
  .include-box { padding: 28px 32px; }
  .custom-visual__mat { padding: 16px; }
  .custom-visual .msg-window { position: absolute; right: -20px; bottom: 32px; width: 320px; margin: 0; }
  .custom-points__inner { padding-top: 80px; padding-bottom: 80px; gap: 48px; }
}

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

/* ---------- Inner pages: shared page hero ---------- */
.page-hero__inner {
  padding-top: 48px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px 72px;
  align-items: center;
}
.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 20px 0 20px;
}
.page-hero .lead { max-width: 560px; margin-bottom: 0; }
.page-hero .lead + .lead { margin-top: 16px; color: var(--support); font-size: 17px; }
.photo-mat { background: var(--white); padding: 12px; border: 1px solid var(--line); }
.photo-mat img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

.section { padding-top: 64px; padding-bottom: 64px; }
.section--white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { margin-bottom: 32px; max-width: 640px; }
.section__head .h2 { margin-bottom: 12px; }
.section__head p { margin: 0; color: var(--support); }

@media (min-width: 760px) {
  .page-hero__inner { padding-top: 96px; padding-bottom: 104px; }
  .section { padding-top: 112px; padding-bottom: 112px; }
  .section__head { margin-bottom: 48px; }
  .section__head .h2 { margin-bottom: 16px; }
  .page-hero .lead + .lead { font-size: 19px; }
}

/* ---------- How to Order page ---------- */
.order-steps { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.order-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 20px 0;
  border-top: 1px solid var(--line-strong);
}
.order-step:last-child { border-bottom: 1px solid var(--line-strong); }
.order-step__num { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--copper); }
.order-step__title { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.2; margin: 0 0 6px; }
.order-step p { margin: 0; color: var(--support); }

.how-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px 72px;
  align-items: center;
}

.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  padding: 14px 0 6px;
  border-top: 1px solid var(--line-strong);
}
.price-list li:last-child { border-bottom: 1px solid var(--line-strong); }
.price-list__name { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.25; }
.price-list__note { display: block; font-family: var(--sans); font-size: 14px; color: var(--support); }
.price-list .price { font-size: 20px; }
.price-list .text-link { grid-column: 1 / -1; }

@media (min-width: 760px) {
  .order-step { grid-template-columns: 72px minmax(0, 1fr); padding: 28px 0; }
  .order-step__num { font-size: 40px; }
  .order-step__title { font-size: 26px; }
  .price-list li { grid-template-columns: minmax(0, 1fr) 120px 170px; padding: 18px 0; }
  .price-list__name { font-size: 23px; }
  .price-list .price { font-size: 24px; text-align: right; }
  .price-list .text-link { grid-column: auto; justify-self: end; }
}

/* ---------- About page ---------- */
.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.who-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-top: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
}
.who-list li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--tan); }

@media (min-width: 760px) {
  .who-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
  .who-list li { min-height: 88px; font-size: 26px; }
}

/* ---------- Contact page ---------- */
.contact-phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--espresso);
  text-decoration: none;
  margin: 28px 0 8px;
}
.contact-phone:hover { color: var(--copper); }
.contact-phone__hint { font-size: 15px; color: var(--support); margin: 0; }

.details {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 20px;
  margin: 0;
}
.details div { padding: 16px 0; }
.details div + div { border-top: 1px solid var(--line); }
.details dt { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--support); }
.details dd { margin: 4px 0 0; font-size: 18px; }
.details a { text-decoration: none; font-weight: 600; }
.details a:hover { text-decoration: underline; text-underline-offset: 4px; }

.starters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px var(--gap);
}
.starter {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.starter__title { font-family: var(--serif); font-weight: 500; font-size: 23px; line-height: 1.15; margin: 0; }
.starter .btn { margin-top: auto; }

@media (min-width: 760px) {
  .contact-phone { font-size: clamp(48px, 6vw, 84px); }
  .details { padding: 12px 32px; }
  .details div { padding: 20px 0; }
  .starter { padding: 32px; }
  .starter__title { font-size: 26px; }
}
.starter__text { margin: 0; color: var(--support); }
.benefits--flush { margin-top: 0; }
@media (min-width: 760px) { .benefits--flush { margin-top: 0; } }
@media (min-width: 760px) { .how-page__grid { align-items: start; } .how-page__grid .section__head { position: sticky; top: 32px; } }

/* ---------- Hardening ---------- */
/* Without JavaScript the menu and filters can't work: hide the controls.
   Every page stays reachable from the footer links, and all products stay listed. */
html:not(.js) .menu-toggle,
html:not(.js) .chips { display: none; }

/* Keep keyboard focus clear of the fixed phone order bar (WCAG 2.4.11) */
@media (max-width: 759.98px) {
  html { scroll-padding-bottom: 88px; }
}

.skip-link:hover { color: var(--cream); }

/* Photo that failed to load: main.js swaps in a "Photo coming soon" box */
.photo-placeholder--fill { width: 100%; height: 100%; min-height: 136px; aspect-ratio: auto; }
.catalog__intro a { font-weight: 600; text-underline-offset: 3px; }

/* ---------- Corners ---------- */
/* Outer containers */
.card,
.product__mat,
.hero__mat,
.benefits__photo,
.custom-teaser__photo,
.custom-visual__mat,
.photo-mat,
.include-box,
.cta-panel,
.details,
.starter,
.photo-placeholder { border-radius: var(--radius); }

/* Cards clip their own photos to the rounded corner */
.card { overflow: hidden; }
.card .photo-placeholder { border-radius: 0; }

/* Photos sitting inside a mat get a smaller, concentric corner */
.product__mat img,
.hero__mat img,
.benefits__photo img,
.custom-teaser__photo img,
.custom-visual__mat img,
.photo-mat img,
.product__mat .photo-placeholder,
.photo-mat .photo-placeholder { border-radius: var(--radius-sm); }

/* Small pieces */
.price-tag,
.skip-link { border-radius: var(--radius-sm); }
.logo-tile { border-radius: 3px; }

/* The phone hero photo runs edge to edge: keep it square there */
@media (max-width: 759.98px) {
  .hero__figure img { border-radius: 0; }
}

/* ---------- Homepage: phone conversation demo ----------
   Used on the homepage (desktop only) and How to Order. Messages play once when the
   section scrolls into view; main.js adds .will-animate / .is-playing.
   Without JS or with reduced motion the finished conversation shows. */
/* Homepage keeps it desktop-only, like the approved phone design */
@media (max-width: 759.98px) { .how .phone-demo { display: none; } }

  .phone-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    justify-self: center;
  }
  .phone-demo__label { color: var(--support); }

  .phone-mock {
    width: 312px;
    padding: 11px;
    background: var(--espresso);
    border-radius: 48px;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.06) inset, 0 28px 56px -18px rgba(59, 36, 24, 0.45);
  }
  .phone-mock__screen {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 560px;
    background: var(--white);
    border-radius: 38px;
    overflow: hidden;
  }
  .phone-mock__notch {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 84px;
    height: 24px;
    margin-left: -42px;
    background: var(--espresso);
    border-radius: 999px;
  }
  .phone-mock__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 46px 16px 12px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .phone-mock__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
  }
  .phone-mock__avatar img { width: 30px; height: auto; }
  .phone-mock__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
  .phone-mock__number { font-size: 12px; color: var(--support); line-height: 1.3; }

  .phone-mock__thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 14px;
  }
  .phone-mock .bubble { max-width: 82%; padding: 10px 14px; font-size: 15px; line-height: 1.4; }
  .phone-mock__status { align-self: flex-end; font-size: 11px; color: var(--support); margin-bottom: 10px; }
  .phone-mock__reply { position: relative; display: flex; }

  .typing {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    gap: 4px;
    padding: 14px 16px;
    background: var(--cream);
    border-radius: 18px 18px 18px 4px;
    opacity: 0;
  }
  .typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--support);
    opacity: 0.35;
  }

  .phone-mock__compose {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 22px;
    border-top: 1px solid var(--line);
  }
  .phone-mock__field {
    flex: 1;
    padding: 7px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 14px;
    color: var(--support);
  }
  .phone-mock__send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--copper);
    color: var(--white);
  }
  .phone-mock__send svg { width: 16px; height: 16px; }

  .phone-demo__note {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--support);
  }
  .phone-demo__replay {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    font: 600 13px var(--sans);
    color: var(--espresso);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .phone-demo__replay:hover { color: var(--copper); }

  /* ----- The sequence ----- */
  .phone-mock.will-animate .phone-anim { opacity: 0; }

  .phone-mock.is-playing .phone-anim--out {
    transform-origin: 100% 100%;
    animation: msg-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  }
  .phone-mock.is-playing .phone-anim--status { animation: fade-in 0.3s ease-out 1s both; }
  .phone-mock.is-playing .typing {
    animation: typing-show 1.7s ease-out 1.5s both;
  }
  .phone-mock.is-playing .typing span { animation: typing-dot 1s ease-in-out 1.5s 2; }
  .phone-mock.is-playing .typing span:nth-child(2) { animation-delay: 1.65s; }
  .phone-mock.is-playing .typing span:nth-child(3) { animation-delay: 1.8s; }
  .phone-mock.is-playing .phone-anim--in {
    transform-origin: 0 100%;
    animation: msg-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 3.2s both;
  }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes typing-show {
  0%   { opacity: 0; transform: scale(0.85); }
  15%  { opacity: 1; transform: none; }
  85%  { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes typing-dot {
  0%, 100% { opacity: 0.35; transform: none; }
  40%      { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-mock .phone-anim { opacity: 1 !important; animation: none !important; }
  .phone-mock .typing { display: none !important; }
  .phone-demo__replay { display: none !important; }
}

/* ---------- Motion ----------
   One quiet language: things settle into place with a soft ease-out.
   Everything here is disabled under prefers-reduced-motion (see the end). */
:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); }

/* Scroll reveals: CSS scroll-driven animations, no JavaScript.
   Each block fades up as it enters the viewport, tied to scroll position,
   so content can never get stuck hidden: anything already on screen, scrolled
   past or jumped over is simply in its finished state. Browsers without
   support (Firefox, older Safari) show everything still.
   `translate` is animated (not `transform`) so card hover lifts still work. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .featured__head,
    .benefits__photo,
    .benefits .eyebrow,
    .benefits .h2,
    .how .eyebrow,
    .how .h2,
    .how__intro,
    .custom-teaser__inner > div,
    .about__inner > div,
    .section__head,
    .cta-panel,
    .page-hero__inner > *,
    .custom-visual,
    .include-box,
    .details,
    .site-footer__top > div,
    .featured__grid > *,
    .featured__compact > *,
    .benefits__list > *,
    .steps > *,
    .catalog__grid > *,
    .custom-points__inner > *,
    .who-list > *,
    .order-steps > *,
    .price-list > *,
    .starters > * {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    /* gentle stagger across each row of a grid or list */
    .featured__grid > :nth-child(3n+2),
    .featured__compact > :nth-child(3n+2),
    .benefits__list > :nth-child(3n+2),
    .steps > :nth-child(3n+2),
    .catalog__grid > :nth-child(3n+2),
    .custom-points__inner > :nth-child(3n+2),
    .who-list > :nth-child(3n+2),
    .order-steps > :nth-child(3n+2),
    .price-list > :nth-child(3n+2),
    .starters > :nth-child(3n+2) { animation-range: entry 6% entry 61%; }
    .featured__grid > :nth-child(3n),
    .featured__compact > :nth-child(3n),
    .benefits__list > :nth-child(3n),
    .steps > :nth-child(3n),
    .catalog__grid > :nth-child(3n),
    .custom-points__inner > :nth-child(3n),
    .who-list > :nth-child(3n),
    .order-steps > :nth-child(3n),
    .price-list > :nth-child(3n),
    .starters > :nth-child(3n) { animation-range: entry 12% entry 67%; }
  }
}
@keyframes rise {
  from { opacity: 0; translate: 0 22px; animation-timing-function: var(--ease-out); }
  to   { opacity: 1; translate: none; }
}

/* Catalog: products fade back in after a filter change */
.product.filter-in { animation: filter-in 0.4s var(--ease-out) both; }
@keyframes filter-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Phone menu opens with a short drop */
.mobile-menu:not([hidden]) { animation: menu-in 0.22s var(--ease-out); }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* Pressed feedback on every button */
.btn:active,
.chip:active { transform: translateY(1px); }
a, .chip { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* Hover, for mouse and trackpad only (no sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
  .card,
  .product__mat {
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  }
  .card:hover,
  .product:hover .product__mat {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -18px rgba(59, 36, 24, 0.35);
  }

  .card__media { overflow: hidden; }
  .card__media img,
  .card--compact img { transition: transform 0.7s var(--ease-out); }
  .card:hover .card__media img,
  .card--compact:hover img { transform: scale(1.035); }

  .text-link__arrow { display: inline-block; transition: transform 0.25s var(--ease-out); }
  .text-link:hover .text-link__arrow { transform: translateX(3px); }

  .site-nav a:not([aria-current]) {
    background: linear-gradient(var(--copper), var(--copper)) 0 calc(100% - 8px) / 0 2px no-repeat;
    transition: background-size 0.3s var(--ease-out), color 0.15s ease;
  }
  .site-nav a:not([aria-current]):hover { background-size: 100% 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .product:hover .product__mat,
  .card:hover .card__media img,
  .card--compact:hover img,
  .text-link:hover .text-link__arrow,
  .btn:active,
  .chip:active { transform: none !important; }
  .product.filter-in,
  .mobile-menu:not([hidden]) { animation: none !important; }
}


@media print {
  * { animation: none !important; }
}

/* ---------- Homepage hero entrance ----------
   One quiet sequence on page load, CSS only (starts with first paint).
   The photo never starts invisible, so it doesn't delay the page's
   largest paint. Off under reduced motion. */
.hero-line { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow::before {
    transform-origin: left center;
    animation: bar-draw 0.6s var(--ease-out) 0.05s both;
  }
  .hero .eyebrow     { animation: fade-in 0.6s ease-out 0.1s both; }
  .hero-line--1      { animation: rise 0.8s 0.15s both; }
  .hero-line--2      { animation: pen-reveal 1s cubic-bezier(0.65, 0, 0.35, 1) 0.45s both; }
  .hero .lead        { animation: rise 0.8s 0.6s both; }
  .hero__actions     { animation: rise 0.8s 0.72s both; }

  .hero__figure      { animation: settle 1.1s var(--ease-out) 0.2s both; }
  .price-tag         { animation: tag-in 0.6s var(--ease-out) 0.95s both; }

  .proof li                { animation: rise 0.7s 1s both; }
  .proof li:nth-child(2)   { animation-delay: 1.08s; }
  .proof li:nth-child(3)   { animation-delay: 1.16s; }
}

/* Phone: the photo runs edge to edge, so it can ease out of a slight zoom */
@media (max-width: 759.98px) and (prefers-reduced-motion: no-preference) {
  .hero__figure { overflow: hidden; animation: none; }
  .hero__figure img { animation: zoom-settle 1.6s var(--ease-out) 0.1s both; }
}

@keyframes bar-draw {
  from { transform: scaleX(0); }
  to   { transform: none; }
}
/* left-to-right wipe; negative insets leave room for the italic's overhang */
@keyframes pen-reveal {
  from { clip-path: inset(-0.2em 100% -0.3em -0.1em); translate: 0 6px; }
  to   { clip-path: inset(-0.2em -0.2em -0.3em -0.1em); translate: none; }
}
@keyframes settle {
  from { translate: 0 18px; scale: 0.985; }
  to   { translate: none; scale: none; }
}
@keyframes tag-in {
  from { opacity: 0; translate: -14px 0; }
  to   { opacity: 1; translate: none; }
}
@keyframes zoom-settle {
  from { scale: 1.06; }
  to   { scale: none; }
}

/* ---------- Tablet / small-laptop layout fixes ---------- */
/* Featured products: one column on tablets, three from 960px (no orphan cards) */
@media (min-width: 760px) {
  .featured__grid,
  .featured__compact { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 960px) {
  .featured__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* compact cards need ~360px each before three fit side by side */
@media (min-width: 1200px) {
  .featured__compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* the three hero proof points stay on one row */
@media (min-width: 760px) {
  .proof { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.text-link { white-space: nowrap; }
/* Photos are ~700px wide: don't stretch them past that when layouts stack */
@media (min-width: 760px) and (max-width: 959.98px) {
  .hero__figure { width: 100%; max-width: 620px; justify-self: center; }
}
.custom-visual { width: 100%; max-width: 600px; justify-self: center; }
