/* =============================================================
   SockNSock - one-page landing site
   Premium / industrial · Archivo + IBM Plex Mono · sock-red accent
   Faithful recreation of the SockNSock design (v1, light editorial).
   ============================================================= */

:root {
  --accent: #E2350F;        /* sock red - change to re-theme the whole site */
  --accent-dark: #C32C0B;   /* hover / pressed state */
  --paper: #F6F2EA;         /* page background */
  --paper-alt: #EFEAE0;     /* product section background */
  --ink: #17120E;           /* near-black text / dark sections */
  --text: #4A4034;          /* body copy on paper */
  --text-soft: #5A5043;     /* secondary body copy */
  --muted: #6B6256;         /* mono labels on paper */
  --muted-dark: #A89E90;    /* mono labels on dark */
  --muted-dark-2: #C9C0B4;  /* body copy on dark */
  --hairline: rgba(23, 18, 14, 0.12);

  /* scroll-reveal timing - the two knobs worth tuning. Per-element offsets
     live on data-reveal-delay / data-reveal-stagger in index.html. */
  --reveal-duration: 0.9s;
  --reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; } /* offset so the sticky header doesn't cover section headings on anchor jumps */
body {
  margin: 0;
  font-family: Archivo, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- layout primitives ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}
.mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* section heading pattern (number · kicker · title · lede) */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}
.sec-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.sec-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec-title {
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.sec-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  max-width: 34em;
  margin: 0 0 56px;
}

/* ---------- buttons ---------- */
.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost {
  color: var(--ink);
  border: 1.5px solid rgba(23, 18, 14, 0.25);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; border-radius: 3px; }
.btn--dark:hover { background: #000; }

/* ---------- image slots (fillable placeholders) ----------
   Drop a real image into /images with the expected filename and it
   appears here automatically. Until then a labelled dashed box shows. */
.slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 18, 14, 0.04);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* a loaded image paints above the placeholder label */
}
.slot--contain img { object-fit: contain; }
.slot__label {
  position: relative;
  z-index: 0;
  display: none; /* only shown when the slot has no image (see below) */
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(23, 18, 14, 0.5);
  text-align: center;
  padding: 14px;
  pointer-events: none;
}
/* hide a broken/empty <img>, and reveal the placeholder label only then —
   so a loaded `contain` logo never shows the label through its margins */
.slot img.is-empty { display: none; }
.slot img.is-empty ~ .slot__label { display: block; }
/* dark-surface variant (logo on the Inter Market backbone card) */
.slot--on-dark {
  background: rgba(246, 242, 234, 0.06);
  border-color: rgba(246, 242, 234, 0.16);
}
.slot--on-dark .slot__label { color: rgba(246, 242, 234, 0.5); }

/* =============================================================
   NAV
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 234, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.brand .accent { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  white-space: nowrap;
}
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-link:hover { color: var(--accent); }
.nav-cta {
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 20px;
}

/* =============================================================
   HERO
   ============================================================= */
.hero { max-width: 1240px; margin: 0 auto; padding: 84px 40px 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.eyebrow__rule {
  width: 34px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow__text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.hero-title {
  font-weight: 900;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.hero-lede {
  font-size: 19px;
  line-height: 1.58;
  color: var(--text);
  max-width: 30em;
  margin: 0 0 36px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-actions .btn { font-size: 15px; padding: 17px 30px; }
.hero-actions .btn--ghost { padding: 17px 26px; }
.hero-actions .btn .arrow { font-size: 18px; }
.hero-figure { position: relative; }

/* =============================================================
   STORY / ORIGIN
   ============================================================= */
/* Sections separate by surface, not by rules. Full running order:
   Hero (paper) → Partners (dark) → Founder (paper) → Story (alt) →
   Why (paper) → Product (alt) → Certifications (dark) → Feed (paper) →
   Contact (accent) → Footer (dark). No two neighbours share a surface, so
   every block reads as its own plane with no hairline drawn between them. */
.story { background: var(--paper-alt); }
.story__inner { max-width: 1240px; margin: 0 auto; padding: 96px 40px; }
.story .sec-title { margin-bottom: 44px; max-width: 15em; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 52px;
  align-items: start;
}
.story-body p { font-size: 19px; line-height: 1.62; color: var(--text); margin: 0 0 20px; }
.story-body p:nth-of-type(3) { margin-bottom: 24px; }
.story-body strong { color: var(--ink); font-weight: 700; }
.signature { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.signature__name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 600;
}
.signature__role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.signature__linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--ink);
  border: 1px solid rgba(23, 18, 14, 0.2);
  border-radius: 3px;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}
.signature__linkedin:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.signature__linkedin svg { flex-shrink: 0; }
.backbone {
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 34px 32px;
}
.backbone__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 20px;
}
/* Inter Market logo on a white chip sized to the logo (no empty white box) */
.backbone .slot {
  display: inline-flex;
  width: auto;
  height: auto;
  background: #fff;
  border: 0;
  border-radius: 8px;
  padding: 16px 22px;
  margin-bottom: 24px;
}
.backbone .slot img {
  position: static;
  width: auto;
  height: 64px; /* prominent logo; chip shrinks to fit it */
  max-width: 100%;
}
.backbone__body { font-size: 15.5px; line-height: 1.58; color: var(--muted-dark-2); margin: 0 0 22px; }
.backbone__link {
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 600;
}
.backbone__link:hover { color: var(--accent-dark); }

/* =============================================================
   WHY US
   ============================================================= */
.why { background: var(--paper); }
.why__inner { max-width: 1240px; margin: 0 auto; padding: 96px 40px; }
.why .sec-title { max-width: 16em; }
.why .sec-lede { max-width: 34em; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr));
  gap: 22px;
}
.why-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 30px 28px;
  transition: border-color 0.15s ease;
}
.why-card:hover { border-color: var(--accent); }
.why-card__letter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
}
.why-card h3 { font-weight: 800; font-size: 21px; letter-spacing: -0.01em; margin: 0 0 12px; }
.why-card p { font-size: 15.5px; line-height: 1.55; color: var(--text-soft); margin: 0; }

