/*
  Lido — website styles.

  The colour, radius and spacing values below are the app's own tokens, copied from
  ui/theme/Color.kt and ui/theme/Shape.kt rather than re-picked by eye. If the app's palette
  moves, these move with it; the site and the product should never be two different blues.

  No web fonts: the app draws with the platform's default family, and the site does the same.
  It also means nothing blocks the first paint.
*/

/* ---------------------------------------------------------------- tokens */

:root {
  /* LidoLightColors */
  --bg: #f3f7fd;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-muted: #e9f0fb;
  --outline: #d3e1f2;
  --outline-subtle: #e6eef9;
  --primary: #0a66d8;
  --primary-muted: #e6f0fe;
  --on-primary: #ffffff;
  --accent: #0e96dc;
  --text: #0c2033;
  --text-2: #4f6c8b;
  /*
    The app's light textTertiary is #7890AD, which reaches only 3.1:1 on this background.
    That is fine behind a 14sp label the eye skims on a phone, but the site sets captions,
    the footer and the legal dates in it at small sizes, so the web value is darkened to
    clear 4.5:1. The dark theme's tertiary already passes and is used unchanged.
  */
  --text-3: #5f7289;
  --positive: #0a7658;
  --positive-muted: #e2f5ee;
  --spark: #d4508a;
  --water: #45c4fd;
  --water-deep: #0d82fd;

  /* Shape.kt */
  --r-control: 12px;
  --r-card: 16px;
  --r-surface: 20px;
  --r-pill: 999px;

  /* Spacing.kt, extended upward for a page rather than a phone screen */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 20px;
  --s-2xl: 24px;
  --s-3xl: 32px;
  --s-4xl: 40px;
  --s-5xl: 64px;
  --s-6xl: 96px;

  --measure: 68ch;
  --page: 1120px;

  /* One soft shadow, used sparingly. Cards lean on the outline, not on depth. */
  --lift: 0 1px 2px rgb(12 32 51 / 0.04), 0 12px 32px -12px rgb(12 32 51 / 0.14);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* LidoDarkColors — navy rather than black, so the tonal steps still read */
    --bg: #060e17;
    --bg-elevated: #0c1826;
    --surface: #0c1826;
    --surface-muted: #16293a;
    --outline: #22384d;
    --outline-subtle: #192d40;
    --primary: #56aeff;
    --primary-muted: #1a3d66;
    --on-primary: #03203c;
    --accent: #63d0ff;
    --text: #e8f1fb;
    --text-2: #9db4cc;
    --text-3: #708aa6;
    --positive: #3fc79c;
    --positive-muted: #0d2b25;
    --spark: #ffa8c9;
    --water: #35a8f2;
    --water-deep: #1370d6;
    --lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
  }
}

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchors land below the sticky header rather than under it. */
  scroll-padding-top: 88px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--s-xs);
}

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

hr {
  height: 1px;
  margin: var(--s-4xl) 0;
  border: 0;
  background: var(--outline-subtle);
}

code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--s-xl);
}

.section {
  padding-block: clamp(var(--s-4xl), 6vw, var(--s-6xl));
}

.section--tight {
  padding-block: clamp(var(--s-3xl), 4vw, var(--s-5xl));
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--s-md) var(--s-lg);
  border-radius: 0 0 var(--r-control) 0;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* ---------------------------------------------------------------- header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
}

/* The rule only appears once the page has moved, so the header is part of the hero at rest. */
.masthead[data-scrolled="true"] {
  border-bottom-color: var(--outline-subtle);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--s-lg);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  margin-right: auto;
  color: var(--text);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-2xl);
}

.nav a {
  color: var(--text-2);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav__toggle {
  display: none;
}

@media (max-width: 720px) {
  /*
    Without scripting the links simply wrap onto a second line under the brand — navigable,
    if plainer. The collapsible panel below is scoped to .js, so the toggle button only
    appears when there is something able to answer it.
  */
  .masthead__inner {
    flex-wrap: wrap;
    padding-bottom: var(--s-md);
  }

  .js .masthead__inner {
    flex-wrap: nowrap;
    padding-bottom: 0;
  }

  .nav {
    flex-basis: 100%;
    gap: var(--s-lg);
  }

  .js .nav {
    position: absolute;
    left: var(--s-xl);
    right: var(--s-xl);
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-sm);
    border: 1px solid var(--outline);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--lift);
  }

  .js .nav[hidden] {
    display: none;
  }

  .js .nav a {
    padding: var(--s-md) var(--s-md);
    border-radius: var(--r-control);
    font-size: 1rem;
  }

  .js .nav a + a {
    border-top: 1px solid var(--outline-subtle);
    border-radius: 0;
  }

  .js .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--outline);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 52px;
  padding: 0 var(--s-2xl);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
}

