@layer reset, base, layout, components, utilities;

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

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }

  img {
    display: block;
    max-width: 100%;
  }

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

@layer base {
  :root {
    --color-ink: #151719;
    --color-muted: #5b6462;
    --color-paper: #f7f8f6;
    --color-surface: #ffffff;
    --color-line: #dce2df;
    --color-teal: #0b6f67;
    --color-teal-dark: #074c47;
    --color-amber: #c27b2c;
    --color-rose: #9e3348;
    --color-night: #111416;
    --shadow-soft: 0 18px 55px rgb(17 20 22 / 14%);
    --max-width: 1160px;
    --gutter: 24px;
    color-scheme: light;
  }

  body {
    min-width: 320px;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
  }

  a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.22em;
  }

  a:focus-visible,
  button:focus-visible {
    outline: 3px solid var(--color-amber);
    outline-offset: 4px;
  }

  h1,
  h2,
  h3 {
    line-height: 1.08;
    letter-spacing: 0;
  }

  h1 {
    max-width: 11ch;
    color: #ffffff;
    font-size: 4.4rem;
    font-weight: 760;
  }

  h2 {
    max-width: 15ch;
    font-size: 2.35rem;
    font-weight: 720;
  }

  h3 {
    font-size: 1.15rem;
    font-weight: 720;
  }

  p {
    max-width: 68ch;
  }
}

