/* =========================================================
   TruTails — Real Food. Real Love.
   Static site styles. No build step.
   ========================================================= */

:root {
  --brown: #3d2218;
  --yellow: #fdd342;
  --beige: #cea576;
  --cream: #fff8ec;
  --white: #ffffff;

  --cream-deep: #fbefdc;
  --rule: rgba(206, 165, 118, 0.45);
  --rule-strong: rgba(206, 165, 118, 0.75);

  --shell: 1200px;
  --pad: 22px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }

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

::selection { background: var(--yellow); color: var(--brown); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brown);
  color: var(--cream);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brown);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  font-variation-settings: "SOFT" 40;
}

/* Section headlines: always the largest text in their section.
   Plain fallback first, fluid scale second (older browsers keep the big size). */
h2 {
  font-size: 2.3rem;
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.02;
  margin-bottom: 20px;
}

h3 { font-size: 1.25rem; line-height: 1.2; }

p { margin: 0 0 16px; max-width: 62ch; }

.lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 46ch;
}

/* Explicit paragraph rhythm in editorial split blocks */
.split-text p { margin-bottom: 20px; }
.split-text p:last-of-type { margin-bottom: 0; }

.kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 14px;
}
.kicker-light { color: var(--cream); opacity: 0.85; }

.chapter {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.chapter::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: var(--rule-strong);
}
.chapter-light { color: var(--yellow); }
.chapter-light::after { background: rgba(253, 211, 66, 0.45); }

.center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  --btn-y: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: var(--btn-y) 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  min-height: 52px;
  cursor: pointer;
  transition: transform 0.28s var(--ease), background-color 0.28s var(--ease),
              color 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.btn-solid {
  background: var(--yellow);
  color: var(--brown);
  box-shadow: 0 1px 0 rgba(61, 34, 24, 0.14);
}
.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(61, 34, 24, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { background: rgba(206, 165, 118, 0.18); transform: translateY(-2px); }

.btn-yellow {
  background: var(--yellow);
  color: var(--brown);
}
.btn-yellow:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.55); }

.btn-sm { --btn-y: 11px; min-height: 42px; padding: 11px 20px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
}

/* ---------- Photo placeholders ---------- */

.ph {
  position: relative;
  margin: 0;
  border-radius: 20px;
  background-color: var(--cream-deep);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(206, 165, 118, 0.14) 0 1px,
      transparent 1px 11px);
  border: 1px solid var(--rule);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(206, 165, 118, 0.6);
  border-radius: 12px;
  pointer-events: none;
}
.ph-label {
  position: relative;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 13px;
  line-height: 1.3;
}

.ph-hero { aspect-ratio: 4 / 3; }
.ph-square { aspect-ratio: 5 / 4; }
.ph-card { aspect-ratio: 3 / 2; border-radius: 14px; margin-bottom: 16px; }
.ph-card::before { inset: 9px; border-radius: 9px; }
.ph-tall { aspect-ratio: 3 / 2; }
.ph-portrait { aspect-ratio: 5 / 4; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 236, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--rule);
  box-shadow: 0 8px 24px -22px rgba(61, 34, 24, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand-logo { width: auto; height: 38px; object-fit: contain; }

.header-nav {
  display: none;
  gap: 32px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.header-nav a { position: relative; padding: 4px 0; color: var(--brown); }
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--brown);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.header-nav a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */

.hero {
  padding: 26px 0 34px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at center, rgba(253, 211, 66, 0.4), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 26px;
}

.hero-title {
  font-size: 3rem;
  font-size: clamp(2.9rem, 13vw, 4.6rem);
  margin: 0 0 16px;
  font-weight: 600;
}
.hero-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--brown);
}

.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 0;
  margin: 20px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trust-strip li {
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--brown);
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; position: relative; }

.band-tan {
  background: var(--cream-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.band-cream-deep { background: var(--cream-deep); }

.section-head { margin-bottom: 42px; max-width: 760px; }

.split { display: grid; gap: 36px; align-items: center; }
.split-text h2 { margin-bottom: 20px; }
.split-text .btn { margin-top: 10px; }

.signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  margin-top: 22px;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  list-style: none !important;
  display: grid;
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 22px;
  overflow: hidden;
}
.step {
  list-style: none !important;
  background: var(--cream);
  padding: 32px 26px 30px;
  transition: background-color 0.3s var(--ease);
}
.step::marker { content: "" !important; }
.step:hover { background: var(--white); }
.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  display: block;
  margin-bottom: 14px;
  color: var(--brown);
}
.step h3 { margin-bottom: 10px; }
.step p { margin: 0; font-size: 0.9375rem; }

