/**
 * Garment Printer — Hero Three-Zone (v3.8 SB7 layout)
 * Ported from index-v3.html (lines 134-368) into theme architecture.
 *
 * Geometry:
 *   Desktop (>=1024px): two rows, equal height. Top = Zone A full-bleed.
 *                       Bottom = Zone B (2/3) + Zone C (1/3).
 *   Tablet (<1024px):   single column stack, fixed aspect ratios.
 *   Mobile (<600px):    Zone A switches to 4:5 portrait (art-directed).
 *
 * Per-zone tints:
 *   Zone A — cream (ground-warm)
 *   Zone B — accent-tinted (eucalyptus)
 *   Zone C — dark ink
 *
 * Branding tokens are scoped to .hero-three-zone so this section can ship
 * before the theme's global Eucalyptus tokens land. Once theme.css adopts
 * these values, the locally-scoped block can be removed (see PORT-NOTES.md).
 */

.hero-three-zone {
  /* Precision V2 Light — heritage navy + slate + aluminum on white (skin variant) */
  --hz-accent: #1B365D;
  --hz-accent-ink: #0B2545;
  --hz-accent-mute: #8E96A0;
  --hz-accent-tint: #ECEEF1;
  --hz-ground: #FFFFFF;
  --hz-ground-warm: #F7F8FA;
  --hz-ground-edge: #ECEEF1;
  --hz-ink: #0B2545;
  --hz-ink-soft: #1B365D;
  --hz-ink-mute: #5B6470;
  --hz-hairline: #D6D9DD;
  --hz-on-ink: #FFFFFF;

  /* Funnel — locked typography from brief/brand-decisions.md */
  --hz-font-display: 'Funnel Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hz-font-text: 'Funnel Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hz-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Spacing scale (mirrors v3.8 --b1..--b9) */
  --hz-b1: 8px;
  --hz-b2: 16px;
  --hz-b3: 24px;
  --hz-b4: 32px;

  width: 100%;
  background: var(--hz-ground);
  border-bottom: 1px solid var(--hz-hairline);
  color: var(--hz-ink);
  font-family: var(--hz-font-text);
}

/* ─── Row container ────────────────────────────────────────────
   Desktop: both rows share the same height for equal visual weight.
   Tablet/mobile: heights collapse and aspect ratios drive sizing. */
.hero-three-zone__row {
  width: 100%;
  height: 42vh;
  min-height: 360px;
  max-height: 500px;
  position: relative;
}

@media (max-width: 1023px) {
  .hero-three-zone__row {
    height: auto;
    min-height: 0;
    max-height: none;
  }
}

/* Bottom row: 2/3 + 1/3 split on desktop, stacked on tablet/mobile */
.hero-three-zone__row--bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 1023px) {
  .hero-three-zone__row--bottom {
    grid-template-columns: 1fr;
  }
}

/* Workshop-first dominance (locked May 14 pivot / BIBLE.md): top row (Workshop)
   taller, bottom row (Equipment + Supplies) reduced. Desktop only — tablet/mobile
   keep the auto-height + aspect-ratio behavior defined above. */
@media (min-width: 1024px) {
  .hero-three-zone__row--top {
    height: 52vh;
    min-height: 440px;
    max-height: 600px;
  }
  .hero-three-zone__row--bottom {
    height: 34vh;
    min-height: 300px;
    max-height: 420px;
  }
}

/* ─── Zone container ───────────────────────────────────────────
   Fills its row cell and clips a full-bleed banner. */
.hero-three-zone__zone {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background: var(--hz-ground-edge);
}

.hero-three-zone__zone picture,
.hero-three-zone__zone > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hide hairline border for image (banner) mode — only placeholder needs it */
.hero-three-zone__zone--has-image {
  background: var(--hz-ink);
}

/* Aspect ratios per breakpoint — drive height when row.height = auto */
@media (max-width: 1023px) {
  .hero-three-zone__zone--a { aspect-ratio: 16 / 9; }
  .hero-three-zone__zone--b { aspect-ratio: 16 / 9; }
  .hero-three-zone__zone--c { aspect-ratio: 1.07 / 1; }
}

@media (max-width: 599px) {
  .hero-three-zone__zone--a { aspect-ratio: 4 / 5; }      /* mobile: portrait, art-directed */
  .hero-three-zone__zone--b { aspect-ratio: 16 / 9; }
  .hero-three-zone__zone--c { aspect-ratio: 1.07 / 1; }
}

