/* =====================================================================
   Pulse Landing design system
   Mirrors apps/pulse (dark navy + electric teal, Manrope + Inter) and adds
   the marketing-specific layout, hero, and pulse-line atmosphere.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Surface hierarchy: matches apps/pulse */
  --surface: #0b1326;
  --surface-container-lowest: #060e20;
  --surface-container-low: #131b2e;
  --surface-container: #171f33;
  --surface-container-high: #222a3d;
  --surface-container-highest: #2d3449;
  --surface-bright: #31394d;

  /* Primary: electric teal */
  --primary: #2ddbde;
  --primary-container: #008486;
  --on-primary: #003738;
  --primary-soft: rgba(45, 219, 222, 0.12);
  --primary-line: rgba(45, 219, 222, 0.35);

  /* Secondary */
  --secondary: #a9cdd2;
  --tertiary: #ffb782;

  /* Text */
  --on-surface: #dae2fd;
  --on-surface-muted: #9aa6c4;
  --on-surface-dim: #6b7595;
  --on-surface-bright: #f4f7ff;

  /* Outline */
  --outline: #2c3651;
  --outline-strong: #3e4a6b;

  /* Layout */
  --max-w: 1180px;
  --section-py: clamp(72px, 10vw, 144px);
  --gutter: clamp(20px, 4vw, 48px);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--surface);
  color: var(--on-surface);
  line-height: 1.55;
  overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

::selection { background: var(--primary-soft); color: var(--primary); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--on-surface-bright); }

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

/* --- Typography scale --- */

.font-display {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

h1.hero {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6.5vw, 5.25rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--on-surface-bright);
}

h2.section-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--on-surface-bright);
}

h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
  color: var(--on-surface-bright);
}

p { color: var(--on-surface-muted); }
p.lead { color: var(--on-surface); font-size: 1.15rem; }

/* --- Layout --- */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding-block: var(--section-py); position: relative; }

/* --- Top nav --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 19, 38, 0.72);
  border-bottom: 1px solid var(--outline);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--on-surface-bright);
}
.brand:hover { color: var(--on-surface-bright); }

.brand svg { width: 22px; height: 22px; color: var(--primary); }

nav.topbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav.topbar-links a {
  color: var(--on-surface-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
nav.topbar-links a:hover { color: var(--on-surface-bright); }

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

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

.btn-secondary {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--outline-strong);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--on-surface-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 12px 4px;
}
.btn-ghost:hover { color: var(--on-surface-bright); }

.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Hero --- */

.hero-section {
  padding-block: clamp(96px, 14vw, 180px) clamp(96px, 12vw, 160px);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  position: relative;
  z-index: 2;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hero-copy .eyebrow { margin-bottom: 20px; }
.hero-copy h1.hero { margin-bottom: 28px; }
.hero-copy .accent { color: var(--primary); }
.hero-copy p.lead { max-width: 56ch; margin-bottom: 32px; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-aside {
  /* The pulse-line callout panel */
  padding: 28px;
  border: 1px solid var(--outline);
  background: linear-gradient(180deg, var(--surface-container) 0%, var(--surface-container-low) 100%);
  border-radius: 6px;
  position: relative;
}
.hero-aside h3 { margin-bottom: 14px; }
.hero-aside p { margin-bottom: 20px; font-size: 0.95rem; }
.hero-aside .pulse-line {
  margin: 18px -28px 0;
  height: 56px;
  display: block;
}

/* Atmospheric pulse-line scattered behind hero. Subtle, never loud. */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(45, 219, 222, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 100%, rgba(0, 132, 134, 0.06), transparent 60%);
  mask-image: linear-gradient(180deg, black 30%, transparent 100%);
}
.hero-bg svg {
  position: absolute;
  bottom: 18%;
  left: 0;
  width: 100%;
  opacity: 0.18;
}

/* --- Section: what is Pulse --- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.feature {
  padding: 28px 24px;
  border: 1px solid var(--outline);
  background: var(--surface-container-low);
  border-radius: 6px;
  transition: border-color 180ms ease, background 180ms ease;
}
.feature:hover {
  border-color: var(--primary-line);
  background: var(--surface-container);
}

.feature .icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 18px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 0.95rem; }

/* --- Two-column callouts --- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
}

.split .text { padding-block: 0; }
.split .text .eyebrow { margin-bottom: 14px; }
.split .text h2 { margin-bottom: 18px; }
.split .text p { margin-bottom: 20px; }
.split .text ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.split .text ul li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--on-surface);
  font-size: 0.98rem;
}
.split .text ul li::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232ddbde' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8 7 12 13 4'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

.callout-card {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--outline);
  border-radius: 8px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 219, 222, 0.06), transparent 70%),
    linear-gradient(180deg, var(--surface-container) 0%, var(--surface-container-low) 100%);
  position: relative;
  overflow: hidden;
}
.callout-card.dim {
  background: linear-gradient(180deg, var(--surface-container-low) 0%, var(--surface-container-lowest) 100%);
}

/* --- Provider CTA strip --- */

.provider-cta {
  margin-top: 56px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--primary-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 219, 222, 0.06), rgba(0, 132, 134, 0.04));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
