/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4
 * macrostructure: T64 blessed §4 (BioPak structure × noissue polish × Nisbets
 * trade mechanics) — owner-blessed 13/08/2026, diversification suspended:
 * nav = LOCKED T55 header · footer = LOCKED T44/T16 footer (neither rendered
 * or styled here). theme: locked F&J tokens (navy #16203F · gold #B8893C ·
 * royal #2B4C9B · paper #F7F5F1 · Fraunces 700 display) — consumed from
 * style.css. Zero raw colour values in this file SINCE THE R3 FIX (D6):
 * whites ride --white/--white-92/--white-72 and the 10px radius rides
 * --fj-radius-lg, all from the style.css T64 token block.
 * enrichment: labelled photography slots only (Fred's 13/08 photo carve-out;
 * register control/PHOTO_SLOTS_T64.md) — no stock, no generated imagery.
 * motion: fade/settle reveal only, gated behind html.fj-t64-anim +
 * prefers-reduced-motion: no-preference; JS-off renders everything visible.
 *
 * T64 · SIGNED-OUT MARKETING HOME (templates/template-home.php).
 * Loads only on that template (inc/fj-home.php, dep: fj-storefront-style so
 * the T54 tokens are always underneath). Class namespace fj-t64-* — the
 * Phase-0 .fj-hero/.fj-tiles rules in fj-components.css are now unreferenced
 * and deliberately left in place (blast radius: zero shared files touched).
 */

/* ---------- frame ---------- */

.fj-t64 {
  overflow-x: clip; /* never hidden — the #109 sticky lesson */
}
.fj-t64-wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.fj-t64 > section {
  padding-block: var(--space-8);
}
.fj-t64-h2 {
  font-size: clamp(24px, 3vw, var(--text-3xl));
  line-height: 1.15;
  margin: 0 0 var(--space-6);
  overflow-wrap: anywhere;
  min-width: 0;
}
.fj-t64-h2--onnavy {
  color: var(--white);
}

/* ---------- buttons (shared, 8-state via theme globals) ---------- */

.fj-t64-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--fj-radius);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap; /* gate 49 — no two-line clickable text; labels are short */
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.fj-t64-btn--primary {
  background: var(--royal);
  color: var(--white);
}
.fj-t64-btn--primary:hover,
.fj-t64-btn--primary:focus {
  background: var(--fj-azure);
  color: var(--white);
}
.fj-t64-btn--line {
  background: transparent;
  color: var(--royal);
  border: 2px solid var(--royal);
}
.fj-t64-btn--line:hover,
.fj-t64-btn--line:focus {
  color: var(--fj-azure);
  border-color: var(--fj-azure);
  background: var(--white);
}
.fj-t64-btn--gold {
  background: var(--gold);
  color: var(--navy); /* dark text on gold — brand contrast rule */
}
.fj-t64-btn--gold:hover,
.fj-t64-btn--gold:focus {
  background: var(--gold-l);
  color: var(--navy);
}

/* ---------- icons ---------- */

.fj-t64-ic {
  flex: 0 0 auto;
  color: var(--fj-slate); /* decorative, beside its own text label */
}

/* ---------- §4.1 hero ---------- */

.fj-t64-hero {
  background: var(--paper);
}
.fj-t64-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}
.fj-t64-hero__h {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  margin: 0 0 var(--space-4);
  max-width: 18ch;
  overflow-wrap: anywhere;
  min-width: 0;
}
.fj-t64-hero__sub {
  font-size: var(--text-lg);
  color: var(--fj-ink-soft);
  margin: 0 0 var(--space-6);
  max-width: 48ch;
}
.fj-t64-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.fj-t64-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.fj-t64-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--fj-ink-soft);
}
.fj-t64-chip a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--royal);
}

/* HERO-01 — labelled photography slot (type-and-colour-led, never stock). */
.fj-t64-hero__slot,
.fj-t64-hero__photo {
  margin: 0;
  border-radius: var(--fj-radius-lg);
  overflow: hidden;
}
.fj-t64-hero__img {
  display: block;
  width: 100%;
  height: auto;
}
.fj-t64-slot {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-8) var(--space-6);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.fj-t64-hero__slot {
  min-height: 240px;
}
.fj-t64-slot__id {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: 0.08em;
  color: var(--gold-l); /* gold-l on navy — decorative label surface */
}
.fj-t64-slot__label {
  color: var(--white);
  font-size: var(--text-sm);
  max-width: 32ch;
}
.fj-t64-slot__spec {
  color: var(--white-72);
  font-size: var(--text-xs);
}

