/* ------------------------------------------------------------
   Home hero: ink wash band + glass header. Loaded after style.css.
   ------------------------------------------------------------ */

/* ============ hero ============ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 132px 0 92px;
  --hero-band: min(43vw, 78vh);
  background: linear-gradient(180deg, #FDFCFA 0%, #F4F1EA 62%, #EFEAE0 100%);
}


/* ink wash band, anchored bottom-right */
.hero-ink {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hero-band);
  background-image: url("/images/hero/ink-light.webp");
  background-image: image-set(
    url("/images/hero/ink-light.avif") type("image/avif"),
    url("/images/hero/ink-light.webp") type("image/webp")
  );
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
  /* The peaks would otherwise cut through the bio copy, so the top of the band
     dissolves into mist the way the source painting does. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 46%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 46%);
  /* The art ships on flat white paper. Multiply drops that white into the hero
     gradient, so the band has no seam and no letterbox on an ultrawide screen. */
  mix-blend-mode: multiply;
  opacity: 0.38;
}


.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20200%20200%27%3E%3Cfilter%20id%3D%27g%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.82%27%20numOctaves%3D%274%27%20stitchTiles%3D%27stitch%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%2525%27%20height%3D%27100%2525%27%20filter%3D%27url%28%2523g%29%27%20opacity%3D%27.5%27%2F%3E%3C%2Fsvg%3E");
}

.hero .container { position: relative; z-index: 2; width: 100%; }

/* ============ hero, dark ============ */
[data-theme="dark"] .hero {
  background: linear-gradient(180deg, #000 0%, #05070C 58%, #080B12 100%);
}
[data-theme="dark"] .hero-ink {
  /* One asset for both themes: inverting the light art gives white ink on black,
     which screen then drops onto the dark hero the way multiply does on paper. */
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.48;
}
[data-theme="dark"] .hero-grain { mix-blend-mode: overlay; opacity: 0.26; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero {
    background: linear-gradient(180deg, #000 0%, #05070C 58%, #080B12 100%);
  }
  :root:not([data-theme="light"]) .hero-ink {
    /* One asset for both themes: inverting the light art gives white ink on black,
       which screen then drops onto the dark hero the way multiply does on paper. */
    filter: invert(1);
    mix-blend-mode: screen;
    opacity: 0.48;
  }
  :root:not([data-theme="light"]) .hero-grain { mix-blend-mode: overlay; opacity: 0.26; }
}

/* ============ glass social pills ============ */
.hero .social-icon {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(40, 34, 24, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  color: #1A1A1A;
  transition: transform 0.28s cubic-bezier(0.2, 0, 0.2, 1), background 0.28s;
}
.hero .social-icon:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.46); }

[data-theme="dark"] .hero .social-icon {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.86);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero .social-icon {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.86);
  }
}

/* ============ glass header (floating pill) ============ */
.header {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1140px, calc(100% - 32px));
  height: 58px;
  padding: 0 10px 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: 0 18px 44px -20px rgba(40, 34, 24, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
/* Same skin for the mobile drawer; its geometry is in style.css. */
.mobile-nav-sheet {
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: 0 18px 44px -20px rgba(40, 34, 24, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.header .btn { border-radius: 999px; }
.header .btn-secondary {
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.66);
  color: #1A1A1A;
}
.header .theme-toggle,
.header .menu-btn {
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .mobile-nav-sheet,
[data-theme="dark"] .header {
  background: rgba(20, 22, 28, 0.42);
  border-color: rgba(255, 255, 255, 0.16);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .header .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.86);
}
[data-theme="dark"] .header .theme-toggle,
[data-theme="dark"] .header .menu-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mobile-nav-sheet,
  :root:not([data-theme="light"]) .header {
    background: rgba(20, 22, 28, 0.42);
    border-color: rgba(255, 255, 255, 0.16);
    border-bottom-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  :root:not([data-theme="light"]) .header .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.86);
  }
  :root:not([data-theme="light"]) .header .theme-toggle,
  :root:not([data-theme="light"]) .header .menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

/* The drawer overlays arbitrary page text, not just a thin strip like the
   pill, so the shared 0.38/0.42 alpha lets headings bleed through the menu
   items. Near-opaque background, same blur/border/shadow recipe. Placed
   after the theme blocks above so it wins on equal specificity. */
.mobile-nav-sheet {
  background: rgba(252, 251, 249, 0.92);
}
[data-theme="dark"] .mobile-nav-sheet {
  background: rgba(18, 19, 24, 0.92);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mobile-nav-sheet {
    background: rgba(18, 19, 24, 0.92);
  }
}

/* ============ responsive ============ */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 112px 0 64px; }
  .hero { --hero-band: 43vw; }
  .header { top: 8px; width: calc(100% - 16px); padding: 0 8px 0 14px; }
}

/* ============ accessibility fallbacks ============ */
@media (prefers-reduced-transparency: reduce) {
  .hero .social-icon, .header, .header .btn-secondary, .header .theme-toggle, .header .menu-btn, .mobile-nav-sheet {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-2);
  }
  .header, .mobile-nav-sheet { background: var(--bg); }
}