.btn--secondary {
  border-color: var(--outline);
  background: transparent;
  color: var(--primary);
}

.btn--secondary:hover {
  border-color: var(--primary);
  background: var(--primary-muted);
}

/* Not a button: the app is not out yet, and a dead button that looks live is a small lie. */
.btn--pending {
  border-color: var(--outline);
  background: var(--surface-muted);
  color: var(--text-2);
  cursor: default;
}

.btn--pending:active {
  transform: none;
}

/* ---------------------------------------------------------------- hero */

.hero {
  padding-block: clamp(var(--s-3xl), 5vw, var(--s-5xl)) 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(var(--s-3xl), 5vw, var(--s-6xl));
  align-items: center;
}

@media (max-width: 880px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
}

.hero__copy > * + * {
  margin-top: var(--s-xl);
}

.hero__lede {
  max-width: 46ch;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-md);
}

@media (max-width: 880px) {
  .hero__actions {
    justify-content: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  padding: var(--s-xs) var(--s-md) var(--s-xs) var(--s-sm);
  border: 1px solid var(--outline);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--water);
}

/* The three claims, each one checkable against the app's manifest. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) var(--s-xl);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* Sits closer to a paragraph than a block, so it needs the extra air the stack doesn't give. */
.hero__lede + .facts {
  margin-top: var(--s-2xl);
}

.facts li {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}

.facts svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--positive);
}

@media (max-width: 880px) {
  .facts {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------- phone frame */

/*
  Just a bezel. No drawn speaker or notch: the screenshots carry the device's own status bar,
  and a second set of hardware on top of it reads as a mistake.
*/
.phone {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  padding: 10px;
  border: 1px solid var(--outline);
  border-radius: 42px;
  background: var(--surface);
  box-shadow: var(--lift);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.phone--sm {
  max-width: 236px;
  border-radius: 34px;
  padding: 8px;
}

.phone--sm img {
  border-radius: 26px;
}

/* ---------------------------------------------------------------- cards */

.card {
  padding: var(--s-2xl);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--r-surface);
  background: var(--surface);
}

.grid {
  display: grid;
  gap: var(--s-lg);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-lg);
  border-radius: var(--r-control);
  background: var(--primary-muted);
  color: var(--primary);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 + p {
  margin-top: var(--s-sm);
  color: var(--text-2);
  font-size: 0.9688rem;
}

/* ---------------------------------------------------------------- section headings */

.lead {
  max-width: 58ch;
  margin-top: var(--s-md);
  color: var(--text-2);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
}

.section__head {
  margin-bottom: clamp(var(--s-2xl), 3vw, var(--s-4xl));
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--center .lead {
  margin-inline: auto;
}

.kicker {
  display: block;
  margin-bottom: var(--s-sm);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- alternating rows */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: clamp(var(--s-2xl), 5vw, var(--s-6xl));
  align-items: center;
}

.showcase + .showcase {
  margin-top: clamp(var(--s-4xl), 6vw, var(--s-6xl));
}

.showcase--flip {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
}

.showcase--flip .showcase__art {
  order: -1;
}

@media (max-width: 880px) {
  .showcase,
  .showcase--flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .showcase--flip .showcase__art {
    order: 0;
  }
}

.showcase__copy > * + * {
  margin-top: var(--s-lg);
}

.checklist {
  display: grid;
  gap: var(--s-md);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}

.checklist li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--s-md);
  align-items: start;
}

.checklist svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--primary);
}

/* ---------------------------------------------------------------- privacy band */

.band {
  border-block: 1px solid var(--outline-subtle);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary-muted) 55%, var(--bg)),
    var(--bg)
  );
}

.receipts {
  display: grid;
  gap: var(--s-lg);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0;
  padding: 0;
}

.receipts > div {
  padding: var(--s-xl);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--r-card);
  background: var(--surface);
}

.receipts dt {
  font-weight: 650;
}

