/* ============================================================
   Home page — mobile-first
   ============================================================ */

.hero { padding: 2.5rem 0 1rem; }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: var(--step-4);
  margin: 1rem 0 1.1rem;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 1.7rem;
}
.hero-actions { display: flex; gap: 1rem 0.85rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hero-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.hero-note a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.hero-artifact { position: relative; max-width: 420px; margin: 0 auto; }

/* The carrier pigeon, mid-delivery over the card */
.pc-hero-pigeon {
  position: absolute;
  top: -32px;
  left: -30px;
  width: 92px;
  height: auto;
  color: var(--postal-red);
  z-index: 3;
  filter: drop-shadow(0 6px 10px rgba(53, 40, 22, 0.28));
  animation: pigeon-bob 4.6s ease-in-out infinite;
}
@keyframes pigeon-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) { .pc-hero-pigeon { animation: none; } }
@media (max-width: 480px) { .pc-hero-pigeon { width: 66px; top: -20px; left: -12px; } }
.pc-hero {
  width: 100%;
  transform: rotate(2.5deg);
  position: relative;
}
.pc-hero::after {
  /* a strip of washi tape holding the card down */
  content: "";
  position: absolute;
  top: -14px;
  left: 62%;
  width: 96px;
  height: 30px;
  background: repeating-linear-gradient(45deg, var(--tape) 0 6px, var(--tape-stripe) 6px 12px);
  border: 1px solid var(--tape);
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 1px;
}
.hero-artifact-caption {
  margin: 1.6rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---- Hero postcard mockup (the "back" of a postcard, matching the
   real 6x4 layout geometry: ~60% message side, ~40% address side) ---- */
.pc-hero-card {
  aspect-ratio: 3 / 2;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  display: flex;
  overflow: hidden;
  position: relative;
}
.pc-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-on-surface);
  background-image: var(--grain);
  background-size: 150px 150px;
  opacity: 0.1;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.pc-hero-message-side {
  flex: 0 0 60%;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 6% 5%;
  border-right: 1px solid var(--border-on-surface);
}
.pc-hero-message-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.pc-hero-message-svg path {
  fill: none;
  stroke: #1e1b17;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pc-hero-address-side {
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 8% 7%;
  display: flex;
  align-items: flex-end;
}

.pc-hero-return {
  position: absolute;
  top: 7%;
  left: 7%;
  right: 7%;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.pc-hero-stamp {
  position: absolute;
  top: 6%;
  right: 6%;
  width: 27%;
  aspect-ratio: 0.85;
  --pp: 7px;
  --pr: 2px;
  background:
    radial-gradient(var(--pr) at 50% 0, var(--paper) 96%, #0000) top / var(--pp) calc(var(--pr) * 2) repeat-x,
    radial-gradient(var(--pr) at 50% 100%, var(--paper) 96%, #0000) bottom / var(--pp) calc(var(--pr) * 2) repeat-x,
    radial-gradient(var(--pr) at 0 50%, var(--paper) 96%, #0000) left / calc(var(--pr) * 2) var(--pp) repeat-y,
    radial-gradient(var(--pr) at 100% 50%, var(--paper) 96%, #0000) right / calc(var(--pr) * 2) var(--pp) repeat-y,
    color-mix(in srgb, var(--brass) 22%, var(--paper));
  box-shadow: 0 3px 8px -4px rgba(53, 40, 22, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pc-hero-stamp span {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--stamp-gray);
}

.pc-hero-postmark {
  position: absolute;
  top: 9%;
  right: 33%;
  width: 24%;
  aspect-ratio: 1;
  border: 1.5px solid var(--postmark-ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.38rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--postmark-ink);
  transform: rotate(-10deg);
}

.pc-hero-addr-lines {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--ink);
}

@media (min-width: 480px) {
  .pc-hero-addr-lines { font-size: 0.78rem; }
}

@media (min-width: 900px) {
  .hero { padding: 4rem 0 2rem; }
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3.5rem; }
  .hero-artifact { max-width: none; margin: 0; }
  .hero-copy h1 { max-width: 14ch; }
  .hero-sub { font-size: 1.1rem; }
}

/* ---- Steps teaser — a strip of four stamps ---- */
.steps-teaser-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.step-tease {
  position: relative;
  background: var(--bg-raised);
  color: var(--text);
  border: 1.5px dashed var(--border-strong);
  border-radius: 3px;
  padding: 1.4rem 1.3rem;
  box-shadow: 0 8px 20px -14px rgba(53, 40, 22, 0.35);
}
.step-tease-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--postal-red);
  margin-bottom: 0.9rem;
}
.step-tease h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.step-tease p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.steps-teaser-foot {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.steps-teaser-foot a { color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; }

@media (min-width: 560px) {
  .steps-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
}
@media (min-width: 960px) {
  .steps-teaser-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- Gallery / corkboard ---- */
.gallery-board {
  padding: 2.5rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem 1.6rem;
}
.gallery-item { position: relative; }
.gallery-card {
  aspect-ratio: 3 / 2;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 12px 22px -10px rgba(53, 40, 22, 0.5);
  transform: rotate(var(--tilt, -2deg));
}
.gallery-item::before {
  /* a pin holding the postcard to the board */
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d98b7e, var(--postal-red-dark));
  box-shadow: 0 3px 5px -1px rgba(53, 40, 22, 0.55);
  transform: translateX(-50%);
  z-index: 2;
}
.gallery-item:nth-child(2) { --tilt: 1.5deg; }
.gallery-item:nth-child(3) { --tilt: -1deg; }
.gallery-item:nth-child(4) { --tilt: 2.2deg; }
.gallery-caption {
  margin-top: 0.85rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  transform: rotate(var(--tilt, 0deg));
}

@media (min-width: 560px) {
  .gallery-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .gallery-board { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 3rem 2.75rem 3.5rem; }
}

/* ---- Tech callout ---- */
.tech-callout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.tech-callout h2 { font-size: var(--step-2); }
.tech-callout p { color: var(--text-dim); }
.tech-callout-link { color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; font-size: 0.95rem; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 0.6rem;
}
.pipeline-node {
  text-align: center;
  padding: 1.1rem 0.6rem;
  background: var(--bg-sunken);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}
.pipeline-node svg { margin: 0 auto 0.6rem; width: 32px; height: 32px; }
.pipeline-node span { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.pipeline-arrow { display: none; }

@media (min-width: 520px) {
  .pipeline { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 860px) {
  .tech-callout { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 3rem; padding: 3rem; }
}

/* ---- CTA band — a red parcel label; text is always light on it ---- */
.cta-band {
  background: linear-gradient(135deg, var(--postal-red-dark), var(--postal-red));
  border-radius: var(--radius-lg);
  padding: 2.6rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.cta-band h2 { font-size: var(--step-2); margin-bottom: 0.6rem; color: var(--on-dark); }
.cta-band p { color: var(--on-dark-dim); margin-bottom: 1.6rem; }
.cta-band .btn-primary { --stamp-punch: var(--postal-red-dark); }
.cta-band .btn-outline { border-color: rgba(242, 236, 224, 0.6); color: var(--on-dark); }
.cta-band .btn-outline:hover { background: rgba(242, 236, 224, 0.14); border-color: var(--on-dark); color: var(--on-dark); }
@media (min-width: 640px) { .cta-band { padding: 3.2rem 2rem; } }