/* ─── Banner mode (image is set) ───────────────────────────────
   Optional title overlay shown on image-loaded zones. */
.hero-three-zone__banner-link,
.hero-three-zone__banner-wrap {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-three-zone__banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--hz-b4);
  background: linear-gradient(to bottom, transparent 55%, rgba(31, 44, 40, 0.75) 100%);
  color: #fff;
}

.hero-three-zone__banner-title {
  font-family: var(--hz-font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  max-width: 22ch;
}

/* ─── Placeholder mode (no image set) ──────────────────────────
   v3.8 SB7 annotation block. Each zone shows its role + designed-for
   dimensions so Fern can review the brief without final art. */
.hero-three-zone__placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--hz-b4);
  background: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(0, 0, 0, 0.025) 14px 28px
  );
  border-top: 1px solid var(--hz-hairline);
  border-bottom: 1px solid var(--hz-hairline);
  color: var(--hz-ink-soft);
}

/* Per-zone tinted backgrounds */
.hero-three-zone__zone--a .hero-three-zone__placeholder {
  background-color: var(--hz-ground-warm);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(74, 122, 110, 0.04) 14px 28px
  );
}

.hero-three-zone__zone--b .hero-three-zone__placeholder {
  background-color: var(--hz-accent-tint);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(74, 122, 110, 0.05) 14px 28px
  );
  border-right: 1px solid var(--hz-hairline);
}

.hero-three-zone__zone--c .hero-three-zone__placeholder {
  background-color: var(--hz-ink);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(255, 255, 255, 0.025) 14px 28px
  );
  color: var(--hz-on-ink);
}

/* Numbered corner marker (top-left) */
.hero-three-zone__placeholder::before {
  content: attr(data-zone-num);
  position: absolute;
  top: var(--hz-b3);
  left: var(--hz-b3);
  font-family: var(--hz-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--hz-ink-mute);
  border-left: 2px solid var(--hz-accent);
  padding-left: 8px;
  line-height: 1;
}

.hero-three-zone__zone--c .hero-three-zone__placeholder::before {
  color: var(--hz-accent-mute);
  border-left-color: var(--hz-accent-mute);
}

/* "Banner Pending" status pill (top-right) */
.hero-three-zone__placeholder::after {
  content: 'Banner Pending';
  position: absolute;
  top: var(--hz-b3);
  right: var(--hz-b3);
  font-family: var(--hz-font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hz-accent);
  background: var(--hz-ground);
  padding: 4px 10px;
  border: 1px solid var(--hz-accent);
  border-radius: 100px;
}

.hero-three-zone__zone--c .hero-three-zone__placeholder::after {
  color: var(--hz-accent-mute);
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--hz-accent-mute);
}

/* Annotated copy stack inside placeholder */
.hero-three-zone__ph-id {
  font-family: var(--hz-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hz-accent);
  margin-bottom: var(--hz-b1);
}

.hero-three-zone__zone--c .hero-three-zone__ph-id {
  color: var(--hz-accent-mute);
}

.hero-three-zone__ph-title {
  font-family: var(--hz-font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--hz-ink);
  margin-bottom: var(--hz-b2);
  max-width: 22ch;
}

.hero-three-zone__zone--c .hero-three-zone__ph-title {
  color: var(--hz-on-ink);
}

.hero-three-zone__ph-role {
  font-family: var(--hz-font-text);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
  color: var(--hz-ink-soft);
  max-width: 44ch;
  margin-bottom: var(--hz-b3);
}

.hero-three-zone__zone--c .hero-three-zone__ph-role {
  color: rgba(255, 255, 255, 0.72);
}

.hero-three-zone__ph-role em {
  font-style: italic;
  color: var(--hz-ink);
}

.hero-three-zone__zone--c .hero-three-zone__ph-role em {
  color: var(--hz-accent-mute);
}

.hero-three-zone__ph-meta {
  font-family: var(--hz-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hz-ink-mute);
  display: inline-flex;
  gap: var(--hz-b3);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--hz-b1) var(--hz-b3);
  border-top: 1px solid var(--hz-hairline);
  border-bottom: 1px solid var(--hz-hairline);
}