/* ---------- Menu ---------- */

.menu-group { margin-bottom: 52px; }

.group-head {
  border-top: 1.5px solid var(--brown);
  padding-top: 16px;
  margin-bottom: 26px;
}
.group-title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.group-note { margin: 0; font-size: 0.9375rem; opacity: 0.82; }

.card-rail {
  display: grid;
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -30px rgba(61, 34, 24, 0.7);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 2px 4px 4px; }
.card-title { font-size: 1.1875rem; margin-bottom: 10px; }

.card-spec {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.card-price {
  font-weight: 700;
  font-size: 1.0625rem;
  white-space: nowrap;
}
.card-descriptor {
  margin: 0 0 18px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.card-body .btn { margin-top: auto; }

/* A single-product group must never sit in a multi-column grid */
.card-rail.is-single { grid-template-columns: minmax(0, 1fr); }

/* Hidden ingredients slot — reserved for a later content pass, never rendered */
.card-ingredients {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Extras (add-ons, deliberately distinct from meals) ---------- */

.menu-group-extras {
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  border-radius: 26px;
  padding: 26px 20px 30px;
}
.menu-group-extras .group-head {
  border-top: none;
  padding-top: 0;
  margin-bottom: 22px;
}
.card-compact { border-radius: 16px; padding: 12px; }
.card-compact .ph-card { aspect-ratio: 1 / 1; border-radius: 11px; margin-bottom: 12px; }
.card-compact .card-body { padding: 0 3px 3px; }
.card-compact .card-title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-bottom: 7px;
}
.card-compact .card-spec { font-size: 0.8125rem; margin-bottom: 14px; }
.card-compact .card-price { font-size: 0.9375rem; }
.card-compact .btn {
  min-height: 44px;
  padding: 11px 18px;
  font-size: 0.8125rem;
  background: transparent;
  border-color: var(--brown);
  box-shadow: none;
}
.card-compact .btn:hover { background: var(--yellow); border-color: var(--yellow); }

/* ---------- Text placeholders (pending copy) ---------- */

.text-ph {
  position: relative;
  min-height: 170px;
  margin: 0 0 18px;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.5);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(206, 165, 118, 0.14) 0 1px,
      transparent 1px 11px);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  padding: 18px;
}
.text-ph::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(206, 165, 118, 0.6);
  border-radius: 11px;
  pointer-events: none;
}
.text-ph-sm { min-height: 76px; margin-bottom: 0; }

.menu-footnote {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}

/* ---------- Raw ---------- */

.raw {
  background: var(--brown);
  color: var(--cream);
}
.raw-inner { max-width: 760px; }
.raw-title { color: var(--cream); }
.raw-body { color: var(--cream); opacity: 0.92; margin-bottom: 28px; font-size: 1.0625rem; }

/* ---------- Freezer ---------- */

.freezer-grid { display: grid; gap: 34px; align-items: start; }

.flow { list-style: none !important; margin: 0; padding: 0; }
.flow-item {
  list-style: none !important;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.flow-item::marker { content: "" !important; }
.flow-item:last-child { border-bottom: 1px solid var(--rule); }
.flow-num {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--brown);
  display: grid;
  place-items: center;
}
.flow-item h3 { margin-bottom: 8px; }
.flow-item p { margin: 0; font-size: 0.9375rem; }

/* ---------- Why ---------- */

.why-grid { display: grid; gap: 16px; }
.why-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}
.why-card:hover { transform: translateY(-3px); }
.why-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 18px;
  stroke: var(--brown);
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.why-card h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.why-card p { margin: 0; font-size: 0.9375rem; opacity: 0.85; }

/* ---------- FAQ ---------- */

.faq-shell { max-width: 880px; }

.faq-item { border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 2px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brown);
  transition: opacity 0.25s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { opacity: 0.66; }

