/* The landing page of clairh.com: the colours, type and shapes of the charter (docs/design/charte.md), without any script. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --primary: #2547c9;
  --primary-dark: #1b3699;
  --primary-soft: #e9edfb;
  --secondary: #0e7c70;
  --background: #f5f7fb;
  --surface: #ffffff;
  --text: #172033;
  --text-secondary: #556074;
  --line: #e4e8f0;
  --radius: 8px;
  --radius-card: 12px;
  --shadow: 0 1px 2px rgb(23 32 51 / 6%), 0 4px 12px rgb(23 32 51 / 6%);
  --shadow-large: 0 2px 6px rgb(23 32 51 / 6%), 0 24px 48px rgb(23 32 51 / 12%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0;
}

.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 32px);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(37 71 201 / 40%);
  outline-offset: 2px;
}

.button-large {
  padding: 14px 24px;
  font-size: 1.0625rem;
}

.button-ghost {
  background: var(--surface);
  color: var(--primary);
  border-color: #c9d0dc;
}

.button-ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.button-block {
  width: 100%;
}

.button-light {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--primary);
}

.button-light:hover {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.button-outline-light {
  background: transparent;
  border-color: rgb(255 255 255 / 60%);
  color: #ffffff;
}

.button-outline-light:hover {
  background: rgb(255 255 255 / 12%);
  border-color: #ffffff;
}

.link-strong {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.link-strong:hover {
  color: var(--primary);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.brand-name {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.top-nav {
  display: flex;
  gap: 24px;
}

.top-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--primary);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

/* Hero */
.hero {
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(37 71 201 / 12%), transparent 70%),
    radial-gradient(40rem 24rem at -10% 110%, rgb(14 124 112 / 10%), transparent 70%),
    var(--background);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
  padding-block: 80px 88px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  letter-spacing: -0.035em;
}

.accent {
  color: var(--primary);
}

.lead {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 1.1875rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.reassurance li::before {
  content: "✓";
  margin-right: 6px;
  color: var(--secondary);
  font-weight: 700;
}

.hero-visual {
  margin: 0;
}

.frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.frame-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5dae3;
}

/* What it replaces */
.replaces {
  border-bottom: 1px solid var(--line);
}

.replaces-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  padding-block: 28px;
}

.replaces p {
  color: var(--text-secondary);
  font-weight: 500;
}

.replaces ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
}

.replaces strong {
  margin-right: 6px;
  color: var(--primary);
  font-size: 1.375rem;
}

/* Sections */
.section {
  padding-block: 96px;
}

.section-alt {
  background: var(--background);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
}

.section-head > p:last-child:not(.eyebrow) {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.feature:hover {
  border-color: #c9d0dc;
  box-shadow: var(--shadow);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--primary-soft);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  font-size: 1.125rem;
}

.feature p {
  margin-top: 8px;
  color: var(--text-secondary);
}

/* Showcase */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 56px;
}

.showcase + .showcase {
  margin-top: 88px;
}

.showcase-reverse .showcase-text {
  order: 2;
}

.showcase-text h3 {
  font-size: 1.5rem;
}

.showcase-text p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* Trust */
.trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.trust-item {
  padding-top: 20px;
  border-top: 3px solid var(--primary);
}

.trust-item h3 {
  font-size: 1.0625rem;
}

.trust-item p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.plan-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-large);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.plan h3 {
  font-size: 1.375rem;
}

.plan-for {
  margin-top: 4px;
  color: var(--text-secondary);
}

.price {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.amount {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.unit {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.plan ul {
  flex: 1;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding: 6px 0 6px 26px;
  border-top: 1px solid var(--line);
}

.plan li:first-child {
  border-top: 0;
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--secondary);
  font-weight: 700;
}

.plans-note {
  max-width: 720px;
  margin: 32px auto 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-align: center;
}

/* Questions */
.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding-bottom: 20px;
  color: var(--text-secondary);
}

/* Closing */
.closing {
  background: linear-gradient(135deg, #2547c9 0%, #1b3699 60%, #172a7a 100%);
  color: #ffffff;
}

.closing-inner {
  padding-block: 80px;
  text-align: center;
}

.closing h2 {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
}

.closing p {
  margin-top: 12px;
  color: #dfe5fb;
  font-size: 1.125rem;
}

.closing .hero-actions {
  justify-content: center;
}

/* Footer */
.foot {
  padding-block: 48px 24px;
  border-top: 1px solid var(--line);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.foot nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foot nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.foot nav a:hover {
  color: var(--primary);
}

.foot-tagline {
  margin-top: 12px;
  color: var(--text-secondary);
}

.copyright {
  margin-top: 40px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Tablets and phones */
@media (max-width: 960px) {
  .top-nav {
    display: none;
  }

  .hero-inner,
  .showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-inner {
    padding-block: 56px 64px;
  }

  .showcase-reverse .showcase-text {
    order: 0;
  }

  .features,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding-block: 64px;
  }
}

@media (max-width: 520px) {
  .top-actions {
    gap: 12px;
  }

  .top-actions .button {
    padding: 8px 12px;
  }

  .brand-name {
    display: none;
  }

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

  .hero-actions .button {
    width: 100%;
  }
}

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

  /* The two elements that move: the same selectors as their transitions, later in the file, without !important. */
  .button,
  .feature {
    transition: none;
  }
}
