/*fern-site-stylesheet*/:root {
  --header-height: 64px;
  --header-height-real: 64px;
  --mobile-header-height-real: 64px;
  --content-width: 640px;
  --sidebar-width: 288px;
  --page-width: 1408px;
  --logo-height: 22px;
  --font-body: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-heading: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

:root {
  --typography-body-font-family: var(--font-body);
  --typography-heading-font-family: var(--font-heading);
  --typography-code-font-family: var(--font-code);
}


.light, :root {
  --accent-1: #f6f7f8;
  --accent-2: #f0f2f8;
  --accent-3: #e5ebf7;
  --accent-4: #d7e2fa;
  --accent-5: #c6d7fb;
  --accent-6: #b2c9fb;
  --accent-7: #9bb6f2;
  --accent-8: #7b9ce9;
  --accent-9: #1e40af;
  --accent-10: #112d9c;
  --accent-11: #2c52c2;
  --accent-12: #1b2d5e;

  --accent-a1: #e9f1ff39;
  --accent-a2: #cedaff39;
  --accent-a3: #427eff1d;
  --accent-a4: #acc6ff72;
  --accent-a5: #9dbcff8e;
  --accent-a6: #79a3ff8e;
  --accent-a7: #0149ec61;
  --accent-a8: #0043dc82;
  --accent-a9: #0128a6e1;
  --accent-a10: #001e96ee;
  --accent-a11: #012fb8d3;
  --accent-a12: #01154ce4;

  --accent-contrast: #fff;
  --accent-surface: #eef1f9cc;
  --accent-indicator: #1e40af;
  --accent-track: #1e40af;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --accent-1: oklch(97.5% 0.0016 265.6);
      --accent-2: oklch(96.2% 0.0084 265.6);
      --accent-3: oklch(93.8% 0.018 265.6);
      --accent-4: oklch(91.1% 0.0354 265.6);
      --accent-5: oklch(87.8% 0.0535 265.6);
      --accent-6: oklch(83.6% 0.0747 265.6);
      --accent-7: oklch(77.9% 0.0909 265.6);
      --accent-8: oklch(70.1% 0.1186 265.6);
      --accent-9: oklch(42.4% 0.1809 265.6);
      --accent-10: oklch(36.7% 0.1809 265.6);
      --accent-11: oklch(48.2% 0.1809 265.6);
      --accent-12: oklch(31.3% 0.0897 265.6);

      --accent-a1: color(display-p3 0.9137 0.9451 1 / 0.223);
      --accent-a2: color(display-p3 0.6314 0.7333 1 / 0.112);
      --accent-a3: color(display-p3 0 0.2902 0.9647 / 0.08);
      --accent-a4: color(display-p3 0.4039 0.5725 1 / 0.223);
      --accent-a5: color(display-p3 0.1216 0.3647 1 / 0.223);
      --accent-a6: color(display-p3 0 0 1 / 0.112);
      --accent-a7: color(display-p3 0 0.2392 0.8706 / 0.36);
      --accent-a8: color(display-p3 0 0.2118 0.8118 / 0.48);
      --accent-a9: color(display-p3 0 0.1176 0.6118 / 0.848);
      --accent-a10: color(display-p3 0 0.0863 0.5451 / 0.904);
      --accent-a11: color(display-p3 0 0.1412 0.6706 / 0.788);
      --accent-a12: color(display-p3 0 0.0627 0.2706 / 0.876);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.9333 0.9451 0.9765 / 0.8);
      --accent-indicator: oklch(42.4% 0.1809 265.6);
      --accent-track: oklch(42.4% 0.1809 265.6);
    }
  }
}