@layer layout {
  .container {
    width: min(100% - (var(--gutter) * 2), var(--max-width));
    margin-inline: auto;
  }

  .site-header {
    position: fixed;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    color: #ffffff;
    transition:
      background-color 180ms ease,
      box-shadow 180ms ease,
      color 180ms ease;
  }

  .site-header[data-scrolled] {
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 10px 35px rgb(17 20 22 / 10%);
    color: var(--color-ink);
    backdrop-filter: blur(14px);
  }

  .site-header__inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .hero {
    position: relative;
    display: grid;
    min-height: 78svh;
    max-height: 820px;
    overflow: clip;
    place-items: center start;
    background: var(--color-night);
  }

  .hero__image,
  .hero__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero__image {
    object-fit: cover;
    object-position: center;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgb(10 12 13 / 92%) 0%, rgb(10 12 13 / 72%) 36%, rgb(10 12 13 / 28%) 68%),
      linear-gradient(180deg, rgb(10 12 13 / 15%) 0%, rgb(10 12 13 / 42%) 100%);
  }

  .hero__content {
    position: relative;
    z-index: 1;
    padding-block: 132px 76px;
  }

  .hero__lede {
    max-width: 620px;
    margin-top: 22px;
    color: rgb(255 255 255 / 88%);
    font-size: 1.25rem;
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
  }

  .section {
    padding-block: 88px;
  }

  .section--intro {
    padding-top: 80px;
  }

  .section--quiet {
    background: #edf3f0;
  }

  .section--contact {
    padding-block: 64px;
  }

  .split {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1fr);
    gap: 48px;
    align-items: start;
  }

  .split--reversed {
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
    align-items: center;
  }

  .focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 42px;
  }

  .stack-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 38px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-line);
  }

  .contact-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 34px;
    border-radius: 8px;
    background: var(--color-night);
    color: #ffffff;
  }

  .site-footer {
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
    color: var(--color-muted);
  }

  .site-footer__inner {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    top: 16px;
    left: 16px;
    padding: 10px 14px;
    transform: translateY(-140%);
    border-radius: 6px;
    background: var(--color-amber);
    color: #141414;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 760;
    text-decoration: none;
  }

  .brand__mark {
    display: grid;
    width: 38px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 8px;
    font-size: 0.88rem;
  }

  .brand__text {
    white-space: nowrap;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .site-nav a {
    padding: 9px 11px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 680;
    text-decoration: none;
  }

  .site-nav a:hover {
    background: rgb(255 255 255 / 13%);
  }

  .site-header[data-scrolled] .site-nav a:hover {
    background: rgb(11 111 103 / 9%);
  }

  .menu-toggle {
    display: none;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-weight: 720;
  }

  .eyebrow {
    margin-bottom: 14px;
    color: var(--color-teal);
    font-size: 0.78rem;
    font-weight: 820;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .hero .eyebrow {
    color: #f3bf73;
  }

  .section-lede {
    color: var(--color-muted);
    font-size: 1.08rem;
  }

  .button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 760;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    transition:
      transform 160ms ease,
      background-color 160ms ease,
      border-color 160ms ease;
  }

  .button:hover {
    transform: translateY(-1px);
  }

  .button--primary {
    background: var(--color-amber);
    color: #16120d;
  }

  .button--primary:hover {
    background: #d68e39;
  }

  .button--secondary {
    border-color: rgb(255 255 255 / 55%);
    color: #ffffff;
  }

  .button--secondary:hover {
    background: rgb(255 255 255 / 12%);
  }

  .focus-card {
    min-height: 230px;
    padding: 26px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  .focus-card__kicker {
    width: fit-content;
    margin-bottom: 24px;
    padding: 4px 8px;
    border-radius: 5px;
    background: rgb(11 111 103 / 10%);
    color: var(--color-teal-dark);
    font-size: 0.78rem;
    font-weight: 820;
  }

  .focus-card p:not(.focus-card__kicker) {
    margin-top: 14px;
    color: var(--color-muted);
  }

  .callout {
    padding: 30px;
    border-left: 5px solid var(--color-rose);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  .callout__label {
    margin-bottom: 12px;
    color: var(--color-rose);
    font-size: 0.78rem;
    font-weight: 820;
    text-transform: uppercase;
  }

  .stack-item {
    min-height: 138px;
    padding: 24px;
    background: var(--color-surface);
  }

  .stack-item__label {
    display: block;
    margin-bottom: 10px;
    color: var(--color-teal-dark);
    font-size: 0.8rem;
    font-weight: 820;
    text-transform: uppercase;
  }

  .stack-item p {
    color: var(--color-muted);
  }

  .not-found {
    min-height: 100svh;
    background: var(--color-night);
    color: #ffffff;
  }

  .not-found__main {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 24px;
  }

  .not-found__panel {
    width: min(100%, 560px);
    padding: 38px;
    border-radius: 8px;
    background: rgb(255 255 255 / 8%);
    box-shadow: 0 30px 90px rgb(0 0 0 / 34%);
  }

  .not-found__panel h1 {
    max-width: 12ch;
    font-size: 2.75rem;
  }

  .not-found__panel p:not(.eyebrow) {
    margin-block: 18px 26px;
    color: rgb(255 255 255 / 82%);
  }
}

@layer utilities {
  @media (max-width: 920px) {
    h1 {
      font-size: 3.4rem;
    }

    h2 {
      max-width: 18ch;
      font-size: 2rem;
    }

    .split,
    .split--reversed {
      grid-template-columns: 1fr;
    }

    .focus-grid,
    .stack-list {
      grid-template-columns: 1fr;
    }

    .callout {
      order: 2;
    }
  }

  @media (max-width: 720px) {
    :root {
      --gutter: 18px;
    }

    body {
      font-size: 15px;
    }

    h1 {
      font-size: 2.7rem;
    }

    .site-header__inner {
      min-height: 68px;
    }

    .menu-toggle {
      display: inline-flex;
      padding-inline: 13px;
    }

    .site-nav {
      position: absolute;
      top: calc(100% + 10px);
      right: var(--gutter);
      left: var(--gutter);
      display: grid;
      gap: 4px;
      padding: 8px;
      transform: translateY(-8px);
      border: 1px solid rgb(255 255 255 / 14%);
      border-radius: 8px;
      background: rgb(17 20 22 / 96%);
      color: #ffffff;
      box-shadow: 0 18px 45px rgb(0 0 0 / 26%);
      opacity: 0;
      pointer-events: none;
      transition:
        opacity 160ms ease,
        transform 160ms ease;
    }

    .site-header[data-nav-open="true"] .site-nav {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }

    .site-nav a {
      padding: 12px;
    }

    .hero {
      min-height: 74svh;
    }

    .hero__shade {
      background: linear-gradient(90deg, rgb(10 12 13 / 91%) 0%, rgb(10 12 13 / 70%) 100%);
    }

    .hero__content {
      padding-block: 104px 54px;
    }

    .hero__lede {
      font-size: 1.06rem;
    }

    .section {
      padding-block: 62px;
    }

    .focus-card,
    .callout,
    .stack-item,
    .contact-band {
      padding: 22px;
    }

    .contact-band,
    .site-footer__inner {
      align-items: flex-start;
      flex-direction: column;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}
