@layer reset, base, components, utilities;

:root {
  --bone: #f1ede3;
  --bone-2: #e4dfd3;
  --mist: #d6d0c3;
  --ink: #1a1917;
  --ink-soft: #3d3b37;
  --paper: #f7f4ee;
  --violet: #6c32f0;
  --violet-deep: #4b16c8;
  --line: rgba(26, 25, 23, 0.22);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6.5rem;
  --measure: 38rem;
  --page: min(42rem, calc(100% - 2.5rem));
  --wide: min(58rem, calc(100% - 2.5rem));
  --font: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --lh: 1.6;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

  html {
    scroll-behavior: smooth;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
      animation: none !important;
      transition: none !important;
    }
  }

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

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

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

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

  a {
    color: inherit;
  }

  table {
    border-collapse: collapse;
    inline-size: 100%;
  }
}

@layer base {
  html {
    background: var(--bone);
    color: var(--ink);
  }

  body {
    min-block-size: 100dvh;
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: var(--lh);
    background-color: var(--bone);
    padding-block-start: 2.75rem;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 400;
    opacity: 0.055;
    background-image: url("/assets/paper-grain-bone.jpg");
    background-size: 420px;
    mix-blend-mode: multiply;
  }

  :focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 4px;
  }

  h1,
  h2,
  h3 {
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.018em;
    text-wrap: balance;
  }

  h1 {
    font-size: clamp(2.15rem, 5.2vw, 3.35rem);
    font-weight: 900;
  }

  h2 {
    font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  }

  h3 {
    font-size: 1.2rem;
  }

  p + p {
    margin-block-start: 1em;
  }

  strong {
    font-weight: 700;
  }

  .skip {
    position: absolute;
    inset-inline-start: var(--space-3);
    inset-block-start: -100%;
    z-index: 600;
    padding: var(--space-2) var(--space-3);
    background: var(--violet);
    color: #fff;
  }

  .skip:focus {
    inset-block-start: var(--space-2);
  }
}