.light, :root {
  --grayscale-1: #fdfdfc;
  --grayscale-2: #f9f9f8;
  --grayscale-3: #f1f0ef;
  --grayscale-4: #e9e8e6;
  --grayscale-5: #e2e1de;
  --grayscale-6: #dad9d6;
  --grayscale-7: #cfceca;
  --grayscale-8: #bcbbb5;
  --grayscale-9: #8d8d86;
  --grayscale-10: #82827c;
  --grayscale-11: #63635e;
  --grayscale-12: #21201c;

  --grayscale-a1: #55550003;
  --grayscale-a2: #25250007;
  --grayscale-a3: #20100010;
  --grayscale-a4: #1f150019;
  --grayscale-a5: #1f180021;
  --grayscale-a6: #19130029;
  --grayscale-a7: #19140035;
  --grayscale-a8: #1915014a;
  --grayscale-a9: #0f0f0079;
  --grayscale-a10: #0c0c0083;
  --grayscale-a11: #080800a1;
  --grayscale-a12: #060500e3;

  --grayscale-contrast: #000;
  --grayscale-surface: #ffffffcc;
  --grayscale-indicator: #8d8d86;
  --grayscale-track: #8d8d86;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --grayscale-1: color(display-p3 0.992 0.992 0.989);
      --grayscale-2: color(display-p3 0.977 0.977 0.973);
      --grayscale-3: color(display-p3 0.943 0.942 0.936);
      --grayscale-4: color(display-p3 0.913 0.912 0.903);
      --grayscale-5: color(display-p3 0.885 0.883 0.873);
      --grayscale-6: color(display-p3 0.854 0.852 0.839);
      --grayscale-7: color(display-p3 0.813 0.81 0.794);
      --grayscale-8: color(display-p3 0.738 0.734 0.713);
      --grayscale-9: color(display-p3 0.553 0.553 0.528);
      --grayscale-10: color(display-p3 0.511 0.511 0.488);
      --grayscale-11: color(display-p3 0.388 0.388 0.37);
      --grayscale-12: color(display-p3 0.129 0.126 0.111);

      --grayscale-a1: #55550003;
      --grayscale-a2: #25250007;
      --grayscale-a3: #20100010;
      --grayscale-a4: #1f150019;
      --grayscale-a5: #1f180021;
      --grayscale-a6: #19130029;
      --grayscale-a7: #19140035;
      --grayscale-a8: #1915014a;
      --grayscale-a9: #0f0f0079;
      --grayscale-a10: #0c0c0083;
      --grayscale-a11: #080800a1;
      --grayscale-a12: #060500e3;

      --grayscale-contrast: #000;
      --grayscale-surface: color(display-p3 1 1 1 / 80%);
      --grayscale-indicator: color(display-p3 0.553 0.553 0.528);
      --grayscale-track: color(display-p3 0.553 0.553 0.528);
    }
  }
}


