/*
 * Stripe currently pairs Söhne with Source Code Pro. Söhne is proprietary, so
 * Inter is bundled as the metrically close, license-safe web fallback. If a
 * licensed Söhne webfont is added later, the shared font stack will pick it up
 * without any component-level changes.
 */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/source-code-pro-latin-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(
    --font-body,
    "Söhne",
    "Sohne",
    "sohne-var",
    "Inter",
    "Helvetica Neue",
    Arial,
    sans-serif
  );
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

main,
header,
footer {
  min-width: 0;
}

[hidden] {
  display: none !important;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  /* Preserve each asset's intrinsic ratio when only its rendered width is set. */
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

p,
h1,
h2,
h3,
ul,
ol {
  margin-top: 0;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: var(--page-bg);
  background: var(--text);
  transform: translateY(-160%);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.container {
  width: min(100% - 40px, 1280px);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(84px, 10vw, 152px);
}

.section-heading {
  max-width: 920px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section-heading h2 {
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 5.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.section-heading p,
.lead {
  max-width: 68ch;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control, 4px);
  font-weight: 700;
  text-align: center;
  touch-action: manipulation;
  cursor: pointer;
  transition:
    color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn::after {
  content: "→";
}

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

.btn-primary:hover {
  background: var(--button-primary-hover);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--text);
  background: var(--surface-hover);
}

.site-header {
  position: absolute;
  z-index: 100;
  inset: 0 0 auto;
  padding-block: 18px;
}

.nav-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-name {
  max-width: 110px;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  margin-inline: auto;
}

.nav-links a,
.nav-login {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-toggle {
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control, 4px);
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  width: 20px;
  height: 2px;
  display: block;
  background: currentColor;
  content: "";
}

.nav-toggle span {
  margin-block: 4px;
}

.hero {
  min-height: 920px;
  min-height: max(760px, 100svh);
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin-inline: auto;
  padding: 140px 20px 86px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 8.6vw, 8.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto 34px;
  font-size: clamp(1rem, 1.65vw, 1.3rem);
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.proof-band {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-item {
  min-height: 116px;
  padding: 24px;
}

.proof-item strong,
.proof-item span {
  display: block;
}

.proof-item strong {
  margin-bottom: 4px;
  font-size: clamp(1.4rem, 2.4vw, 2.3rem);
  line-height: 1;
}

.proof-item span {
  font-size: 0.82rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
.field-label {
  font-size: 0.8rem;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea,
.coverage-search input,
.coverage-search select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control, 4px);
  padding: 12px 14px;
  color: var(--text);
  background: var(--field-bg);
}

.form-field textarea {
  min-height: 124px;
  resize: vertical;
}

.form-field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 18px;
  margin: 0;
  color: var(--error);
  font-size: 0.76rem;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  grid-column: 1 / -1;
  font-size: 0.86rem;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}

.form-status {
  min-height: 24px;
  margin: 16px 0 0;
  font-weight: 600;
}

.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 380ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-ready .reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.motion-title-line {
  display: block;
  overflow: clip;
}

.motion-title-line-inner {
  display: block;
  transform: translate3d(0, 112%, 0);
  will-change: transform;
}

.motion-title.is-motion-visible .motion-title-line-inner {
  animation: masked-slide-reveal 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion-title.is-motion-visible
  .motion-title-line:nth-child(2)
  .motion-title-line-inner {
  animation-delay: 80ms;
}

@keyframes masked-slide-reveal {
  from {
    transform: translate3d(0, 112%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links,
  .nav-actions {
    position: fixed;
    z-index: 110;
    left: 20px;
    right: 20px;
    display: none;
    background: var(--nav-panel-bg);
  }

  .nav-links {
    top: 92px;
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--line-strong);
  }

  .nav-actions {
    top: 350px;
    padding: 0 18px 18px;
  }

  body.nav-open .nav-links,
  body.nav-open .nav-actions {
    display: flex;
  }

  .nav-links a,
  .nav-login {
    min-height: 48px;
  }

  .nav-actions .btn {
    flex: 1;
  }

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

@media (max-width: 639px) {
  .container {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    padding-block: 10px;
  }

  .brand-name {
    max-width: 102px;
    font-size: 0.94rem;
  }

  .hero {
    min-height: 940px;
    min-height: max(860px, 100svh);
  }

  .hero-content {
    padding: 116px 14px 260px;
  }

  .hero h1 {
    font-size: clamp(3rem, 16vw, 5.2rem);
    line-height: 0.96;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proof-item {
    min-height: 98px;
    padding: 18px 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full,
  .consent {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal,
  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .motion-title-line-inner {
    animation: none !important;
    transform: none;
    will-change: auto;
  }
}
