/* Refrain's site, in Term's and NeuroCards' landing and legal layouts (Term's
   worker/public/style.css), with Refrain's tokens (Refrain/Design/Palette.swift).
   Fonts are DM Sans, Fraunces and Space Grotesk, under the SIL Open Font
   License (fonts/). */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-Italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: rgba(34, 34, 34, 0.06);
  --ink: #222222;
  --ink-2: #4a4a4a;
  --ink-3: #6c6c6c;
  --hairline: #ebebeb;
  --shadow-lg: rgba(0, 0, 0, 0.12);
  --dot: rgba(74, 74, 74, 0.09);
  --btn-face: #ececec;
  --btn-face-hover: #e2e2e2;
  --red: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --surface: #1a1a1a;
    --surface-2: #2c2c2c;
    --ink: #fafafa;
    --ink-2: #ababab;
    --ink-3: #888888;
    --hairline: #252525;
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --dot: rgba(168, 168, 168, 0.06);
    --btn-face: #2c2c2c;
    --btn-face-hover: #363636;
    --red: #f87171;
  }
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  font-variation-settings: "opsz" 14;
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.3px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* The brand: the Day mark and the name. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand svg {
  width: 30px;
  height: 30px;
  display: block;
}

.brand span {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 72, "SOFT" 100, "wght" 500;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Buttons. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 14px;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 0 14px color-mix(in srgb, var(--ink) 18%, transparent);
}

.btn-primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--ink) 28%, transparent),
    0 12px 24px -16px var(--shadow-lg);
}

.btn-secondary {
  background: var(--btn-face);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--btn-face-hover);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover .btn-arrow {
  transform: translateY(2px);
}

/* The page. */
.lp-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.lp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 0;
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.top-links a:hover,
.top-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
}

.lp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(72px, 12vh, 128px);
  padding: clamp(56px, 9vh, 112px) 0;
}

.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.lp-hero-copy {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}

.lp-hero-title {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 72, "SOFT" 100, "wght" 400;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lp-hero-title em,
.legal-title em {
  font-style: italic;
  color: var(--ink-2);
}

.lp-hero-subtitle {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 24, "SOFT" 100, "wght" 400;
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  max-width: 34ch;
  margin-top: 22px;
}

.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 34px;
}

.lp-cta-note {
  font-size: 14px;
  color: var(--ink-3);
}

/* The hero picture: Now Playing, drawn in HTML, on the artwork's own colours. */
.lp-hero-visual {
  display: grid;
  place-items: center;
  min-height: 460px;
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.player-mock {
  width: min(340px, 88%);
  padding: 28px 26px 26px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 15%, #3d6b8f 0%, transparent 55%),
    radial-gradient(circle at 85% 40%, #6b3d5e 0%, transparent 55%),
    radial-gradient(circle at 40% 90%, #2f4f4a 0%, transparent 60%),
    #26303a;
  box-shadow: 0 40px 70px -40px var(--shadow-lg);
}

.player-art {
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(140deg, #9fd3f2 0%, #6f8fd8 45%, #c38ad3 100%);
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.6);
}

.player-title {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 650;
}

.player-artist {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.player-bar {
  position: relative;
  height: 6px;
  margin-top: 18px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
}

.player-bar::before {
  content: "";
  position: absolute;
  inset: 0 58% 0 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
}

.player-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.75);
}

.player-chip {
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
}

/* Feature cards. */
.lp-vignettes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  scroll-margin-top: 28px;
}

.lp-vignette {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 30px 28px;
  box-shadow: 0 10px 28px -22px var(--shadow-lg);
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lp-vignette:nth-child(1) {
  animation-delay: 0.3s;
}
.lp-vignette:nth-child(2) {
  animation-delay: 0.38s;
}
.lp-vignette:nth-child(3) {
  animation-delay: 0.46s;
}

.lp-vignette h2 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 32, "SOFT" 100, "wght" 500;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.lp-vignette p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Footer. */
.lp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-3);
}

.lp-footer .brand {
  opacity: 0.78;
}

.lp-footer .brand svg {
  width: 22px;
  height: 22px;
}

.lp-footer .brand span {
  font-size: 19px;
}

.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.lp-footer-links a {
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  transition: color 0.2s ease;
}