.dark {
  --accent-1: #040a12;
  --accent-2: #0f1722;
  --accent-3: #112741;
  --accent-4: #0f325a;
  --accent-5: #183e6c;
  --accent-6: #234c7d;
  --accent-7: #2f5c92;
  --accent-8: #396eae;
  --accent-9: #60a5fa;
  --accent-10: #5599ed;
  --accent-11: #83b7f9;
  --accent-12: #cfe3fc;

  --accent-a1: #0049cf04;
  --accent-a2: #69b3f615;
  --accent-a3: #3697fc36;
  --accent-a4: #218cff50;
  --accent-a5: #3391ff63;
  --accent-a6: #449bff75;
  --accent-a7: #50a1fe8c;
  --accent-a8: #53a2ffa9;
  --accent-a9: #62a8fffa;
  --accent-a10: #5ba4ffec;
  --accent-a11: #86bbfff9;
  --accent-a12: #d1e6fffc;

  --accent-contrast: #fff;
  --accent-surface: #17253580;
  --accent-indicator: #60a5fa;
  --accent-track: #60a5fa;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --accent-1: oklch(14% 0.0214 254.6);
      --accent-2: oklch(20.3% 0.0249 254.6);
      --accent-3: oklch(26.9% 0.0567 254.6);
      --accent-4: oklch(31.5% 0.0826 254.6);
      --accent-5: oklch(36.3% 0.0902 254.6);
      --accent-6: oklch(41.3% 0.0941 254.6);
      --accent-7: oklch(46.9% 0.1016 254.6);
      --accent-8: oklch(53.2% 0.1169 254.6);
      --accent-9: oklch(71.4% 0.1434 254.6);
      --accent-10: oklch(67.7% 0.1434 254.6);
      --accent-11: oklch(77% 0.1101 254.6);
      --accent-12: oklch(90.8% 0.0407 254.6);

      --accent-a1: color(display-p3 0 0.4745 0.9333 / 0.009);
      --accent-a2: color(display-p3 0.5529 0.7686 1 / 0.075);
      --accent-a3: color(display-p3 0.3216 0.6039 1 / 0.2);
      --accent-a4: color(display-p3 0.2667 0.5608 0.9961 / 0.3);
      --accent-a5: color(display-p3 0.3098 0.5765 1 / 0.375);
      --accent-a6: color(display-p3 0.3647 0.6235 1 / 0.442);
      --accent-a7: color(display-p3 0.4078 0.6431 1 / 0.53);
      --accent-a8: color(display-p3 0.4118 0.6471 1 / 0.642);
      --accent-a9: color(display-p3 0.4627 0.6745 1 / 0.95);
      --accent-a10: color(display-p3 0.4353 0.6549 1 / 0.9);
      --accent-a11: color(display-p3 0.5843 0.749 0.9961 / 0.955);
      --accent-a12: color(display-p3 0.8431 0.9059 1 / 0.98);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.102 0.1412 0.1961 / 0.5);
      --accent-indicator: oklch(71.4% 0.1434 254.6);
      --accent-track: oklch(71.4% 0.1434 254.6);
    }
  }
}


.dark {
  --grayscale-1: #111113;
  --grayscale-2: #18191b;
  --grayscale-3: #212225;
  --grayscale-4: #272a2d;
  --grayscale-5: #2e3135;
  --grayscale-6: #363a3f;
  --grayscale-7: #43484e;
  --grayscale-8: #5a6169;
  --grayscale-9: #696e77;
  --grayscale-10: #777b84;
  --grayscale-11: #b0b4ba;
  --grayscale-12: #edeef0;

  --grayscale-a1: #00000000;
  --grayscale-a2: #d8f4f609;
  --grayscale-a3: #ddeaf814;
  --grayscale-a4: #d3edf81d;
  --grayscale-a5: #d9edfe25;
  --grayscale-a6: #d6ebfd30;
  --grayscale-a7: #d9edff40;
  --grayscale-a8: #d9edff5d;
  --grayscale-a9: #dfebfd6d;
  --grayscale-a10: #e5edfd7b;
  --grayscale-a11: #f1f7feb5;
  --grayscale-a12: #fcfdffef;

  --grayscale-contrast: #fff;
  --grayscale-surface: rgba(0, 0, 0, 0.05);
  --grayscale-indicator: #696e77;
  --grayscale-track: #696e77;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --grayscale-1: color(display-p3 0.067 0.067 0.074);
      --grayscale-2: color(display-p3 0.095 0.098 0.105);
      --grayscale-3: color(display-p3 0.13 0.135 0.145);
      --grayscale-4: color(display-p3 0.156 0.163 0.176);
      --grayscale-5: color(display-p3 0.183 0.191 0.206);
      --grayscale-6: color(display-p3 0.215 0.226 0.244);
      --grayscale-7: color(display-p3 0.265 0.28 0.302);
      --grayscale-8: color(display-p3 0.357 0.381 0.409);
      --grayscale-9: color(display-p3 0.415 0.431 0.463);
      --grayscale-10: color(display-p3 0.469 0.483 0.514);
      --grayscale-11: color(display-p3 0.692 0.704 0.728);
      --grayscale-12: color(display-p3 0.93 0.933 0.94);

      --grayscale-a1: #00000000;
      --grayscale-a2: #d8f4f609;
      --grayscale-a3: #ddeaf814;
      --grayscale-a4: #d3edf81d;
      --grayscale-a5: #d9edfe25;
      --grayscale-a6: #d6ebfd30;
      --grayscale-a7: #d9edff40;
      --grayscale-a8: #d9edff5d;
      --grayscale-a9: #dfebfd6d;
      --grayscale-a10: #e5edfd7b;
      --grayscale-a11: #f1f7feb5;
      --grayscale-a12: #fcfdffef;

      --grayscale-contrast: #fff;
      --grayscale-surface: color(display-p3 0 0 0 / 5%);
      --grayscale-indicator: color(display-p3 0.415 0.431 0.463);
      --grayscale-track: color(display-p3 0.415 0.431 0.463);
    }
  }
}

