:root {
  --navy: #0F1F3D;
  --accent: #F4B740;
  --white: #FFFFFF;
  --paper: #FAF8F3;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

/* ---------- Brand (mark + wordmark), reused in hero + footer ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .mark {
  width: 40px;
  height: 40px;
}

.wordmark {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 24px 20px 56px;
}

.hero-decoration {
  position: absolute;
  right: -60px;
  bottom: -6px;
  width: 200px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav-signin:hover {
  color: var(--white);
}

/* ---------- Sign-in dropdown (nav + hero secondary CTA share this) ---------- */

.signin-menu {
  position: relative;
}

.signin-trigger {
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.signin-chevron {
  transition: transform 200ms ease;
}

.signin-menu.is-open .signin-chevron {
  transform: rotate(180deg);
}

.signin-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 168px;
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 31, 61, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.signin-menu.is-open .signin-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* The hero secondary CTA sits near the bottom of .hero's clipped box —
   opening downward would get cut off by the hero's overflow: hidden (needed
   for the otter-silhouette background), so this variant opens upward instead. */
.signin-menu--upward .signin-dropdown {
  top: auto;
  bottom: calc(100% + 8px);
}

.signin-option {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.signin-option:hover {
  background: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  .signin-chevron,
  .signin-dropdown {
    transition: none;
  }
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.headline {
  margin: 40px 0 14px;
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-tagline {
  margin: 0 0 28px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.cta:hover {
  background: #ffcb63;
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- SMS thread mockup ---------- */

.sms-mockup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 20px;
}

.sms-mockup__number {
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.msg--in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-bottom-left-radius: 4px;
}

.msg--out {
  align-self: flex-end;
  background: var(--accent);
  color: var(--navy);
  border-bottom-right-radius: 4px;
}

/* ---------- How it works + Features share the same card grid ---------- */

.how-it-works {
  padding: 56px 20px 0;
}

.features {
  padding: 56px 20px;
}

.features-inner,
.steps-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.feature,
.step {
  background: var(--white);
  border: 1px solid rgba(15, 31, 61, 0.1);
  border-radius: 16px;
  padding: 28px 24px;
}

.feature .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9375rem;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  opacity: 0.55;
  margin: 0 0 10px;
}

.feature h3,
.step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.feature p:not(.eyebrow),
.step p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  opacity: 0.75;
}

.feature,
.step {
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.feature:hover,
.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 31, 61, 0.1);
}

/* ---------- Section intros: plain (How it works, Features) and with an otter beside it (Problem, FAQ) ---------- */

.section-header {
  max-width: 960px;
  margin: 0 auto 32px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 32px;
}

.section-intro__otter {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.section-intro h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Problem ---------- */

.problem {
  background: var(--white);
  padding: 56px 20px;
}

.problem-inner {
  max-width: 960px;
  margin: 0 auto;
}

.problem-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.problem-point h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.problem-point p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  opacity: 0.75;
}

/* ---------- FAQ ---------- */

.faq {
  padding: 56px 20px;
}

.faq-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid rgba(15, 31, 61, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 150ms ease-out;
}

.faq-item:hover {
  box-shadow: 0 8px 20px rgba(15, 31, 61, 0.08);
}

.faq-question {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 200ms ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms ease;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer-inner p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.9375rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* ---------- Scroll-in reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.problem-points .reveal:nth-child(2) { transition-delay: 90ms; }
.problem-points .reveal:nth-child(3) { transition-delay: 180ms; }

.steps-inner .reveal:nth-child(2) { transition-delay: 90ms; }
.steps-inner .reveal:nth-child(3) { transition-delay: 180ms; }

.features-inner .reveal:nth-child(2) { transition-delay: 70ms; }
.features-inner .reveal:nth-child(3) { transition-delay: 140ms; }
.features-inner .reveal:nth-child(4) { transition-delay: 210ms; }
.features-inner .reveal:nth-child(5) { transition-delay: 280ms; }
.features-inner .reveal:nth-child(6) { transition-delay: 350ms; }

.faq-inner .reveal:nth-child(2) { transition-delay: 60ms; }
.faq-inner .reveal:nth-child(3) { transition-delay: 120ms; }
.faq-inner .reveal:nth-child(4) { transition-delay: 180ms; }
.faq-inner .reveal:nth-child(5) { transition-delay: 240ms; }
.faq-inner .reveal:nth-child(6) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .faq-answer {
    transition: none;
  }

  .feature:hover,
  .step:hover {
    transform: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 40px 20px;
}

.footer-cta {
  max-width: 760px;
  margin: 0 auto 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-cta p {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-quote {
  max-width: 760px;
  margin: 0 auto 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-inner .mark {
  width: 28px;
  height: 28px;
}

.footer-inner .wordmark {
  font-size: 1.0625rem;
}

.contact {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--accent);
  margin: 0;
}

.contact a {
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

.copyright {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* ---------- Breakpoints ---------- */

@media (min-width: 640px) {
  .hero {
    padding: 32px 32px 72px;
  }

  .hero-decoration {
    width: 320px;
    right: -30px;
    bottom: -10px;
    opacity: 0.1;
  }

  .headline {
    margin: 56px 0 16px;
  }

  .problem {
    padding: 72px 32px;
  }

  .how-it-works {
    padding: 72px 32px 0;
  }

  .features {
    padding: 72px 32px;
  }

  .faq {
    padding: 72px 32px;
  }

  .site-footer {
    padding: 48px 32px;
  }

  .footer-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (min-width: 860px) {
  .features-inner,
  .steps-inner,
  .problem-points {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-inner {
    max-width: 1080px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .hero-copy {
    order: 1;
  }

  .sms-mockup {
    order: 2;
  }
}