.hero-three-zone__zone--c .hero-three-zone__ph-meta {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-three-zone__ph-meta span {
  color: var(--hz-accent-ink);
  font-weight: 500;
}

.hero-three-zone__zone--c .hero-three-zone__ph-meta span {
  color: var(--hz-accent-mute);
}

/* Tighter padding for the narrow Zone C placeholder on desktop */
.hero-three-zone__zone--c .hero-three-zone__placeholder {
  padding: var(--hz-b3) var(--hz-b2);
}

.hero-three-zone__zone--c .hero-three-zone__ph-role {
  max-width: 28ch;
}

.hero-three-zone__zone--c .hero-three-zone__ph-meta {
  gap: var(--hz-b1);
  padding: var(--hz-b1) var(--hz-b2);
}

/* ──────────────────────────────────────────────────────────────────────
   Subhead + Button stack — applies to both BANNER and PLACEHOLDER modes
   ────────────────────────────────────────────────────────────────────── */

/* Subhead — placeholder mode */
.hero-three-zone__ph-subhead {
  font-family: var(--hz-font-text);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--hz-ink-soft);
  max-width: 52ch;
  margin: var(--hz-b1) 0 var(--hz-b3);
  text-align: center;
}

.hero-three-zone__zone--c .hero-three-zone__ph-subhead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 32ch;
}

/* Subhead — banner mode (overlay on image) */
.hero-three-zone__banner-subhead {
  font-family: var(--hz-font-text);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-width: 52ch;
  margin: var(--hz-b2) 0 var(--hz-b3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Button stack — placeholder + banner share base styles */
.hero-three-zone__ph-buttons,
.hero-three-zone__banner-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--hz-b2);
  margin: var(--hz-b2) 0 var(--hz-b3);
  align-items: center;
}

/* Banner mode buttons sit inside the overlay, aligned with the title */
.hero-three-zone__banner-buttons {
  margin-top: var(--hz-b3);
}

/* Banner overlay — give text/buttons room to breathe + readable backdrop */
.hero-three-zone__banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--hz-b4) var(--hz-b4);
  background: linear-gradient(
    to top,
    rgba(15, 21, 20, 0.78) 0%,
    rgba(15, 21, 20, 0.45) 35%,
    rgba(15, 21, 20, 0.10) 65%,
    rgba(15, 21, 20, 0) 100%
  );
  pointer-events: none;
}

.hero-three-zone__banner-overlay > * {
  pointer-events: auto;
}

.hero-three-zone__banner-title {
  font-family: var(--hz-font-display);
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  color: var(--hz-on-ink);
  max-width: 24ch;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Zone C narrower — title shrinks, max-width tighter */
.hero-three-zone__zone--c .hero-three-zone__banner-title {
  font-size: clamp(20px, 2.2vw, 30px);
  max-width: 20ch;
}

.hero-three-zone__zone--c .hero-three-zone__banner-subhead {
  max-width: 30ch;
}

/* ──────────────────────────────────────────────────────────────────────
   Button styles — .btn-hero
   ────────────────────────────────────────────────────────────────────── */

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-family: var(--hz-font-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-hero--primary {
  background: var(--hz-accent);
  color: var(--hz-on-ink);
  border-color: var(--hz-accent);
}

.btn-hero--primary:hover {
  background: var(--hz-accent-ink);
  border-color: var(--hz-accent-ink);
  transform: translateY(-1px);
}

.btn-hero--secondary {
  background: transparent;
  color: var(--hz-ink);
  border-color: var(--hz-ink);
}

/* Secondary on dark/banner backgrounds becomes white-ghost */
.hero-three-zone__banner-overlay .btn-hero--secondary,
.hero-three-zone__zone--c .btn-hero--secondary {
  color: var(--hz-on-ink);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-hero--secondary:hover {
  background: var(--hz-ink);
  color: var(--hz-on-ink);
  transform: translateY(-1px);
}

.hero-three-zone__banner-overlay .btn-hero--secondary:hover,
.hero-three-zone__zone--c .btn-hero--secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--hz-on-ink);
  border-color: var(--hz-on-ink);
}

/* Mobile: stack buttons full-width */
@media (max-width: 600px) {
  .hero-three-zone__ph-buttons,
  .hero-three-zone__banner-buttons {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: var(--hz-b1);
  }
  .btn-hero {
    width: 100%;
    padding: 14px 20px;
  }
  .hero-three-zone__banner-overlay {
    padding: var(--hz-b3) var(--hz-b3);
  }
}