.light, :root {
  color-scheme: light;
  --accent: rgba(30, 64, 175, 1);
  --background: rgba(250, 249, 246, 1);
  --border: initial;
  --sidebar-background: initial;
  --header-background: color-mix(in srgb, var(--background), transparent 30%);
  --card-background: initial;
  --theme-color: #faf9f6;
}

.dark {
  color-scheme: dark;
  --accent: rgba(96, 165, 250, 1);
  --background: rgba(7, 9, 15, 1);
  --border: initial;
  --sidebar-background: initial;
  --header-background: color-mix(in srgb, var(--background), transparent 30%);
  --card-background: initial;
  --theme-color: #07090f;
}

/* Light is the default (matches docs.yml's light-background instance and
   tokens.css's convention); dark is the override below. The brand blue
   (--penny-blue) and its rgb triplet stay fixed in both — same rule as
   the rest of the brand kit: the mark's color is never themed. */
:root {
  --penny-blue: #0080ff;
  --penny-blue-rgb: 0, 128, 255;

  --penny-bg: #f3f4f6;
  --penny-bg-2: #ffffff;
  --penny-text: #0b0f19;
  --penny-muted: #475569;
  --penny-border: rgba(11, 15, 25, 0.14);
  --penny-grid-line: rgba(11, 15, 25, 0.06);

  --penny-card-bg-1: #ffffff;
  --penny-card-bg-2: #f3f4f6;
  --penny-card-border: rgba(11, 15, 25, 0.14);
  --penny-card-highlight: rgba(255, 255, 255, 0.6);
  --penny-card-logo-color: #0b0f19;

  --penny-button-secondary-bg: rgba(11, 15, 25, 0.03);
  --penny-button-secondary-text: var(--penny-text);
  --penny-button-hover-border: rgba(11, 15, 25, 0.24);

  --penny-ease-out: cubic-bezier(.16, 1, .3, 1);
  --penny-ease-soft: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {

  /* Plain :root here (not :root:not([data-theme="light"])) is deliberate:
     that guard's specificity (0,2,0) beat html.light's (0,1,1) below,
     so Fern's explicit light-mode toggle couldn't win over an OS set to
     dark — the hero stayed dark even when the site itself switched to
     light. A bare :root (0,1,0) is lower-specificity than html.light, so
     the explicit class rules below correctly override this OS-preference
     fallback whichever way the user actually toggled the site. */
  :root {
    --penny-bg: #070a0f;
    --penny-bg-2: #080b11;
    --penny-text: #f8fafc;
    --penny-muted: #a9b1bd;
    --penny-border: rgba(255, 255, 255, 0.11);
    --penny-grid-line: rgba(255, 255, 255, 0.055);

    --penny-card-bg-1: #111722;
    --penny-card-bg-2: #090c12;
    --penny-card-border: rgba(255, 255, 255, 0.16);
    --penny-card-highlight: rgba(255, 255, 255, 0.055);
    --penny-card-logo-color: rgba(255, 255, 255, 0.9);

    --penny-button-secondary-bg: rgba(255, 255, 255, 0.02);
    --penny-button-secondary-text: #fff;
    --penny-button-hover-border: rgba(255, 255, 255, 0.26);
  }

}

html.dark, html[data-theme="dark"] {
  --penny-bg: #070a0f;
  --penny-bg-2: #080b11;
  --penny-text: #f8fafc;
  --penny-muted: #a9b1bd;
  --penny-border: rgba(255, 255, 255, 0.11);
  --penny-grid-line: rgba(255, 255, 255, 0.055);

  --penny-card-bg-1: #111722;
  --penny-card-bg-2: #090c12;
  --penny-card-border: rgba(255, 255, 255, 0.16);
  --penny-card-highlight: rgba(255, 255, 255, 0.055);
  --penny-card-logo-color: rgba(255, 255, 255, 0.9);

  --penny-button-secondary-bg: rgba(255, 255, 255, 0.02);
  --penny-button-secondary-text: #fff;
  --penny-button-hover-border: rgba(255, 255, 255, 0.26);

  /* Fern ships --card-background: initial in both themes, so every
     component that reads it (footer prev/next nav, tables, inline <code>
     chips, the "was this page helpful" card, twoslash popups) silently
     falls through to a fallback that isn't reliably dark here — producing
     a near-white card floating on our near-black background. Give it a
     real themed value instead of leaving it to fall through. */
  --card-background: var(--penny-card-bg-1);
  --card-border: var(--penny-card-border);
}

html.light, html[data-theme="light"] {
  --penny-bg: #f3f4f6;
  --penny-bg-2: #ffffff;
  --penny-text: #0b0f19;
  --penny-muted: #475569;
  --penny-border: rgba(11, 15, 25, 0.14);
  --penny-grid-line: rgba(11, 15, 25, 0.06);

  --penny-card-bg-1: #ffffff;
  --penny-card-bg-2: #f3f4f6;
  --penny-card-border: rgba(11, 15, 25, 0.14);
  --penny-card-highlight: rgba(255, 255, 255, 0.6);
  --penny-card-logo-color: #0b0f19;

  --penny-button-secondary-bg: rgba(11, 15, 25, 0.03);
  --penny-button-secondary-text: var(--penny-text);
  --penny-button-hover-border: rgba(11, 15, 25, 0.24);

  --card-background: var(--penny-card-bg-1);
  --card-border: var(--penny-card-border);
}

/* Shiki bakes a literal `background-color:#fff` inline style onto every
   code block, plus a `--shiki-dark-bg` custom property it expects a theme
   to apply — but nothing in Fern's shipped CSS ever does, so code blocks
   stay white-on-white in dark mode regardless of the site's theme. Force
   it back onto the value Shiki already computed for us. */
html.dark .code-block-root, html[data-theme="dark"] .code-block-root {
  background-color: var(--shiki-dark-bg, var(--penny-card-bg-1)) !important;
}

/* ===== Hero shell =====
   container-type is load-bearing: Fern renders this inside a ~600-720px
   MDX content column (sidebar + TOC eat the rest of the viewport), not the
   full-width marketing layout this component was designed for. The
   responsive rules below key off the hero's own rendered width via a
   container query, not the viewport — a viewport media query never fires
   here since the browser window is plenty wide even though this component
   isn't. Without this, the grid's 440px second-column minimum starves the
   text column down to a few px and wraps every word letter-by-letter. */
.penny-hero {
  container-type: inline-size;
  container-name: penny-hero;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 430px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 79% 46%, rgba(var(--penny-blue-rgb), .17), transparent 29%),
    linear-gradient(180deg, var(--penny-bg-2) 0%, var(--penny-bg) 100%);
  color: var(--penny-text);
  transition: background-color 200ms ease, color 200ms ease;
}