/* =============================================================
   PRODUCT / 9-POINT STANDARD
   ============================================================= */
.product {
  background: var(--paper-alt);
}
.product__inner { max-width: 1240px; margin: 0 auto; padding: 118px 40px; }
.product-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 52px;
  align-items: end;
  margin-bottom: 56px;
}
.product-intro .sec-title { margin-bottom: 18px; }
.product-intro p { font-size: 18px; line-height: 1.55; color: var(--text); max-width: 32em; margin: 0; }
.product-intro .slot { height: 300px; border-radius: 6px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.feature { background: var(--paper); padding: 32px 30px; }
.feature__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
}
.feature h3 { font-weight: 800; font-size: 19px; margin: 0 0 10px; }
.feature p { font-size: 15px; line-height: 1.52; color: var(--text-soft); margin: 0; }

/* =============================================================
   FOUNDER
   ============================================================= */
.founder { max-width: 1240px; margin: 0 auto; padding: 96px 40px; }
.founder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 60px;
  align-items: start;
}
.founder-portrait { position: relative; }
.founder-portrait .slot { aspect-ratio: 1122 / 1402; border-radius: 6px; } /* matches portrait's native ratio — no crop */
.founder-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 2; /* sit above the photo (slot img is z-index:1) */
  background: var(--ink);
  color: var(--paper);
  padding: 14px 18px;
  border-radius: 3px;
}
.founder-badge__name { font-weight: 800; font-size: 17px; }
.founder-badge__role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-top: 4px;
}
.founder-bio .sec-title {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1;
  margin: 0 0 26px;
}
.founder-bio p { font-size: 18px; line-height: 1.62; color: var(--text); margin: 0 0 20px; }
.founder-bio p:nth-of-type(2) { margin-bottom: 24px; }
.founder-bio .signature { margin: 0 0 30px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid rgba(23, 18, 14, 0.2);
  border-radius: 2px;
  padding: 8px 13px;
}

/* =============================================================
   CERTIFICATIONS (dark)
   ============================================================= */