@layer components {
  .age {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 500;
    background: var(--ink);
    color: var(--bone);
    font-size: 0.8125rem;
    line-height: 1.4;
  }

  .age__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    max-inline-size: var(--wide);
    margin-inline: auto;
    padding: 0.55rem 1.25rem;
  }

  .age a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .age a::before {
    display: none;
  }

  .age.is-compact .age__text {
    display: none;
  }

  .age__toggle {
    flex: none;
    color: var(--bone);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    font-size: 0.75rem;
  }

  .site-header {
    position: sticky;
    inset-block-start: 2.75rem;
    z-index: 300;
    background: var(--bone);
    border-block-end: 1px solid var(--line);
    transition: transform 0.35s var(--ease);
  }

  .site-header.is-away {
    transform: translateY(calc(-100% - 2.75rem));
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    max-inline-size: var(--wide);
    margin-inline: auto;
    padding: 0.85rem 1.25rem;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .brand::before {
    display: none;
  }

  .brand img,
  .brand svg {
    inline-size: 2.25rem;
    block-size: 2.25rem;
  }

  .k-hint {
    display: none;
    margin-inline-start: auto;
    margin-inline-end: var(--space-3);
    font-size: 0.75rem;
    color: var(--ink-soft);
    white-space: nowrap;
  }

  @media (min-width: 64rem) {
    .k-hint {
      display: block;
    }
  }

  .nav-toggle {
    display: none;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    position: relative;
  }

  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    position: absolute;
    inset-inline: 0.65rem;
    block-size: 2px;
    background: var(--ink);
  }

  .nav-toggle span {
    inset-block-start: 50%;
  }

  .nav-toggle span::before,
  .nav-toggle span::after {
    content: "";
    inset-inline: 0;
  }

  .nav-toggle span::before {
    inset-block-start: -7px;
  }

  .nav-toggle span::after {
    inset-block-start: 7px;
  }

  .site-nav {
    display: flex;
    gap: 1.15rem;
  }

  .site-nav a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--violet);
  }

  @media (max-width: 52rem) {
    .nav-toggle {
      display: inline-flex;
    }

    .site-nav {
      position: absolute;
      inset-inline: 0;
      inset-block-start: 100%;
      display: none;
      flex-direction: column;
      gap: 0;
      background: var(--paper);
      padding: var(--space-3) 1.25rem var(--space-4);
      border-block-end: 1px solid var(--line);
    }

    .site-nav.is-open {
      display: flex;
    }

    .site-nav a {
      padding-block: 0.7rem;
      border-block-end: 1px solid var(--line);
    }

    body.nav-open {
      overflow: hidden;
    }
  }

  .wrap {
    max-inline-size: var(--page);
    margin-inline: auto;
    padding-inline: 1.25rem;
  }

  .wrap--wide {
    max-inline-size: var(--wide);
  }

  .band {
    padding-block: var(--space-7);
  }

  .band--bone {
    background: var(--bone);
  }

  .band--mist {
    background: var(--bone-2);
  }

  .band--paper {
    background: var(--paper);
  }

  .band--ink {
    background: var(--ink);
    color: var(--bone);
  }

  .rule {
    border: 0;
    block-size: 1px;
    background: var(--ink);
    opacity: 0.28;
    margin-block: var(--space-6);
    margin-inline: 12%;
  }

  .kicker {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-block-end: var(--space-3);
  }

  .kicker svg {
    inline-size: 0.85rem;
    block-size: 0.85rem;
    flex: none;
  }

  .hero {
    position: relative;
    color: var(--bone);
    background-color: var(--ink);
    background-image: linear-gradient(108deg, rgba(26, 25, 23, 0.88) 34%, rgba(26, 25, 23, 0.42) 68%, rgba(26, 25, 23, 0.2)),
      url("/assets/hero-colour-block.jpg");
    background-size: cover;
    background-position: center;
    padding-block: clamp(4.5rem, 10vw, 7.5rem) clamp(5.5rem, 12vw, 8.5rem);
    clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
  }

  .hero .wrap {
    max-inline-size: var(--page);
  }

  .hero h1 .pop {
    color: #cbb8ff;
    box-shadow: inset 0 -0.12em 0 var(--violet);
  }

  .hero .lede {
    margin-block-start: var(--space-4);
    font-size: 1.15rem;
    font-weight: 600;
    max-inline-size: 34rem;
  }

  .hero .jump {
    display: inline-flex;
    margin-block-start: var(--space-5);
  }

  .notice {
    outline: 1px solid var(--ink);
    outline-offset: 5px;
    padding: var(--space-4);
    background: var(--paper);
  }

  .notice--ink {
    background: transparent;
    color: inherit;
    outline-color: var(--bone);
  }

  .qa {
    outline: 1px solid var(--ink);
    outline-offset: 6px;
    padding: var(--space-5) var(--space-4);
    background: var(--paper);
  }

  .qa__q {
    font-weight: 700;
    font-size: 1.15rem;
    margin-block-end: var(--space-2);
  }

  .qa__q::before {
    content: "Q";
    display: inline-block;
    margin-inline-end: 0.45rem;
    color: var(--violet);
    font-weight: 900;
  }

  .stats {
    display: grid;
    gap: var(--space-4);
    padding-block: var(--space-5);
  }

  @media (min-width: 40rem) {
    .stats {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .stats div {
    outline: 1px solid var(--line);
    outline-offset: 4px;
    padding: var(--space-3);
  }

  .stats b {
    display: block;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .figure {
    position: relative;
    margin-block: var(--space-5);
  }

  .figure img {
    inline-size: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
  }

  .figure::after {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: -8px;
    inline-size: 2px;
    background: var(--violet);
    pointer-events: none;
  }

  .figure figcaption {
    margin-block-start: var(--space-2);
    font-size: 0.8rem;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
    color: var(--ink-soft);
  }

  a:not(.brand):not(.btn):not(.skip):not(.age a):not(.nav-toggle) {
    text-decoration: none;
    background-image: linear-gradient(var(--violet), var(--violet));
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.28s var(--ease);
  }

  a:not(.brand):not(.btn):not(.skip):not(.age a)::before {
    content: "";
    display: inline-block;
    inline-size: 0.42em;
    block-size: 0.42em;
    background: var(--violet);
    margin-inline-end: 0.38em;
    vertical-align: 0.12em;
  }

  a:not(.brand):not(.btn):not(.skip):not(.age a):hover,
  a:not(.brand):not(.btn):not(.skip):not(.age a):focus-visible {
    background-size: 100% 1px;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-block-size: 2.75rem;
    padding: 0.55rem 1.1rem;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 0;
  }

  .btn::before {
    display: none !important;
  }

  .btn-primary {
    color: #fff;
    background-image: linear-gradient(135deg, #7a45f5 0%, #4b16c8 100%);
  }

  .btn-primary:hover,
  .btn-primary:focus-visible {
    background-image: linear-gradient(135deg, #8a5cff 0%, #3e12ad 100%);
  }

  .btn-quiet {
    color: var(--ink);
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--ink);
  }

  .btn-quiet:hover {
    background: var(--ink);
    color: var(--bone);
  }

  .badge {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--bone);
    border-radius: 0;
  }

  .badge--pop {
    background: var(--violet);
    color: #fff;
  }

  .badge--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
  }

  .op {
    outline: 1px solid var(--ink);
    outline-offset: 6px;
    padding: 6px;
    margin-block: var(--space-5);
  }

  .op__inner {
    background: var(--paper);
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    padding: var(--space-4);
  }

  .op__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-block-end: var(--space-3);
  }

  .op__logo {
    inline-size: 4.5rem;
    block-size: 3rem;
    object-fit: contain;
    background: #fff;
    padding: 0.25rem;
  }

  .op h3 {
    font-size: 1.35rem;
    margin-block-end: 0.2rem;
  }

  .op__verdict {
    font-weight: 700;
    font-size: 1.05rem;
    margin-block: var(--space-3) var(--space-4);
    padding-inline-start: var(--space-3);
    border-inline-start: 3px solid var(--violet);
  }

  .op__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-block: var(--space-3);
  }

  .op__licence {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-block: var(--space-3);
  }

  .op__licence dt {
    font-variant: small-caps;
    letter-spacing: 0.08em;
    color: var(--ink);
  }

  .op__licence dd {
    margin-inline-start: 0;
    margin-block-end: 0.35rem;
  }

  .op__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-block-start: var(--space-4);
  }

  .op__fine {
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-block-start: var(--space-3);
  }

  .list-lead > li {
    list-style: none;
    margin-block: 0.85rem;
    padding-inline-start: 0;
  }

  .list-lead {
    padding-inline-start: 0;
  }

  .list-lead .lead {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-inline-end: 0.4rem;
  }

  .table-wrap {
    margin-block: var(--space-5);
    outline: 1px solid var(--ink);
    outline-offset: 6px;
    padding: var(--space-3);
    overflow: auto;
  }

  .data {
    font-size: 0.95rem;
  }

  .data th,
  .data td {
    text-align: start;
    padding: 0.7rem 0.65rem;
    vertical-align: top;
    border-block-end: 1px solid var(--line);
  }

  .data th:first-child,
  .data td:first-child {
    inline-size: 34%;
    font-weight: 700;
  }

  .data thead th {
    font-variant: small-caps;
    letter-spacing: 0.08em;
    font-weight: 700;
    background: var(--bone-2);
  }

  @media (max-width: 56rem) {
    .data,
    .data tbody,
    .data tr,
    .data th,
    .data td {
      display: block;
      inline-size: 100%;
    }

    .data thead {
      display: none;
    }

    .data tr {
      padding-block: var(--space-3);
      border-block-end: 1px solid var(--ink);
    }

    .data td {
      display: flex;
      justify-content: space-between;
      gap: var(--space-3);
      border: 0;
      padding-inline: 0;
    }

    .data td::before {
      content: attr(data-label);
      font-weight: 700;
      font-variant: small-caps;
      letter-spacing: 0.06em;
    }
  }

  .faq-stage {
    margin-block-start: var(--space-6);
  }

  .faq-stage h3 {
    margin-block-end: var(--space-3);
  }

  .faq__item {
    border-block-end: 1px solid var(--line);
  }

  .faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    inline-size: 100%;
    text-align: start;
    padding-block: 0.95rem;
    font-weight: 700;
  }

  .faq__q .chev {
    flex: none;
    inline-size: 0.7rem;
    block-size: 0.7rem;
    border-inline-end: 2px solid var(--ink);
    border-block-end: 2px solid var(--ink);
    transform: rotate(45deg);
    transition: transform 0.22s var(--ease);
  }

  .faq__q[aria-expanded="true"] .chev {
    transform: rotate(225deg);
  }

  .faq__a {
    padding-block-end: var(--space-4);
    font-size: 1rem;
  }

  .site-footer {
    background: var(--ink);
    color: var(--bone);
    padding-block: var(--space-8) var(--space-7);
    text-align: center;
  }

  .site-footer .wrap {
    max-inline-size: 36rem;
  }

  .site-footer .wordmark {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-block-end: var(--space-4);
  }

  .site-footer a {
    color: #fff;
  }

  .site-footer a::before {
    background: var(--violet);
  }

  .foot-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 1.1rem;
    margin-block: var(--space-5);
    font-size: 0.95rem;
  }

  .safety {
    text-align: start;
    margin-block: var(--space-6) var(--space-5);
    outline: 1px solid var(--bone);
    outline-offset: 6px;
    padding: var(--space-4);
  }

  .safety summary {
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--bone);
  }

  .safety summary::marker {
    color: var(--violet);
  }

  .safety__intro {
    margin-block: var(--space-3);
    font-size: 0.95rem;
  }

  .safety ul {
    padding-inline-start: 0;
    list-style: none;
  }

  .safety li {
    margin-block: 0.65rem;
  }

  .safety img {
    display: inline-block;
    block-size: 1.6rem;
    inline-size: auto;
    margin-inline-end: 0.4rem;
    vertical-align: middle;
    background: #fff;
    padding: 0.15rem;
  }

  .legal-block {
    font-size: 0.88rem;
    margin-block-start: var(--space-5);
    text-align: start;
    outline: 1px solid rgba(241, 237, 227, 0.35);
    outline-offset: 6px;
    padding: var(--space-4);
  }

  .cookie {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 520;
    background: var(--paper);
    color: var(--ink);
    border-block-start: 1px solid var(--ink);
    padding: var(--space-4) 1.25rem;
  }

  .cookie__inner {
    max-inline-size: var(--wide);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
  }

  .cookie p {
    flex: 1 1 16rem;
    font-size: 0.92rem;
  }

  .cookie__actions {
    display: flex;
    gap: var(--space-2);
  }

  .form label {
    display: block;
    font-weight: 700;
    margin-block-end: 0.3rem;
  }

  .form p {
    margin-block-end: var(--space-4);
  }

  .form input,
  .form textarea {
    inline-size: 100%;
    padding: 0.65rem 0.7rem;
    border: 0;
    background: var(--paper);
    outline: 1px solid var(--ink);
    outline-offset: 3px;
  }

  .form textarea {
    min-block-size: 9rem;
  }

  .page-hero {
    padding-block: var(--space-7) var(--space-5);
  }

  .page-hero h1 {
    max-inline-size: 18ch;
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .muted {
    color: var(--ink-soft);
  }

  .band--ink .muted {
    color: #cfc9bd;
  }

  .tiny {
    font-size: 0.82rem;
  }
}