.penny-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .22;
  background-image:
    linear-gradient(var(--penny-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--penny-grid-line) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 46%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 46%, #000 100%);
}


.penny-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, .92fr);
  align-items: center;
  min-height: inherit;
  gap: 34px;
  max-width: 1240px;
  margin-inline: auto;
  padding: 54px clamp(34px, 5vw, 78px);
}

/* ===== Copy ===== */
.penny-hero__copy {
  position: relative;
  z-index: 3;
  max-width: 620px;
}

.penny-hero__eyebrow {
  margin: 0 0 16px;
  color: var(--penny-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  animation: penny-copy-in 1s var(--penny-ease-out) .18s forwards;
}

.penny-hero__title {
  margin: 0;
  max-width: 590px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 650;
  opacity: 0;
  transform: translateY(14px);
  animation: penny-copy-in 1.3s var(--penny-ease-out) .32s forwards;
}

.penny-hero__lede {
  margin: 22px 0 0;
  max-width: 560px;
  color: var(--penny-muted);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(12px);
  animation: penny-copy-in 1.22s var(--penny-ease-out) .58s forwards;
}

.penny-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  opacity: 0;
  transform: translateY(10px);
  animation: penny-copy-in 1.08s var(--penny-ease-out) .83s forwards;
}

.penny-hero__button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--penny-border);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.penny-hero__button:hover {
  transform: translateY(-1px);
  border-color: var(--penny-button-hover-border);
}
.penny-hero__button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--penny-button-hover-border); outline: none;
}

