/* ==========================================================================
   BARRY'S FOOD · styles
   Classic layout: top menu, stacked sections, no scroll animation.
   Type after kate-hutchins.com: serif display (Libre Caslon, a free stand-in
   for Freight Big Pro) + Inter for text and navigation.
   ========================================================================== */

@import url("assets/fonts/fonts.css");

:root {
  --page:     #FBF8F3;
  --tint:     #F4EEE4;
  --sand:     #DFC8A0;
  --sand-2:   #EFE1C6;
  --espresso: #62342A;
  --night:    #2A1712;
  --ink:      #221612;
  --soft:     #6B5A50;
  --line:     rgba(98, 52, 42, 0.18);

  --serif: "BF Serif", "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 4.5rem);
  --sec: clamp(4rem, 8vw, 7.5rem);
  --hdr: 5.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 1px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--sand); color: var(--night); }
:focus-visible { outline: 2px solid var(--espresso); outline-offset: 3px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--espresso); color: var(--page); padding: 0.6rem 1rem; }
.skip:focus { top: 1rem; }

/* --------------------------------------------------------------- type -- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
em { font-style: italic; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem); line-height: 1.15; }
p { margin: 0 0 1rem; }
.title { text-align: center; text-transform: uppercase; font-size: clamp(2rem, 1.35rem + 2.4vw, 3.2rem); line-height: 1; letter-spacing: 0.01em; }
.intro { text-align: center; color: var(--soft); max-width: 40rem; margin: 1.1rem auto 0; text-wrap: pretty; }
.subtitle { text-align: center; margin: clamp(3.5rem, 6vw, 5rem) 0 2rem; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.kicker, .label { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.label { display: block; color: var(--soft); margin-bottom: 0.35rem; }
.small { font-size: 0.85rem; color: var(--soft); }
.num { display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; color: var(--soft); margin: 1.1rem 0 0.35rem; }
.note { text-align: center; color: var(--soft); font-size: 0.9rem; margin: 2rem 0 0; }

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.9rem; padding: 0.75rem 1.6rem; border: 1px solid transparent; border-radius: 0;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn--dark { background: var(--espresso); color: var(--page); }
.btn--dark:hover { background: var(--night); }
.btn--light { background: var(--page); color: var(--ink); }
.btn--light:hover { background: var(--sand-2); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--page); }
.btn--line-light { border-color: rgba(251, 248, 243, 0.8); color: var(--page); background: transparent; }
.btn--line-light:hover { background: var(--page); color: var(--ink); }
.btn--serif { background: var(--tint); color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.05rem; letter-spacing: 0; text-transform: none; min-height: 2.6rem; padding: 0.45rem 1.4rem; }
.btn--serif:hover { background: var(--sand-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ------------------------------------------------------------- header -- */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--page); border-bottom: 1px solid var(--line); }
.hdr__in { max-width: 90rem; margin: 0 auto; height: var(--hdr); padding-inline: var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.hdr__nav { display: flex; align-items: center; gap: 1.6rem; }
.hdr__nav--r { justify-content: flex-end; }
.hdr__nav a:not(.btn) { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 0.4rem 0; border-bottom: 1px solid transparent; }
.hdr__nav a:not(.btn):hover { border-bottom-color: currentColor; }
.hdr__logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--espresso); }
.hdr__logo svg { width: 3rem; height: 3rem; }
.hdr__logo span { font-family: var(--serif); font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; }
.hdr__burger { display: none; justify-self: end; align-items: center; gap: 0.6rem; min-height: 2.9rem; padding: 0 0.25rem 0 0.75rem; background: none; border: 0; cursor: pointer; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.hdr__burger-lines { position: relative; width: 1.4rem; height: 1px; background: currentColor; }
.hdr__burger-lines::before, .hdr__burger-lines::after { content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; }
.hdr__burger-lines::before { top: -6px; }
.hdr__burger-lines::after { top: 6px; }
.hdr__burger[aria-expanded="true"] .hdr__burger-lines { background: transparent; }
.hdr__burger[aria-expanded="true"] .hdr__burger-lines::before { top: 0; transform: rotate(45deg); }
.hdr__burger[aria-expanded="true"] .hdr__burger-lines::after { top: 0; transform: rotate(-45deg); }

.menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - var(--hdr)); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--page); padding: 0.5rem var(--gutter) 2rem; }
.menu > a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 1.35rem; text-decoration: none; }
.menu__cta { display: grid; gap: 0.6rem; margin-top: 1.25rem; }
.menu[hidden] { display: none; }