.lp-footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 880px) {
  .lp-main {
    gap: clamp(64px, 9vh, 88px);
    padding: 32px 0 72px;
  }

  .lp-hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .lp-hero-visual {
    min-height: 0;
    padding: 8px 0 48px;
  }

  .lp-hero-subtitle {
    max-width: none;
  }

  .lp-vignettes {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Legal and help pages. */
.legal-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.legal-skip-link:focus {
  transform: translateY(0);
}

.legal-shell {
  max-width: 1180px;
}

.legal-main {
  flex: 1;
  padding: clamp(64px, 9vw, 112px) 0 96px;
}

.legal-hero {
  max-width: 980px;
  margin: 0 auto clamp(72px, 9vw, 116px);
  opacity: 0;
  animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.legal-title {
  max-width: 13ch;
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 72, "SOFT" 100, "wght" 400;
  font-weight: 400;
  font-size: clamp(46px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.legal-intro {
  max-width: 720px;
  margin-top: 28px;
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 28, "SOFT" 100, "wght" 400;
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink-2);
}

.legal-intro a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 4px;
}

.legal-promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: clamp(42px, 6vw, 64px);
}

.legal-promise {
  min-height: 210px;
  padding: 26px 24px;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 28px -24px var(--shadow-lg);
}

.legal-promise-number {
  display: block;
  margin-bottom: 34px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.legal-promise h2 {
  margin-bottom: 10px;
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 30, "SOFT" 100, "wght" 500;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.legal-promise p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-3);
}

.legal-meta span:first-child {
  font-weight: 600;
  color: var(--ink-2);
}

.legal-meta a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 720px);
  align-items: start;
  justify-content: center;
  gap: clamp(48px, 7vw, 88px);
}

.legal-toc {
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline) transparent;
}

.legal-toc-title {
  margin-bottom: 15px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.legal-toc nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.legal-toc a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-3);
  transition: color 0.2s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible,
.legal-toc a.is-current {
  color: var(--ink);
}

.legal-toc a.is-current {
  font-weight: 600;
}

.legal-article {
  min-width: 0;
}

.legal-article section {
  padding: 0 0 58px;
  scroll-margin-top: 28px;
}

.legal-article section + section {
  padding-top: 56px;
  border-top: 1px solid var(--hairline);
}

.legal-article h2 {
  margin-bottom: 22px;
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 48, "SOFT" 100, "wght" 500;
  font-weight: 500;
  font-size: clamp(29px, 3.6vw, 39px);
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.legal-article h3 {
  margin: 30px 0 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.legal-article h2 + h3 {
  margin-top: 0;
}

.legal-article p,
.legal-article li {
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-2);
}

.legal-article p + p,
.legal-article p + ul,
.legal-article ul + p,
.legal-article ul + ul {
  margin-top: 18px;
}

.legal-article ul {
  padding-left: 21px;
}

.legal-article li + li {
  margin-top: 8px;
}

.legal-article strong {
  color: var(--ink);
  font-weight: 600;
}

.legal-article a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.legal-article a:hover {
  text-decoration-color: var(--ink);
}

.legal-basis-list {
  display: grid;
  gap: 12px;
}

.legal-basis-list > div {
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface);
}

.legal-basis-list h3 {
  margin-top: 0;
}

.legal-contact-card {
  padding: 24px 26px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface);
  font-size: 15px;
  font-style: normal;
  line-height: 1.8;
  color: var(--ink-2);
}

.legal-contact-card a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .legal-main {
    padding-top: 54px;
  }

  .legal-promises {
    grid-template-columns: 1fr;
  }

  .legal-promise {
    min-height: 0;
  }

  .legal-promise-number {
    margin-bottom: 22px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 720px);
    gap: 62px;
  }

  .legal-toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 22px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: var(--surface);
  }

  .legal-toc nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
  }
}

@media (max-width: 560px) {
  .top-links {
    gap: 0;
  }

  .top-links a {
    padding-inline: 9px;
  }

  .legal-main {
    padding-top: 48px;
  }

  .legal-title {
    font-size: clamp(40px, 13vw, 56px);
  }

  .legal-intro {
    margin-top: 22px;
  }

  .legal-promises {
    margin-top: 38px;
  }

  .legal-meta {
    flex-direction: column;
    gap: 6px;
  }

  .legal-toc nav {
    grid-template-columns: 1fr;
  }

  .legal-article section {
    padding-bottom: 46px;
  }

  .legal-article section + section {
    padding-top: 44px;
  }

  .legal-article p,
  .legal-article li {
    font-size: 15px;
    line-height: 1.72;
  }
}