.penny-hero__button--primary {
  background: var(--penny-blue);
  border-color: var(--penny-blue);
  box-shadow: 0 10px 30px rgba(var(--penny-blue-rgb), .18);
}

.penny-hero__button--secondary {
  background: var(--penny-button-secondary-bg);
  color: var(--penny-button-secondary-text);
}
.penny-hero__arrow { transition: transform 180ms ease; }
.penny-hero__button:hover .penny-hero__arrow { transform: translateX(3px); }
.penny-hero__button:focus-within .penny-hero__arrow { transform: translateX(3px); outline: none;
}

/* ===== Animated artwork ===== */
.penny-hero__visual {
  position: relative;
  min-height: 320px;
  perspective: 1000px;
}

/* Ambient glow, centered on the logo mark. This used to be .penny-hero::after,
   positioned with right/top percentages measured against the FULL hero box —
   a different, wider coordinate system than .penny-hero__brand's (measured
   against .penny-hero__visual, a narrower grid cell). The two drifted apart
   as the hero's width changed, so the glow tracked with the logo at some
   widths and not others. Fixed by making it a sibling in .penny-hero__brand's
   own coordinate system, with `right` solved so the glow's center always
   lands on the brand box's center regardless of width: brand's own center is
   `8% + brand-width / 2` in from the right edge, so the glow's `right` is
   that same point minus half its own width. Kept in sync with .penny-hero__brand
   at each container-query breakpoint below. */
.penny-hero__visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: calc(8% + (clamp(170px, 17vw, 235px) / 2) - 210px);
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(var(--penny-blue-rgb), .10);
  filter: blur(85px);
  opacity: .65;
  animation: penny-glow-breathe 9.5s ease-in-out 3.2s infinite alternate;
}

.penny-hero__brand {
  position: absolute;
  z-index: 2;
  width: clamp(170px, 17vw, 235px);
  aspect-ratio: 1;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
}

.penny-hero__brand-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: rgba(var(--penny-blue-rgb), .34);
  filter: blur(34px);
  opacity: 0;
  transform: scale(.7);
  animation: penny-logo-glow-in 1.26s ease-out 1.3s forwards;
}

.penny-hero__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(var(--penny-blue-rgb), .26));
}

.penny-hero__logo-path {
  fill: none;
  stroke: var(--penny-blue);
  stroke-width: 4.75;
  stroke-linecap: butt;
  stroke-linejoin: round;
  path-length: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    penny-logo-draw 1.66s var(--penny-ease-soft) .54s forwards,
    penny-logo-fill .6s ease-out 2.2s forwards;
}