.receipts dd {
  margin: var(--s-sm) 0 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 236px;
  gap: var(--s-xl);
  padding-block: var(--s-xs) var(--s-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  /* The last phone fades out instead of being sliced, which reads as "keep going". */
  mask-image: linear-gradient(to right, #000 calc(100% - 80px), transparent);
}

.gallery > figure {
  margin: 0;
  scroll-snap-align: center;
}

.gallery figcaption {
  margin-top: var(--s-md);
  color: var(--text-3);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------------------------------------------------------------- faq */

.faq {
  display: grid;
  gap: var(--s-md);
  max-width: 820px;
}

/*
  Question list beside its heading rather than under it: an 820px column of accordions with a
  half-empty page to its right looks like the layout ran out of ideas.
*/
.qa {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: clamp(var(--s-2xl), 5vw, var(--s-5xl));
  align-items: start;
}

.qa .section__head {
  margin-bottom: 0;
  position: sticky;
  top: 108px;
}

.qa .faq {
  max-width: none;
}

@media (max-width: 880px) {
  .qa {
    grid-template-columns: minmax(0, 1fr);
  }

  .qa .section__head {
    position: static;
  }
}

.faq details {
  border: 1px solid var(--outline-subtle);
  border-radius: var(--r-card);
  background: var(--surface);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
  padding: var(--s-xl);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq details > div {
  padding: 0 var(--s-xl) var(--s-xl);
  color: var(--text-2);
}

.faq details > div > * + * {
  margin-top: var(--s-md);
}

/* ---------------------------------------------------------------- get section */

.get {
  display: grid;
  gap: var(--s-2xl);
  place-items: center;
  padding: clamp(var(--s-3xl), 5vw, var(--s-5xl)) var(--s-xl);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--r-surface);
  background: var(--surface);
  text-align: center;
}

.spec {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-sm) var(--s-2xl);
  margin: 0;
  padding: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.spec div {
  display: flex;
  gap: var(--s-sm);
}

.spec dt {
  color: var(--text-3);
}

.spec dd {
  margin: 0;
  font-weight: 600;
}

/* ---------------------------------------------------------------- prose (legal pages) */

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: var(--s-lg);
}

.prose h2 {
  margin-top: var(--s-4xl);
  font-size: 1.375rem;
}

.prose h3 {
  margin-top: var(--s-2xl);
}

.prose p,
.prose li {
  color: var(--text-2);
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose ul,
.prose ol {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding-left: var(--s-2xl);
}

.prose li::marker {
  color: var(--text-3);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: var(--s-md) var(--s-md);
  border-bottom: 1px solid var(--outline-subtle);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.prose td {
  color: var(--text-2);
}

.prose td code {
  white-space: nowrap;
}

.callout {
  padding: var(--s-xl);
  border: 1px solid var(--outline-subtle);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-card);
  background: var(--surface);
}

.callout p {
  color: var(--text-2);
}

.callout p + p {
  margin-top: var(--s-md);
}

.page-head {
  padding-block: clamp(var(--s-3xl), 5vw, var(--s-5xl)) var(--s-2xl);
}

.page-head .updated {
  margin-top: var(--s-md);
  color: var(--text-3);
  font-size: 0.9375rem;
}

/* A plain-language summary above each legal page, because nobody reads the clauses. */
.summary-card {
  margin-top: var(--s-2xl);
  padding: var(--s-xl);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--r-card);
  background: var(--surface-muted);
}

.summary-card h2 {
  margin: 0 0 var(--s-sm);
  font-size: 1rem;
}

.summary-card p {
  color: var(--text-2);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) var(--s-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------------- footer */

.footer {
  margin-top: var(--s-5xl);
  border-top: 1px solid var(--outline-subtle);
  background: var(--bg-elevated);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2xl);
  justify-content: space-between;
  padding-block: var(--s-4xl);
}

.footer__brand {
  max-width: 34ch;
}

.footer__brand p {
  margin-top: var(--s-md);
  color: var(--text-3);
  font-size: 0.9375rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4xl);
}

.footer__links h3 {
  margin-bottom: var(--s-md);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__links ul {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__legal {
  padding-bottom: var(--s-4xl);
  color: var(--text-3);
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------- utilities */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.center {
  text-align: center;
}

.stack > * + * {
  margin-top: var(--s-lg);
}

/* ---------------------------------------------------------------- print */

@media print {
  .masthead,
  .footer__links,
  .nav__toggle,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .prose {
    max-width: none;
  }

  a {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
