/* ─── Base ───────────────────────────────────────────────────────────────────
   Reset, type, layout primitives and the shared UI atoms (eyebrow, buttons,
   photo frame, tick lists, logo, reveal). Mobile-first; breakpoints
   480 / 640 / 768 / 992 / 1200 (docs/styling.md).
   ────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  /* Themed page scrollbar (docs/styling.md) — ink-tinted thumb on chalk. */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-color) 45%, var(--bg-color)) var(--bg-color);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    background: var(--chalk);
  }

  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text-color) 45%, var(--bg-color));
    border: 2px solid var(--chalk);
    border-radius: 999px;

    &:hover {
      background: var(--signal);
    }
  }
}

body {
  min-width: 320px;
  font-family: var(--text-font);
  background: var(--chalk);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

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

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--title-font);
  font-stretch: 118%;
  letter-spacing: -0.02em;
  line-height: 1;
  font-weight: 800;
}

h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ─── Layout ─── */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;

  @media (min-width: 768px) {
    padding: 0 28px;
  }
}

.sec {
  position: relative;
  padding: 96px 0;

  @media (min-width: 992px) {
    padding: 120px 0;
  }
}

.sec-head {
  display: grid;
  gap: 18px;
  margin-bottom: 48px;

  @media (min-width: 992px) {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: end;
    margin-bottom: 60px;
  }

  h2 {
    margin-top: 18px;
  }
}

/* ─── Accessibility ─── */
.sr-only,
.screen-reader-text,
.screen-reader-response {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;

  &:focus {
    top: 12px;
  }
}

/* ─── Type atoms ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;

  &::before {
    content: "";
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--signal);
  }
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
}

.hl {
  position: relative;
  color: var(--signal-d);

  @media (min-width: 480px) {
    white-space: nowrap;
  }
}

.dark .hl {
  color: var(--signal);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s;

  svg {
    flex: none;
    transition: transform 0.25s var(--ease);
  }

  &:hover svg {
    transform: translateX(4px);
  }
}

.btn-signal {
  background: var(--signal);
  color: var(--ink);
  box-shadow: 0 10px 24px -12px var(--signal-glow);

  &:hover {
    background: var(--signal-hover);
    transform: translateY(-2px);
  }
}

.btn-ink {
  background: var(--ink);
  color: var(--on-dark);

  &:hover {
    background: var(--ink-deep);
    transform: translateY(-2px);
  }
}

.btn-line {
  border-color: var(--ink);
  color: var(--ink);

  &:hover {
    background: var(--ink);
    color: var(--on-dark);
  }
}

.btn-ghost {
  border-color: color-mix(in srgb, var(--white) 35%, transparent);
  color: var(--on-dark);

  &:hover {
    border-color: var(--on-dark);
    background: color-mix(in srgb, var(--white) 8%, transparent);
  }
}

/* ─── Photo frame — styled fallback art shows when no image is set ─── */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--photo-fallback);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ─── Tick list (signal box + ink check, drawn with borders — no image) ─── */
.ticks {
  display: grid;
  gap: 10px;
  margin: 22px 0;

  li {
    position: relative;
    padding-left: 31px;
    font-size: 0.95rem;

    &::before {
      content: "";
      position: absolute;
      left: 0;
      top: 2px;
      width: 20px;
      height: 20px;
      border-radius: 6px;
      background: var(--signal);
    }

    &::after {
      content: "";
      position: absolute;
      left: 7px;
      top: 6px;
      width: 6px;
      height: 10px;
      border: solid var(--ink);
      border-width: 0 2.5px 2.5px 0;
      transform: rotate(45deg);
    }
  }
}

/* ─── Logo (header + footer) ─── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--title-font);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;

  b {
    color: var(--signal-d);
    font-weight: 900;
  }
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--ink);
  color: var(--signal);
  display: grid;
  place-items: center;
}

.logo-img {
  display: block;
}

/* ─── Scroll reveal (assets/js/script.js) ─── */
.js .rv {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

.rv.d1 {
  transition-delay: 0.08s;
}

.rv.d2 {
  transition-delay: 0.16s;
}

.rv.d3 {
  transition-delay: 0.24s;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .rv {
    opacity: 1;
    transform: none;
  }
}