/* --------------------------------------------------------------- hero -- */
.hero { position: relative; height: min(calc(100svh - var(--hdr)), 50rem); min-height: 30rem; overflow: hidden; color: var(--page); }
.hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img img { object-fit: cover; object-position: 60% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(to right, rgba(34, 22, 18, 0.5) 0%, rgba(34, 22, 18, 0.22) 45%, rgba(34, 22, 18, 0) 70%),
  linear-gradient(to top, rgba(34, 22, 18, 0.8) 0%, rgba(34, 22, 18, 0.5) 38%, rgba(34, 22, 18, 0) 72%); }
.hero__copy { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: clamp(2rem, 6vw, 4.5rem); max-width: 42rem; }
.hero__copy .kicker { margin: 0 0 1rem; }
.hero__lede { font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem); max-width: 34rem; margin: 1.1rem 0 1.6rem; color: rgba(251, 248, 243, 0.9); }

/* ----------------------------------------------------------- sections -- */
.sec { padding-block: var(--sec); }
.sec--tint { background: var(--tint); }
.sec--sand { background: var(--sand-2); }
.sec--dark { background: var(--night); color: #F2E7D8; }
.sec--dark .intro, .sec--dark .label, .sec--dark .num, .sec--dark .small { color: #C8B39B; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 50rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); }
.split--rev > :first-child { order: 0; }
.prose h3 + p { margin-top: 0.9rem; }
.prose p + h3 { margin-top: 2.2rem; }
.prose p { color: var(--soft); max-width: 34rem; }
.sec--dark .prose p { color: #D7C6B1; }
.aside { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--espresso) !important; margin-top: 1.6rem; }

.media { margin: 0; }
.media img { width: 100%; height: auto; }
.media--43 img { aspect-ratio: 4 / 3; object-fit: cover; height: auto; }
.media--34 img { aspect-ratio: 3 / 4; object-fit: cover; height: auto; }
.media--truck img { max-width: 36rem; margin-inline: auto; }
.media figcaption { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--soft); margin-top: 0.9rem; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid h3 { font-size: 1.4rem; }
.grid p { color: var(--soft); margin: 0.5rem 0 0; font-size: 0.95rem; }

.recipe h3 { font-size: 1.25rem; margin-top: 1rem; }
.recipe p { font-size: 0.88rem; }
.recipe figure img { aspect-ratio: 3 / 4; object-fit: cover; }

.list { list-style: none; margin: 1.25rem 0 1.75rem; padding: 0; }
.list li { position: relative; padding: 0.55rem 0 0.55rem 1.2rem; border-bottom: 1px solid var(--line); }
.list li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* --------------------------------------------------------------- finder -- */
.finder { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; margin-top: clamp(2.5rem, 5vw, 4rem); }
.finder__stage { position: relative; height: 24rem; border-bottom: 1px solid var(--line); }
.finder__dog { position: absolute; bottom: 0; left: 6%; height: 90%; transform-origin: bottom center; }
.finder__dog img { height: 100%; width: auto; }
.finder__box { position: absolute; bottom: 0; right: 6%; width: 38%; transform-origin: bottom center; }
.finder__controls { display: grid; gap: 2rem; }
.control__head { display: flex; justify-content: space-between; align-items: baseline; }
.control__value { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.control__hint { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--espresso); margin: 0.6rem 0 0; min-height: 1.5em; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; margin: 0.5rem 0 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--espresso) 0 var(--fill, 30%), rgba(98, 52, 42, 0.25) var(--fill, 30%) 100%); }
.range::-moz-range-track { height: 2px; background: rgba(98, 52, 42, 0.25); }
.range::-moz-range-progress { height: 2px; background: var(--espresso); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 2.75rem; height: 2.75rem; margin-top: -1.34rem; border-radius: 50%; background: var(--page); border: 1px solid var(--espresso); }
.range::-moz-range-thumb { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--page); border: 1px solid var(--espresso); }
.range__scale { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--soft); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); margin-top: 0.4rem; }
.seg button { min-height: 2.9rem; border: 0; background: transparent; cursor: pointer; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; transition: background-color 120ms ease, color 120ms ease; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }

.result { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 2rem; align-items: center; margin-top: 3rem; padding: 2rem clamp(1.25rem, 3vw, 2.5rem); background: var(--page); }
.result__size { display: flex; align-items: center; gap: 1.1rem; }
.result__size strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.result__size span:not(.label):not(.result__letter) { color: var(--soft); font-size: 0.9rem; }
.result__letter { font-family: var(--serif); font-size: 4.5rem; line-height: 0.8; color: var(--espresso); min-width: 1.4ch; }
.result__price { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.price { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; }
.result__cta { display: grid; gap: 0.6rem; }

/* ---------------------------------------------------------------- plans -- */
.plan { padding: clamp(1.75rem, 3vw, 2.75rem); background: var(--tint); display: flex; flex-direction: column; align-items: flex-start; }
.plan h3 { font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem); }
.plan .list { align-self: stretch; }
.plan .small { margin: 1rem 0 0; }
.plan--dark { background: var(--espresso); color: var(--page); }
.plan--dark .label, .plan--dark .small { color: #E0CCB4; }
.plan--dark .list li { border-color: rgba(251, 248, 243, 0.2); }
.plans .plan p { color: inherit; }
.plans .plan p.small { color: var(--soft); }
.plans .plan--dark p.small { color: #E0CCB4; }

/* ---------------------------------------------------------------- truck -- */
.info dl { margin: 0 0 2rem; display: grid; gap: 1.25rem; }
.info dt { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.info dd { margin: 0.2rem 0 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
.info dd.small { font-family: var(--sans); font-size: 0.9rem; margin-top: 0.1rem; }
.steps { margin: 0.5rem 0 2rem; padding-left: 1.2rem; color: var(--soft); }
.steps li { padding: 0.25rem 0 0.25rem 0.3rem; }

/* ---------------------------------------------------------------- world -- */
.item .label { margin-top: 1rem; }
.item h3 { margin-top: 0.1rem; }

/* ---------------------------------------------------------- helping paw -- */
.big { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; margin-bottom: 1.2rem; }
.stat { margin-top: 2rem; }
.stat__num { display: block; font-family: var(--serif); font-size: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); line-height: 1; color: var(--sand); font-variant-numeric: tabular-nums; }
.stat .label { margin-top: 0.5rem; }
.howto { list-style: none; padding: 0; border-top: 1px solid rgba(242, 231, 216, 0.18); padding-top: 2.5rem; }
.howto .num { margin-top: 0; }
.howto h3 { color: #F2E7D8; }
.sec--dark .grid p { color: #C8B39B; }
.closing { text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); margin: clamp(3rem, 6vw, 4.5rem) auto 0; max-width: 36rem; color: var(--sand); }

/* ------------------------------------------------------------------ faq -- */
.faq { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 1.2rem 2.5rem 1.2rem 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1.05rem; font-family: var(--sans); font-size: 1.4rem; font-weight: 300; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--soft); margin: 0 0 1.3rem; max-width: 42rem; }

/* --------------------------------------------------------------- footer -- */
.foot { background: var(--espresso); color: #F2E7D8; padding: clamp(3.5rem, 6vw, 5rem) 0 2rem; }
.foot .label { color: #D9C3AA; }
.foot p { margin: 0; line-height: 1.9; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.foot__brand svg { width: 4.5rem; height: 4.5rem; color: var(--sand); margin-bottom: 1rem; }
.foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(242, 231, 216, 0.2); font-size: 0.8rem; color: #D9C3AA; }

/* --------------------------------------------------------------- dialog -- */
.order { border: 0; padding: 0; width: min(92vw, 28rem); background: var(--page); color: var(--ink); }
.order::backdrop { background: rgba(34, 22, 18, 0.55); }
.order form, .order__done { padding: 2.25rem; }
.order h2 { font-size: 1.9rem; line-height: 1.1; margin: 0.25rem 0 0.9rem; }
.order p { color: var(--soft); }
.order form label { display: grid; gap: 0.35rem; margin-bottom: 1rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.order input { min-height: 2.9rem; padding: 0.6rem 0.8rem; border: 1px solid var(--ink); background: #fff; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink); }
.order__done { display: none; }
.order.is-done form { display: none; }
.order.is-done .order__done { display: block; }
.order__close { position: absolute; top: 0.5rem; right: 0.5rem; width: 2.75rem; height: 2.75rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--soft); }

/* ------------------------------------------------ paw print on click -- */
.pawprint { position: fixed; z-index: 60; width: 1.6rem; height: 1.6rem; pointer-events: none; color: var(--espresso); opacity: 0; translate: -50% -50%; animation: stamp 1400ms ease-out forwards; }
.pawprint svg { width: 100%; height: 100%; }
.pawprint.on-dark { color: var(--sand); }
@keyframes stamp { 0% { opacity: 0; } 12% { opacity: 0.55; } 70% { opacity: 0.45; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pawprint { display: none; } .btn, .seg button { transition: none; } }

/* ----------------------------------------------------------- responsive -- */
@media (max-width: 1180px) {
  .hdr__in { grid-template-columns: auto 1fr; }
  .hdr__nav { display: none; }
  .hdr__burger { display: inline-flex; }
  .hdr__logo { justify-self: start; }
  .result { grid-template-columns: 1fr 1fr; }
  .result__size { grid-column: 1 / -1; }
  .result__price:nth-of-type(2) { border-left: 0; padding-left: 0; }
  .result__cta { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --hdr: 4.25rem; }
  .hdr__logo svg { width: 2.5rem; height: 2.5rem; }
  .hdr__logo span { font-size: 1.1rem; }
  .split, .finder, .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 2; }
  .finder__stage { height: 17rem; }
  .hero .btn-row .btn { flex: 1 1 auto; }
}
/* phones and portrait tablets: photo on top, text below, so the headline never sits on the dog or the bowl */
@media (max-width: 900px) {
  .hero { height: auto; min-height: 0; overflow: visible; color: var(--ink); }
  .hero::after { display: none; }
  .hero__img { position: relative; display: block; aspect-ratio: 4 / 3; }
  .hero__img img { object-position: 55% 50%; }
  .hero__copy { position: static; max-width: none; padding: 1.6rem var(--gutter) 2.75rem; }
  .hero__copy .kicker { color: var(--soft); margin-bottom: 0.75rem; }
  .hero__lede { color: var(--soft); margin: 0.9rem 0 1.4rem; }
  .hero .btn--light { background: var(--espresso); color: var(--page); }
  .hero .btn--light:hover { background: var(--night); }
  .hero .btn--line-light { border-color: var(--ink); color: var(--ink); }
  .hero .btn--line-light:hover { background: var(--ink); color: var(--page); }
}
@media (max-width: 700px) {
  .hero__img { aspect-ratio: 1 / 1; }
  .hero__img img { object-position: 50% 45%; }
}
@media (max-width: 560px) {
  .grid--4 { gap: 1.5rem 0.9rem; }
  .grid--4 h3 { font-size: 1.15rem; }
  .grid--4 p { font-size: 0.85rem; }
  .result { gap: 1.25rem; padding: 1.5rem 1.1rem; }
  .result__price { padding-left: 1rem; }
  .price { font-size: 1.5rem; }
  .result__cta { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hdr__burger-label { display: none; }
}