@media (max-width: 760px) {
  .provider-cta { grid-template-columns: 1fr; }
}
.provider-cta h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--on-surface-bright);
  margin-bottom: 6px;
}
.provider-cta p { font-size: 0.95rem; }

/* --- Forms --- */

.form-page {
  padding-block: clamp(72px, 9vw, 120px);
}
.form-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.form-wrap .eyebrow { display: block; margin-bottom: 14px; }
.form-wrap h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--on-surface-bright);
  margin-bottom: 14px;
}
.form-wrap p.lead { margin-bottom: 36px; }

form.opt-in,
form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label.field { display: flex; flex-direction: column; gap: 6px; }
label.field > span.label {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--on-surface);
}
label.field > span.hint {
  font-size: 0.78rem;
  color: var(--on-surface-dim);
}
label.field input,
label.field textarea,
label.field select {
  font: inherit;
  background: var(--surface-container-low);
  color: var(--on-surface-bright);
  border: 1px solid var(--outline);
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
label.field input:focus,
label.field textarea:focus,
label.field select:focus {
  border-color: var(--primary);
  background: var(--surface-container);
}
label.field input::placeholder,
label.field textarea::placeholder {
  color: var(--on-surface-dim);
}
label.field textarea { min-height: 110px; resize: vertical; }

label.checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
label.checkbox:hover { border-color: var(--outline-strong); }
label.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--outline-strong);
  border-radius: 3px;
  background: var(--surface-container-lowest);
  cursor: pointer;
  position: relative;
  margin: 0;
  flex-shrink: 0;
  transition: background 140ms ease, border-color 140ms ease;
}
label.checkbox input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
label.checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23003738' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8 7 12 13 4'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
label.checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.consent-language strong { color: var(--on-surface-bright); }
.consent-language em { color: var(--on-surface); font-style: italic; }

.form-status {
  font-size: 0.9rem;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid;
  display: none;
}
.form-status[data-state="ok"] {
  display: block;
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary-line);
}
.form-status[data-state="error"] {
  display: block;
  color: #ffb4ab;
  background: rgba(255, 180, 171, 0.08);
  border-color: rgba(255, 180, 171, 0.3);
}

/* --- Footer --- */

footer.site-footer {
  border-top: 1px solid var(--outline);
  padding: 48px 0 32px;
  margin-top: 64px;
  color: var(--on-surface-dim);
  font-size: 0.88rem;
}
footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
footer.site-footer h4 {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 14px;
}
footer.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
footer.site-footer ul a {
  color: var(--on-surface-muted);
  font-size: 0.9rem;
}
footer.site-footer ul a:hover { color: var(--on-surface-bright); }
footer.site-footer .legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
}

/* Internal divider above .legal only when there is content above it in the
   footer (e.g. the .footer-grid link columns on the landing page). On pages
   where the footer is just the copyright line, the .site-footer border-top
   is the single separator — no need for a second adjacent border. */
footer.site-footer .footer-grid + .legal {
  border-top: 1px solid var(--outline);
  padding-top: 18px;
}

/* --- Legal pages (privacy / terms) --- */

.legal-page main {
  padding-block: clamp(64px, 8vw, 96px);
}
.legal-page article {
  max-width: 720px;
  margin: 0 auto;
}
.legal-page article h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--on-surface-bright);
}
.legal-page article .meta {
  color: var(--on-surface-dim);
  font-size: 0.88rem;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--outline);
}
.legal-page article h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--on-surface-bright);
}
.legal-page article h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 22px;
  margin-bottom: 10px;
  color: var(--on-surface);
}
.legal-page article p,
.legal-page article li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--on-surface);
  margin-bottom: 12px;
}
.legal-page article ul {
  padding-left: 20px;
  margin-bottom: 16px;
}
.legal-page article ul li { margin-bottom: 8px; }
.legal-page article strong { color: var(--on-surface-bright); font-weight: 600; }

/* --- Small utility --- */

.muted { color: var(--on-surface-muted); }
.bright { color: var(--on-surface-bright); }
.mono { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }

/* --- Animation primitives (cheap, CSS-only) --- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: fade-up 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal-1 { animation-delay: 60ms; }
.reveal-2 { animation-delay: 140ms; }
.reveal-3 { animation-delay: 220ms; }
.reveal-4 { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