.certs { background: var(--ink); color: var(--paper); }
.certs__inner { max-width: 1240px; margin: 0 auto; padding: 118px 40px; }
.certs .sec-kicker { color: var(--muted-dark); }
.certs .sec-title { max-width: 16em; }
.certs .sec-lede { color: var(--muted-dark-2); max-width: 34em; margin-bottom: 52px; }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 18px;
}
.cert-card {
  background: var(--paper);
  border-radius: 5px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cert-card .slot { width: 100%; height: 96px; border-radius: 4px; }
.cert-card__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =============================================================
   PARTNERS
   ============================================================= */
.partners { background: var(--ink); color: var(--paper); }
.partners__inner { max-width: 1240px; margin: 0 auto; padding: 104px 40px; }
.partners .sec-kicker { color: var(--muted-dark); }
.partners .sec-title {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1;
  margin: 0 0 44px;
  max-width: 18em;
}
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 16px;
}
.partner-card {
  background: #fff;
  border: 1px solid rgba(23, 18, 14, 0.1);
  border-radius: 4px;
  padding: 18px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.partner-card .slot { width: 100%; height: 100%; border: 0; background: none; }

/* =============================================================
   LOGO CARD HOVER - partner wall, certification badges, Inter Market chip
   The card lifts off the dark background and the mark inside grows slightly.

   Deliberately three classes deep: these cards are also scroll-reveal items,
   and the .js-anim [data-reveal].is-in rule that resets them to `transform:
   none` after revealing would otherwise tie on specificity and, sitting later
   in this file, cancel the lift.

   Gated behind (hover: hover) so a tap on a touch screen can't leave a card
   stuck in its hovered state.
   ============================================================= */
@media (hover: hover) {
  .partners .partner-grid .partner-card,
  .certs .cert-grid .cert-card {
    transition:
      transform 0.3s var(--reveal-ease),
      border-color 0.3s ease,
      box-shadow 0.3s ease;
  }
  .partners .partner-grid .partner-card .slot img,
  .certs .cert-grid .cert-card .slot img,
  .backbone .slot img {
    transition: transform 0.3s var(--reveal-ease);
  }
  .certs .cert-grid .cert-card__label { transition: color 0.3s ease; }

  .partners .partner-grid .partner-card:hover,
  .certs .cert-grid .cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  }
  .partners .partner-grid .partner-card:hover { border-color: var(--accent); }

  .partners .partner-grid .partner-card:hover .slot img,
  .certs .cert-grid .cert-card:hover .slot img { transform: scale(1.06); }

  .certs .cert-grid .cert-card:hover .cert-card__label { color: var(--accent); }

  /* the Inter Market chip is a lone logo on the dark story card */
  .backbone .slot:hover img { transform: scale(1.04); }
}

/* =============================================================
   INSTAGRAM FEED
   Curated tiles, three-wide like an Instagram profile grid.
   ============================================================= */
.feed__inner { max-width: 1240px; margin: 0 auto; padding: 104px 40px; }
.feed .sec-title { max-width: 14em; }
.feed .sec-lede { margin-bottom: 44px; }
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feed-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  background: rgba(23, 18, 14, 0.04);
  text-decoration: none;
}
.feed-card img { width: 100%; height: 100%; object-fit: cover; }
/* The covers carry their own headline, so the tile adds an action label
   rather than a caption that would repeat it. Slides up on hover; on touch
   it stays hidden, where the section heading and CTA already do the work. */
.feed-card__go {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  /* covers the whole tile rather than sitting in a bottom bar - the covers
     carry their own footer type, which showed through a gradient scrim */
  background: rgba(23, 18, 14, 0.78);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.feed-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
}
.feed-cta .btn { font-size: 15px; padding: 16px 28px; }
.feed-cta .btn svg { flex-shrink: 0; }
.feed-cta__handle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* same three-class trick as the logo cards - the tiles are reveal items too */
@media (hover: hover) {
  .feed .feed-grid .feed-card {
    transition: transform 0.3s var(--reveal-ease), border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .feed .feed-grid .feed-card img { transition: transform 0.45s var(--reveal-ease); }
  .feed .feed-grid .feed-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(23, 18, 14, 0.18);
  }
  .feed .feed-grid .feed-card:hover img { transform: scale(1.05); }
  .feed .feed-grid .feed-card:hover .feed-card__go { opacity: 1; }
}

