/* Logic of Scale landing page. Tokens mirror video/src/shared/brand.ts. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #0c0f14;
  --panel: #151a22;
  --ink: #f3f1ec;
  --muted: #9aa3b2;
  --accent: #f2702a;
  --line: rgba(243, 241, 236, 0.12);

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 34rem;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-decoration: none;
}

.mark {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--ink);
}

.mark-top {
  fill: var(--accent);
}

/* YouTube's icon, in the colour of the text beside it. */
.yt {
  flex-shrink: 0;
  width: 1.3em;
  height: 1.3em;
  fill: currentColor;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
}

.quiet-link span {
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--line);
}

.quiet-link:hover {
  color: var(--ink);
}

.quiet-link:hover span {
  text-decoration-color: currentColor;
}

/* Hero: the headline's first line grows word by word; the second stays flat. */

.hero {
  container-type: inline-size;
  padding: clamp(2.5rem, 9vh, 7rem) var(--gutter) clamp(3.5rem, 10vh, 7rem);
}

h1 {
  /* One unit of the headline. The rising line measures 17.5 units wide, so
     this fills the column on a phone and stops growing on a wide screen. */
  --unit: min(100cqi / 17.7, 4.5rem);
  margin: 0;
  font-size: var(--unit);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.rise {
  display: block;
  white-space: nowrap;
  line-height: 1;
}

.rise > span {
  display: inline-block;
  font-size: calc(var(--s) * 1em);
  line-height: 0.9;
}

.flat {
  display: block;
  margin-top: 0.35em;
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .rise > span {
    animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.15s + var(--i) * 0.14s);
  }

  .flat {
    animation: settle 0.6s ease-out 1.15s both;
  }

  @keyframes grow {
    from {
      font-size: 1em;
    }
  }

  @keyframes settle {
    from {
      opacity: 0;
    }
  }
}

.lede {
  max-width: var(--measure);
  margin: clamp(2rem, 5vh, 3.25rem) 0 0;
  font-size: clamp(1.15rem, 1.1rem + 0.4vw, 1.4rem);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem 0.95rem 1.35rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--paper);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}

.button:hover {
  background: #ff8442;
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.when {
  margin: 0;
  max-width: 19rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

/* The three questions */

.questions,
.covers {
  padding: clamp(3rem, 8vh, 5.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 clamp(1.75rem, 4vh, 2.75rem);
  color: var(--muted);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.questions dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4.5rem);
  margin: 0;
}

.questions dt {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

/* Each question's icon sits on its own row above it, at the left edge. */
.q-icon {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 0 1.1rem -0.1rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.questions dd {
  max-width: 24rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

/* What we cover */

.covers ul {
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.covers li {
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.3rem);
}

.covers li:first-child {
  padding-top: 0;
}

.covers li:last-child {
  border-bottom: 0;
}

.covers strong {
  color: var(--ink);
  font-weight: 650;
}

/* Footer */

footer {
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

footer p {
  max-width: 40rem;
  margin: 0 0 0.6rem;
}

footer .fine {
  margin-top: 1.5rem;
}
