@view-transition {
  navigation: auto;
}

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  * {
    margin: 0;
  }
  img,
  svg,
  video,
  picture {
    display: block;
    max-inline-size: 100%;
  }
  img,
  video {
    block-size: auto;
  }
  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
  }
  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }
  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }
  table {
    border-collapse: collapse;
    inline-size: 100%;
  }
}

@layer utilities {
  [hidden] {
    display: none;
  }
}

@layer base {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-block-start: calc(var(--header-h) + var(--space-s));
    hyphens: auto;
    font-family: var(--font-text);
    font-size: 100%;
    background: var(--color-lava);
  }

  body {
    min-block-size: 100vh;
    min-block-size: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
    font-size: var(--step-0);
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  main {
    flex: 1 0 auto;
  }

  /* The root keeps its scroll locked while a modal dialog is open. */
  html:has(dialog[open]:modal) {
    overflow: hidden;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
    font-weight: 400;
  }
  h1 {
    font-family: var(--font-display);
    font-size: var(--step-4);
    line-height: 1.05;
  }
  h2 {
    font-family: var(--font-display);
    font-size: var(--step-3);
    line-height: 1.15;
  }
  h3 {
    font-size: var(--step-2);
    font-weight: 500;
    line-height: 1.25;
  }
  h4 {
    font-size: var(--step-1);
    font-weight: 500;
    line-height: 1.4;
  }
  p {
    text-wrap: pretty;
  }
  small {
    font-size: var(--step--1);
  }
  strong,
  b {
    font-weight: 600;
  }
  em,
  i {
    font-style: italic;
  }

  a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }
  a:hover {
    text-decoration-thickness: 2px;
  }

  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  :where([tabindex="-1"]):focus:not(:focus-visible) {
    outline: none;
  }

  ::selection {
    background: var(--accent);
    color: var(--on-accent);
  }

  hr {
    border: 0;
    border-block-start: 1px solid var(--line);
  }

  .prose {
    max-inline-size: var(--measure);
  }
  .prose > * + * {
    margin-block-start: var(--space-s);
  }
  .prose a {
    color: var(--link);
  }
  .prose ul,
  .prose ol {
    padding-inline-start: 1.25em;
  }

  .visually-hidden:not(:focus, :active) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* The brand's own gesture, borrowed from "cocktail lounge" in the logo. One short line per section at most. */
  .tagline {
    font-weight: 300;
    letter-spacing: var(--tracking-tagline);
    text-transform: lowercase;
    color: var(--fg-2);
  }

  .lead {
    font-size: var(--step-1);
    line-height: 1.4;
    color: var(--fg-2);
    max-inline-size: var(--measure);
  }

  .icon {
    inline-size: 1.5em;
    block-size: 1.5em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .icon--s {
    inline-size: 1.25rem;
    block-size: 1.25rem;
  }
  .icon--l {
    inline-size: 2rem;
    block-size: 2rem;
  }
  .icon--xl {
    inline-size: 4rem;
    block-size: 4rem;
  }

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