.faq-mark {
  position: relative;
  flex: 0 0 22px;
  height: 22px;
}
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  background: var(--brown);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.faq-mark::before { top: 10px; left: 2px; width: 18px; height: 1.6px; }
.faq-mark::after { left: 10.2px; top: 2px; height: 18px; width: 1.6px; }
.faq-item[open] .faq-mark::after { transform: rotate(90deg); opacity: 0; }

.faq-answer { overflow: hidden; }
.faq-item[open] .faq-answer { animation: faqOpen 0.34s var(--ease); }
.faq-answer p { margin: 0 0 22px; font-size: 0.9375rem; max-width: 66ch; }

@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--brown);
  color: var(--cream);
  padding: 62px 0 118px;
}
.footer-logo { height: 46px; width: auto; object-fit: contain; margin-bottom: 22px; }
.footer-inner { display: grid; gap: 44px; }
.footer-lead .kicker { margin-bottom: 24px; }

.footer-cols { display: grid; gap: 30px; }
.footer-col p { margin: 0 0 6px; font-size: 0.9375rem; color: var(--cream); opacity: 0.86; }
.footer-col a { border-bottom: 1px solid rgba(255, 248, 236, 0.4); transition: border-color 0.25s var(--ease); }
.footer-col a:hover { border-bottom-color: var(--yellow); }

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 248, 236, 0.18);
  font-size: 0.8125rem;
  opacity: 0.72;
  max-width: none;
}

/* ---------- Mobile sticky CTA ---------- */

.mobile-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--brown);
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -14px rgba(61, 34, 24, 0.65);
  transform: translateY(0);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.wa-glyph { width: 20px; height: 20px; fill: var(--brown); }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001s !important; }
}

/* =========================================================
   Breakpoints
   ========================================================= */

/* Mobile: product rails scroll horizontally */
@media (max-width: 767px) {
  .card-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    margin: 0 calc(var(--pad) * -1);
    padding-left: var(--pad);
    padding-right: var(--pad);
    scrollbar-width: none;
  }
  .card-rail::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 79%; scroll-snap-align: start; }
  .card-rail.is-single {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .card-rail.is-single .card { flex: none; }
  .extras-rail {
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .extras-rail .card { flex: 0 0 58%; }
  .header-cta { display: none; }
}

@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  :root { --pad: 34px; }
  .section { padding: 96px 0; }
  .hero { padding: 54px 0 66px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .card-rail { grid-template-columns: repeat(3, 1fr); }
  .rail-4 { grid-template-columns: repeat(2, 1fr); }
  .extras-rail { grid-template-columns: repeat(3, 1fr); }
  .menu-group-extras { padding: 32px 30px 36px; }
  .mobile-cta { display: none; }
  .site-footer { padding-bottom: 62px; }
  .freezer-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .ph-tall { aspect-ratio: 4 / 5; max-height: 560px; }

  /* Single-product group: wider standalone editorial card */
  .card-rail.is-single { grid-template-columns: minmax(0, 1fr); }
  .card-wide {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 18px;
  }
  .card-wide .ph-card { margin-bottom: 0; aspect-ratio: 4 / 3; }
  .card-wide .card-body { padding: 10px 16px 10px 4px; }
  .card-wide .card-title { font-size: 1.375rem; }
  .card-wide .btn-block {
    width: auto;
    align-self: start;
    margin-top: 6px;
    padding-left: 34px;
    padding-right: 34px;
  }
}

@media (min-width: 900px) {
  .header-nav { display: flex; }
  .header-inner { min-height: 82px; }
  .brand-logo { height: 44px; }

  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
  .hero-title { font-size: 4rem; font-size: clamp(3.6rem, 6.4vw, 5.4rem); }

  .split { grid-template-columns: 1fr 1fr; gap: 80px; }
  .split-reverse .split-text { order: 2; }
  .split-reverse .split-media { order: 1; }

  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: 0.9fr 1.4fr; gap: 64px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-legal { grid-column: 1 / -1; }
  .faq-item summary { font-size: 1.25rem; padding: 26px 2px; }
}

@media (min-width: 1024px) {
  .rail-4 { grid-template-columns: repeat(4, 1fr); }
  .extras-rail { grid-template-columns: repeat(5, 1fr); }
}