/* Two restrained cards. They begin stacked under the logo and fan left. */
.penny-hero__card {
  position: absolute;
  z-index: 1;
  width: clamp(230px, 24vw, 315px);
  aspect-ratio: 1.586;
  top: 50%;
  left: 50%;
  border: 1px solid var(--penny-card-border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, var(--penny-card-highlight), transparent 42%),
    linear-gradient(180deg, var(--penny-card-bg-1) 0%, var(--penny-card-bg-2) 100%);
  box-shadow: 0 24px 54px rgba(0,0,0,.42);
  opacity: 0;
  transform-origin: 70% 50%;
  will-change: transform, opacity;
}

.penny-hero__card::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 48%;
  width: 30px;
  height: 23px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(20,20,20,.3) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(20,20,20,.3) 45% 55%, transparent 55%),
    linear-gradient(145deg, #e7e7e7, #969ca6);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}

.penny-hero__card-logo {
  position: absolute;
  top: 14%;
  right: 10%;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--penny-card-logo-color);
  font-size: 19px;
  font-weight: 430;
  letter-spacing: -.03em;
}

.penny-hero__card-logo img { width: 22px; height: 22px; }

.penny-hero__card--back {
  animation: penny-card-back-in 1.51s var(--penny-ease-out) 1.3s forwards;
}

.penny-hero__card--front {
  z-index: 3;
  animation: penny-card-front-in 1.58s var(--penny-ease-out) 1.51s forwards;
}

.penny-hero__pixel-field {
  position: absolute;
  z-index: 0;
  left: 17%;
  top: 25%;
  width: 190px;
  height: 150px;
  opacity: 0;
  animation: penny-pixels-in 1.53s ease-out 1.89s forwards;
}

.penny-hero__pixel {
  position: absolute;
  width: var(--size, 6px);
  height: var(--size, 6px);
  left: var(--x);
  top: var(--y);
  background: rgba(var(--penny-blue-rgb), var(--alpha, .46));
  border-radius: 1px;
  box-shadow: 0 0 12px rgba(var(--penny-blue-rgb), .18);
  animation: penny-pixel-twinkle var(--duration, 5s) ease-in-out var(--delay, 1.6s) infinite;
}

/* ===== Hover: very restrained, only a few pixels of extra fan ===== */
.penny-hero__visual:hover .penny-hero__card--back {
  transform: translate(-58%, -54%) rotate(-9deg) translate3d(-70px, -10px, -18px);
}
.penny-hero__visual:focus-within .penny-hero__card--back {
  transform: translate(-58%, -54%) rotate(-9deg) translate3d(-70px, -10px, -18px); outline: none;
}
.penny-hero__visual:hover .penny-hero__card--front {
  transform: translate(-53%, -46%) rotate(-3deg) translate3d(-28px, 42px, 12px);
}
.penny-hero__visual:focus-within .penny-hero__card--front {
  transform: translate(-53%, -46%) rotate(-3deg) translate3d(-28px, 42px, 12px); outline: none;
}
.penny-hero__visual:hover .penny-hero__brand {
  transform: translateY(-50%) scale(1.012);
}
.penny-hero__visual:focus-within .penny-hero__brand {
  transform: translateY(-50%) scale(1.012); outline: none;
}

.penny-hero__brand,
.penny-hero__card {
  transition: transform .48s var(--penny-ease-out);
}

/* ===== Entry animation timing =====
   Slowed down from the original cut (~1.8x) and the logo's stroke→fill
   handoff made sequential instead of overlapping — it used to switch to
   solid fill while still mid-draw, which read as an abrupt jump.
   0.18s eyebrow
   0.32s heading
   0.54s logo begins drawing (1.66s draw, ends at 2.20s)
   0.58s body copy
   0.83s CTAs
   1.30s rear card begins fan-out + logo glow
   1.51s front card begins fan-out
   1.89s pixels fade in
   2.20s logo switches from stroke to solid (starts exactly as the draw
         finishes, not before — this is the seamless part)
   ~3.4s intro is visually complete
   3.6s onward: subtle idle motion only
*/
@keyframes penny-copy-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes penny-logo-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes penny-logo-fill {
  0% { fill: transparent; stroke-opacity: 1; }
  100% { fill: var(--penny-blue); stroke-opacity: 0; }
}

