/* RedMargin marketing site (North Signal Lab). Colours, type and voice follow docs/brand.md. No scripts, no third-party requests. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #16233f;
  --ink-hover: #0a1122;
  --ink-muted: #5b6475;
  --chalk: #f6f4ee;
  --chalk-line: #d9d5ca;
  --red-pen: #e2553f; /* Decoration only (logo, hero margin rule): never text, buttons or status. */
  --white: #ffffff;
  --wrap: 68rem;
  --gutter: 1rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.125rem;
  font-weight: 600;
}
p {
  margin: 0;
}

/* Links are Ink like the text, so they are always underlined (WCAG 1.4.1). */
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--ink-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.muted {
  color: var(--ink-muted);
}
.mt-s {
  margin-top: 0.75rem;
}
.mt-m {
  margin-top: 1.25rem;
}
.shot.flat {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
}
.skip:focus {
  top: 0.5rem;
  color: var(--white);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  background: var(--white);
  color: var(--ink);
}
.btn:hover {
  background: #eef0f5;
  color: var(--ink);
}
.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
  color: var(--white);
}
.btn-lg {
  min-height: 3.25rem;
  padding-inline: 1.5rem;
  font-size: 1.0625rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--chalk-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.6rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: clamp(1.25rem, 1rem + 1.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.logo svg {
  width: 30px;
  height: 30px;
  flex: none;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.95rem;
}
.site-nav .optional {
  display: none;
}
@media (min-width: 46rem) {
  .site-nav .optional {
    display: inline;
  }
}

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) 0;
}
.hero-copy {
  max-width: 44rem;
  position: relative;
  padding-left: clamp(1rem, 3vw, 1.75rem);
}
/* The exercise book's red margin, beside (never on) the hero copy. Decorative. */
.hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--red-pen);
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--chalk-line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
}
.lede {
  margin-top: 1.1rem;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  max-width: 38rem;
}
.cta {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.price-line {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}
.shot {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  border: 1px solid var(--chalk-line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 24px 48px -28px rgb(22 35 63 / 0.45);
}
.shot figcaption {
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--chalk-line);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Sections */
section {
  padding-block: clamp(3rem, 7vw, 5rem);
}
.sec-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}
.sec-head p {
  margin-top: 0.75rem;
}
.band {
  background: var(--white);
  border-block: 1px solid var(--chalk-line);
}
.band-ink {
  background: var(--ink);
  color: var(--white);
}
.band-ink a:not(.btn) {
  color: var(--white);
}
.band-ink :focus-visible {
  outline-color: var(--white);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}
.card {
  background: var(--white);
  border: 1px solid var(--chalk-line);
  border-radius: 12px;
  padding: 1.25rem;
}
.band .card {
  background: var(--chalk);
}
.card p {
  margin-top: 0.45rem;
  font-size: 0.975rem;
}

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.7rem;
}
.ticks li {
  padding-left: 1.9rem;
  position: relative;
}
/* An Ink tick, drawn in CSS. Red Pen is kept for the logo and the hero's margin rule. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.32em;
  width: 0.45rem;
  height: 0.85rem;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--chalk-line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.9rem;
}

/* Price */
.price-card {
  max-width: 34rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1.5px solid var(--ink);
}
.price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.price strong {
  font-size: clamp(2.75rem, 7vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.steps {
  margin: 1.25rem 0 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}

/* Questions */
.faq {
  max-width: 46rem;
  border-top: 1px solid var(--chalk-line);
}
.faq details {
  border-bottom: 1px solid var(--chalk-line);
}
.faq summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq details p {
  padding: 0 0 1.1rem;
  max-width: 40rem;
}

.final {
  text-align: center;
}
.final .cta {
  justify-content: center;
}
.final p {
  margin: 0.9rem auto 0;
  max-width: 34rem;
}
.final .btn-primary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}
.final .btn-primary:hover {
  background: var(--chalk);
  border-color: var(--chalk);
  color: var(--ink);
}

/* Footer */
.site-footer {
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-left: auto;
}

/* Plain text page (privacy) */
.prose {
  max-width: 42rem;
  padding-block: clamp(2rem, 6vw, 4rem);
}
.prose h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
}
.prose p,
.prose ul {
  margin-top: 0.8rem;
}

@media print {
  .site-nav,
  .cta,
  .skip {
    display: none;
  }
}