@media (min-width: 900px) {
  .fj-t64-hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
  .fj-t64-hero__slot {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

/* ---------- §4.2 category tiles ---------- */

.fj-t64-cats {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fj-t64-tilegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: var(--space-5);
}
.fj-t64-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--fj-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* D7 (critique r3): motion discipline = transform/opacity ONLY. box-shadow
   * is OFF the transition list — the hover shadow snaps on deliberately
   * (an ::after fade would be clipped by this box's own overflow: hidden). */
  transition: transform 0.18s var(--ease-out);
}
.fj-t64-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--fj-shadow);
}
.fj-t64-tile__main {
  display: block;
  text-decoration: none;
  padding-bottom: var(--space-2);
}
.fj-t64-tile__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--paper);
}
.fj-t64-tile__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Type-led face for a category without a T21 tile — never a blank tile. */
.fj-t64-tile__media--type {
  background: var(--paper);
  background: var(--tint-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.fj-t64-tile__media--type span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--navy);
  text-align: center;
  overflow-wrap: anywhere;
  min-width: 0;
}
.fj-t64-tile__name {
  display: block;
  padding: var(--space-3) var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--fj-ink);
}
.fj-t64-tile__count {
  display: block;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
}
.fj-t64-tile__subs {
  list-style: none;
  /* M5a (critique r3): auto top margin floors the subs block, so equal-height
   * grid rows stretch the gap ABOVE the sub-links, never dead space below. */
  margin: auto 0 0;
  padding: var(--space-2) var(--space-4) var(--space-4);
  border-top: 1px solid var(--line);
}
.fj-t64-tile__subs a {
  /* M3 (critique r3): full-width 44px rows — tap-target pass, was 36px inline. */
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--royal);
}

/* M2 (critique r3): ≤700px the 13+1 tile column collapses to COMPACT ROWS —
 * 96px square media beside the name/count pair, sub-links off. Kills the
 * ~6,000px §4.2 scroll wall on phones. Tokens only. */
@media (max-width: 700px) {
  .fj-t64-tile__main {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    padding-bottom: 0;
  }
  .fj-t64-tile__media {
    grid-row: 1 / -1;
    width: 96px;
    height: 96px;
    aspect-ratio: auto;
  }
  .fj-t64-tile__media--type {
    padding: var(--space-2);
  }
  .fj-t64-tile__media--type span {
    font-size: var(--text-sm);
  }
  .fj-t64-tile__name {
    align-self: end;
    padding: 0 var(--space-3);
    font-size: var(--text-base);
  }
  .fj-t64-tile__count {
    align-self: start;
    padding: 0 var(--space-3);
  }
  .fj-t64-tile__subs {
    display: none;
  }
}

/* ---------- §4.3 trade strip ---------- */

.fj-t64-trade {
  background: var(--navy);
  color: var(--white);
}
.fj-t64-trade__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}
.fj-t64-trade__pitch {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-4);
  max-width: 48ch;
}
.fj-t64-trade__gst {
  color: var(--white-92);
  font-size: var(--text-base);
  margin: 0 0 var(--space-6);
  max-width: 60ch;
}
.fj-t64-promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.fj-t64-promises a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.fj-t64-promises a:hover,
.fj-t64-promises a:focus {
  color: var(--gold-l); /* gold-l on navy 7.3:1-class — hover only, base is white */
  text-decoration: underline;
}
.fj-t64-promises .fj-t64-ic {
  color: var(--gold-l); /* decorative; gold-l clears 3:1 on navy */
}
.fj-t64-trade__photo {
  margin: 0;
  border-radius: var(--fj-radius-lg);
  overflow: hidden;
}
.fj-t64-trade__img {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 900px) {
  .fj-t64-trade__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .fj-t64-trade__grid:has(.fj-t64-trade__photo) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

/* ---------- §4.4 own-brand band ---------- */

.fj-t64-brandgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}
.fj-t64-brand {
  border: 1px solid var(--line);
  border-radius: var(--fj-radius-lg);
  padding: var(--space-7);
  background: var(--paper);
}
.fj-t64-brand--planetwise {
  background: var(--paper);
  background: var(--tint-planetwise); /* line-accent tint only (design lane) */
  border-top: 4px solid var(--fj-planetwise-leaf);
}
.fj-t64-brand--jura {
  background: var(--paper);
  background: var(--tint-jura);
  border-top: 4px solid var(--fj-jura-glacier);
}
.fj-t64-brand__mark {
  margin: 0 0 var(--space-4);
}
.fj-t64-brand__mark-img {
  /* LOGO RULE 3 — one dimension only, never distort */
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  align-self: flex-start;
}
.fj-t64-brand__name {
  margin: 0 0 var(--space-3);
  font-size: var(--text-2xl);
}
.fj-t64-brand p {
  margin: 0 0 var(--space-4);
  color: var(--fj-ink);
  max-width: 52ch;
}
.fj-t64-brand__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--royal);
}
@media (min-width: 760px) {
  .fj-t64-brandgrid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- §4.5 merchandised row ---------- */

.fj-t64-popular {
  background: var(--white);
  border-top: 1px solid var(--line);
}
.fj-t64-popular .woocommerce {
  margin-top: var(--space-4);
}

/* ---------- §4.7 switch-to-us teaser (D8 — a filled slot renders decently;
   the section is a direct child of .fj-t64 so padding-block comes from the
   frame rule. Adds NO content — styles the empty-until-approved slot only. */

.fj-switch-teaser {
  background: var(--white);
  border-top: 1px solid var(--line);
}
.fj-switch-teaser p {
  max-width: 60ch;
  margin: 0 auto;
  padding-inline: var(--space-4);
  font-size: var(--text-lg);
  color: var(--fj-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ---------- reveal (fade/settle ONLY; JS-off = everything visible) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.fj-t64-anim .fj-t64 > section {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  }
  html.fj-t64-anim .fj-t64 > section.fj-t64-in {
    opacity: 1;
    transform: none;
  }
}