@keyframes penny-logo-glow-in {
  to { opacity: .8; transform: scale(1); }
}

@keyframes penny-card-back-in {
  0% {
    opacity: 0;
    transform: translate(-31%, -50%) rotate(0deg) scale(.94);
  }
  100% {
    opacity: .72;
    transform: translate(-58%, -54%) rotate(-7deg) translate3d(-56px, -8px, -18px);
  }
}

@keyframes penny-card-front-in {
  0% {
    opacity: 0;
    transform: translate(-31%, -50%) rotate(0deg) scale(.96);
  }
  100% {
    opacity: 1;
    transform: translate(-53%, -46%) rotate(-2deg) translate3d(-18px, 36px, 12px);
  }
}

@keyframes penny-pixels-in {
  from { opacity: 0; transform: translateX(10px) scale(.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes penny-pixel-twinkle {
  0%, 100% { opacity: .22; transform: translateY(0); }
  50% { opacity: .82; transform: translateY(-2px); }
}

@keyframes penny-glow-breathe {
  from { opacity: .46; transform: scale(.98); }
  to { opacity: .70; transform: scale(1.04); }
}

/* ===== Responsive =====
   Container queries against .penny-hero's own rendered width (see the
   `container-type` note above the hero shell rule) — not the viewport,
   which stays wide even when this component's actual box is narrow. */
@container penny-hero (max-width: 900px) {

  .penny-hero { min-height: auto; }
  .penny-hero__inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 44px 30px 30px;
  }
  .penny-hero__copy { max-width: 650px; }
  .penny-hero__title { font-size: clamp(40px, 10cqw, 60px); }
  .penny-hero__visual { min-height: 270px; }
  .penny-hero__brand { right: 11%; width: 172px; }
  .penny-hero__visual::before { right: calc(11% + 86px - 210px); }
  .penny-hero__card { width: 245px; }
  .penny-hero__pixel-field { left: 20%; }

}

@container penny-hero (max-width: 560px) {

  .penny-hero { border-radius: 14px; }
  .penny-hero__inner { padding: 34px 22px 20px; }
  .penny-hero__lede { font-size: 17px; }
  .penny-hero__visual { min-height: 230px; }
  .penny-hero__brand { width: 145px; right: 3%; }
  .penny-hero__visual::before { right: calc(3% + 72.5px - 160px); width: 320px; height: 320px; }
  .penny-hero__card { width: 205px; border-radius: 14px; }
  .penny-hero__card-logo { font-size: 15px; }
  .penny-hero__card-logo img { width: 17px; height: 17px; }
  .penny-hero__pixel-field { display: none; }

}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {

  .penny-hero *,
  .penny-hero__visual::before {
    animation: none !important;
    transition: none !important;
  }

  .penny-hero__eyebrow,
  .penny-hero__title,
  .penny-hero__lede,
  .penny-hero__actions,
  .penny-hero__pixel-field {
    opacity: 1;
    transform: none;
  }

  .penny-hero__logo-path {
    fill: var(--penny-blue);
    stroke: none;
  }

  .penny-hero__brand-glow { opacity: .65; transform: scale(1); }
  .penny-hero__card--back {
    opacity: .72;
    transform: translate(-58%, -54%) rotate(-7deg) translate3d(-56px, -8px, -18px);
  }
  .penny-hero__card--front {
    opacity: 1;
    transform: translate(-53%, -46%) rotate(-2deg) translate3d(-18px, 36px, 12px);
  }

}