@media (max-width: 900px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================
   CONTACT / CTA (accent)
   ============================================================= */
.contact { background: var(--accent); color: #fff; }
.contact__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 112px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 52px;
  align-items: center;
}
.contact__kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 22px;
}
.contact__title {
  font-weight: 900;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 22px;
}
.contact__lede {
  font-size: 19px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 30em;
  margin: 0;
}
.contact__actions { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.contact__actions .btn { font-size: 17px; font-weight: 800; padding: 20px 34px; }
.contact__actions .btn .arrow { font-size: 20px; }
.contact__meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 2;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer { background: var(--ink); color: var(--paper); }
.footer__inner { max-width: 1240px; margin: 0 auto; padding: 60px 40px 44px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(246, 242, 234, 0.14);
}
.footer-brand { font-weight: 900; font-size: 22px; margin-bottom: 14px; }
.footer-brand .accent { color: var(--accent); }
.footer-about { font-size: 15px; line-height: 1.55; color: var(--muted-dark); max-width: 24em; margin: 0; }
.footer-col__title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 16px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 11px; }
.footer-col__links a, .footer-col__links span { text-decoration: none; color: var(--paper); font-size: 15px; }
.footer-col__links a:hover { color: var(--accent); }
.footer-col__links a.accent { color: var(--accent); font-weight: 700; }
.footer-col__links a.footer-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(247, 243, 237, 0.28);
  border-radius: 3px;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s;
}
.footer-col__links a.footer-linkedin:hover {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-col__links a.footer-linkedin svg { flex-shrink: 0; }
.footer-col__links .muted { color: var(--muted-dark); }
.footer-social { display: flex; gap: 10px; margin: 4px 0; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--paper);
  border: 1px solid rgba(247, 243, 237, 0.28);
  border-radius: 3px;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s;
}
.footer-social a:hover {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-social svg { flex-shrink: 0; }

/* ---------------------------------------------------------------
   GALLERY / INSIDE THE FACTORY
   --------------------------------------------------------------- */
.gallery { background: var(--paper-alt); }
.gallery__inner { max-width: 1240px; margin: 0 auto; padding: 40px 40px 96px; }
.gallery .sec-title { margin-top: 6px; }
.gallery-lede { max-width: 60ch; margin: 18px 0 0; font-size: 19px; line-height: 1.6; color: var(--text-soft); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.gallery-item { padding: 0; margin: 0; border: 0; background: none; cursor: pointer; display: block;
  border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) { .gallery__inner { padding: 72px 22px; } .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: rgba(23, 18, 14, 0.92); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: 4px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.lightbox__close { position: absolute; top: 20px; right: 30px; width: 48px; height: 48px; font-size: 40px;
  line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
}
.footer-bottom span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted-dark);
}

/* =============================================================
   MOTION - hero entrance + scroll reveals
   Elements only start hidden when JS is confirmed running (the
   html.js-anim class is set inline in <head>), so with JS off - or
   if the reveal script throws - every section stays visible.
   ============================================================= */
/* Keyframes rather than a transition on purpose: `animation-fill-mode:
   backwards` holds the hidden state through the delay and then hands the
   element back to its own styles once it finishes, which leaves `transition`
   free for hover states on the same element (the logo cards need both). */
.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}
.js-anim [data-reveal].is-in {
  opacity: 1;
  transform: none;
  animation: reveal-rise var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms) backwards;
}
/* fade only - for a container that reveals alongside its own staggered
   children, so the two translations don't stack into a 40px jump */
.js-anim [data-reveal].reveal--fade { transform: none; }
.js-anim [data-reveal].reveal--fade.is-in { animation-name: reveal-fade; }

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes reveal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* the red rule in the hero eyebrow draws itself out from the left */
.js-anim .eyebrow[data-reveal] .eyebrow__rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.95s var(--reveal-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 220ms);
}
.js-anim .eyebrow[data-reveal].is-in .eyebrow__rule { transform: scaleX(1); }

/* the head script already skips .js-anim when reduced motion is set;
   this is the belt-and-braces for a preference changed after load */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim [data-reveal],
  .js-anim [data-reveal].is-in,
  .js-anim .eyebrow[data-reveal] .eyebrow__rule {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  /* logo cards keep their colour and shadow hover, but drop the lift */
  .partners .partner-grid .partner-card:hover,
  .certs .cert-grid .cert-card:hover { transform: none; }
  .partners .partner-grid .partner-card:hover .slot img,
  .certs .cert-grid .cert-card:hover .slot img,
  .backbone .slot:hover img { transform: none; }
  .feed .feed-grid .feed-card:hover,
  .feed .feed-grid .feed-card:hover img { transform: none; }
}

/* =============================================================
   RESPONSIVE - desktop design preserved; small-screen necessities
   ============================================================= */
/* Collapse the text links to "brand + Book a call" before the full desktop
   nav can overflow. The 6 links + CTA need ~810px to fit, so anything narrower
   would push the CTA off-screen (e.g. iPad portrait at 768px). */
@media (max-width: 860px) {
  .nav-links .nav-link { display: none; }
}

@media (max-width: 720px) {
  .container,
  .nav,
  .hero,
  .story__inner,
  .why__inner,
  .product__inner,
  .founder,
  .certs__inner,
  .partners__inner,
  .feed__inner,
  .contact__inner,
  .footer__inner { padding-left: 22px; padding-right: 22px; }

  .nav-links { gap: 18px; }

  .hero { padding-top: 56px; padding-bottom: 48px; }
  .story__inner, .why__inner, .product__inner, .founder, .certs__inner, .partners__inner,
  .feed__inner { padding-top: 72px; padding-bottom: 72px; }
}

/* very small phones (≤360px): tighten the nav so brand + Book a call always fit */
@media (max-width: 400px) {
  .nav { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .nav-cta { padding: 10px 15px; letter-spacing: 0.02em; }
}
