/*! GNOF website 

 * Design: Boombox, HeyBoombox.com
 * Development: Kevin McCarthy — McCarthyKev.dev
 * 2026
 */

@layer reset, base;

/* Non-inheriting so a nested .stack never picks up its parent's spacing. */
@property --stack-gap {
  syntax: "<length>";
  inherits: false;
  initial-value: 24px; /* must be computationally independent: no rem/em */
}

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    /* Lets READ MORE and other disclosures transition to height: auto
       (progressive enhancement — other browsers simply snap). */
    interpolate-size: allow-keywords;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd,
  ol,
  ul {
    margin: 0;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }

  img,
  picture,
  svg {
    display: block;
    max-inline-size: 100%;
  }

  img {
    block-size: auto;
  }

  button,
  input,
  select {
    font: inherit;
    color: inherit;
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-block-start: var(--nav-height);
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
  }

  body {
    background: var(--v2-white);
    color: var(--v2-color-text);
    font-family: var(--v2-family);
    font-size: var(--v2-body-text-default-size);
    font-weight: var(--v2-weight-regular);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2
  {
    font-weight: var(--v2-weight-medium);
    /* text-wrap: balance; */
  }
  /* Removed text-wrap: balance from h4 */
   h3, h4 {
    font-weight: var(--v2-weight-medium);
  }
  p {
    text-wrap: pretty;
  }

  /* Underlines sit 2px further below the text than the font's default. */
  a {
    color: inherit;
    text-underline-position: from-font;
    transition: color var(--dur-fast) ease;
  }

  /* Regular text links: lighter blue on hover, underline kept. */
  a:hover {
    color: var(--v2-royal);
  }

  :focus-visible {
    outline: 2px solid var(--v2-yellow);
    outline-offset: 3px;
  }

  .on-light :focus-visible,
  :where(.on-light) :focus-visible {
    outline-color: var(--v2-royal);
  }

  .visually-hidden {
    position: absolute !important;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .skip-link {
    position: absolute;
    inset-inline-start: var(--v2-space-16);
    inset-block-start: -10rem;
    z-index: 100;
    padding: var(--v2-space-8) var(--v2-space-16);
    background: var(--v2-yellow);
    color: var(--v2-navy);

    &:focus {
      inset-block-start: var(--v2-space-16);
    }
  }

  /* Type scale (Figma V2 text styles) ------------------------------------ */
  .t-h1 {
    font-size: var(--v2-h1-size);
    font-weight: var(--v2-weight-medium);
    line-height: var(--lh-h1);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .t-h2 {
    font-size: var(--v2-h2-size);
    font-weight: var(--v2-weight-regular);
    line-height: var(--lh-h2);
  }

  .t-h3 {
    font-size: var(--v2-h3-size);
    font-weight: var(--v2-weight-medium);
    line-height: var(--lh-h3);
  }

  .t-h4 {
    font-size: var(--v2-h4-size);
    font-weight: var(--v2-weight-medium);
    line-height: var(--lh-h4);
  }

  .t-lead {
    font-size: var(--v2-body-text-lead-size);
    line-height: var(--lh-body);
  }

  .t-large {
    font-size: var(--v2-body-text-large-size);
    line-height: var(--lh-large);
  }

  .t-small {
    font-size: var(--v2-body-text-small-size);
    line-height: var(--lh-small);
  }

  .t-stat {
    font-size: var(--v2-statistic-size);
    font-weight: var(--v2-weight-medium);
    line-height: var(--lh-stat);
    text-transform: uppercase;
  }

  /* Paragraph stacks keep Figma's 24px paragraph spacing. */
  .prose > * + * {
    margin-block-start: var(--v2-space-24);
  }

  /* Layout primitives --------------------------------------------------- */
  .section {
    padding-block: var(--v2-section-padding);
    padding-inline: var(--v2-page-gutter);
  }

  .frame {
    inline-size: 100%;
    max-inline-size: var(--v2-frame-width);
    margin-inline: auto;
  }

  .reading {
    inline-size: 100%;
    max-inline-size: var(--v2-reading-width);
    margin-inline: auto;
  }

  .stack {
    display: flex;
    flex-direction: column;
    gap: var(--stack-gap);
  }

  .bg-navy {
    background: var(--v2-navy);
    color: var(--v2-white);
  }

  .bg-royal {
    background: var(--v2-royal);
    color: var(--v2-white);
  }

  .bg-cyan {
    background: var(--v2-cyan);
    color: var(--v2-navy);
  }

  .bg-pale {
    background: var(--v2-pale);
    color: var(--v2-navy);
  }

  .bg-sky {
    background: var(--v2-sky);
    color: var(--v2-navy);
  }

  .bg-white {
    background: var(--v2-white);
    color: var(--v2-navy);
  }
}
