/* Laddr landing page
   Breakpoints follow the Figma frames: mobile 375, tablet 760, desktop 1440. */

:root {
  --navy: #101828;
  --navy-2: #1d2939;
  --red: #c52126;
  --red-dark: #9b1a1e;
  --pink: #fcdcdf;
  --pink-bg: #fdf2f4;
  --page-tint: #fffafb;
  --text: #101828;
  --muted: #667085;
  --border: #eaecf0;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --radius-pill: 999px;
  --radius-card: 20px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-soft: 0 4px 16px rgba(16, 24, 40, 0.06);
  --container: 1200px;
  --gutter: 16px;
  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

p {
  margin: 0;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

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

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-social {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  min-width: 260px;
}

.btn-social:hover {
  border-color: #d0d5dd;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  max-width: 1440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
}

.brand img {
  width: 120px;
  height: auto;
}

.site-nav {
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 16px;
}

.site-nav a:hover {
  color: var(--text);
}

.site-header .btn {
  min-height: 44px;
  padding: 10px 20px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--page-tint) 0%, #fff 55%, var(--pink-bg) 100%);
  text-align: center;
  padding-top: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.hero-badge img {
  width: 36px;
  height: 36px;
}

.hero h1 {
  margin: 20px auto 0;
  max-width: 1100px;
  font-size: 34px;
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}

.hero .btn {
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  margin: 48px auto 0;
  max-width: 980px;
}

.hero-visual img {
  width: 100%;
}

.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  display: none;
}

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
}

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

.section-head h2 {
  font-size: 30px;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
}

.section-head .btn {
  margin-top: 24px;
}

/* Problem / solution cards */

.card-grid {
  margin-top: 40px;
  display: grid;
  gap: 20px;
}

.story-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.story-card img {
  width: 100%;
  aspect-ratio: 1180 / 952;
  object-fit: cover;
}

.story-card-body {
  padding: 24px;
}

.story-card h3 {
  font-size: 24px;
  font-weight: 600;
}

.story-card p {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.6;
}

/* Benefits */

.benefit-list {
  margin-top: 40px;
  display: grid;
  gap: 56px;
}

.benefit {
  display: grid;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.benefit-media {
  order: -1;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--pink-bg);
}

.benefit-media img {
  width: 100%;
  aspect-ratio: 1180 / 952;
  object-fit: cover;
}

.benefit h3 {
  font-size: 26px;
  font-weight: 600;
}

.benefit p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

.benefit .btn {
  margin-top: 24px;
}

/* Download / early access */

.cta-panel {
  background: var(--navy);
  color: #fff;
  border-radius: 24px;
  padding: 40px 24px 0;
  display: grid;
  gap: 32px;
  overflow: hidden;
  text-align: center;
}

.cta-panel h2 {
  font-size: 28px;
  font-weight: 600;
}

.cta-panel p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.cta-panel .btn {
  margin-top: 28px;
}

.coming-soon {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.coming-soon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cta-panel-visual {
  align-self: end;
  max-width: 420px;
  margin: 0 auto;
}

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

.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 64px;
}

.site-footer .container {
  display: grid;
  gap: 32px;
}

.footer-brand img {
  width: 150px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  max-width: 320px;
}

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

.footer-col--wide {
  grid-column: 1 / -1;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  text-decoration: none;
  font-size: 15px;
  word-break: break-word;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Waitlist + thank-you ---------- */

.page-tint {
  background: linear-gradient(180deg, #fff 0%, var(--page-tint) 60%, var(--pink-bg) 100%);
  min-height: calc(100vh - 73px);
}

.form-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 0 64px;
  text-align: center;
}

.form-wrap .hero-badge {
  font-size: 18px;
}

.form-wrap .hero-badge img {
  width: 28px;
  height: 28px;
}

.form-wrap h1 {
  margin-top: 12px;
  font-size: 26px;
}

.form-wrap > p {
  margin-top: 8px;
  color: var(--muted);
}

.waitlist-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
  text-align: left;
}

.field label,
.field legend {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0;
}

.req {
  color: var(--red);
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.1);
}

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

fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.role-option input:checked + span {
  border-color: var(--red);
  color: var(--red);
  background: #fff7f7;
}

.role-option input:focus-visible + span {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}

.consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
  flex-shrink: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--red);
}

.form-status {
  font-size: 14px;
  text-align: center;
  color: var(--red);
  min-height: 1em;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.thanks {
  text-align: center;
  padding: 56px 0 72px;
}

.thanks img {
  width: 260px;
  margin: 0 auto;
}

.thanks h1 {
  margin-top: 20px;
  font-size: 30px;
}

.thanks p {
  margin: 14px auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.social-buttons {
  margin-top: 32px;
  display: grid;
  gap: 14px;
  justify-content: center;
}

.social-buttons svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---------- Legal / support pages ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 24px;
}

.prose h1 {
  font-size: 32px;
}

.prose .updated {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.draft-note {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fffaeb;
  border: 1px solid #fedf89;
  color: #93370d;
  font-size: 14px;
}

.prose h2 {
  margin-top: 36px;
  font-size: 22px;
  font-weight: 600;
}

.prose p,
.prose li {
  margin-top: 12px;
  color: #344054;
}

.prose ul {
  padding-left: 22px;
  margin: 0;
}

.prose a {
  color: var(--red-dark);
}

/* ---------- Tablet (760) ---------- */

@media (min-width: 760px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    padding-top: 72px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-sub {
    font-size: 18px;
  }

  .deco {
    display: block;
  }

  .section {
    padding: 88px 0;
  }

  .section-head h2 {
    font-size: 44px;
  }

  .section-head p {
    font-size: 18px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .story-card-body {
    padding: 28px 28px 36px;
  }

  .benefit {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    text-align: left;
  }

  .benefit .benefit-media {
    order: 0;
  }

  .benefit:nth-child(even) .benefit-media {
    order: -1;
  }

  .cta-panel {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
    padding: 48px 48px 0;
    align-items: center;
  }

  .cta-panel-copy {
    padding-bottom: 48px;
  }

  .cta-panel h2 {
    font-size: 34px;
  }

  .site-footer .container {
    grid-template-columns: 1fr 2fr;
  }

  .footer-col--wide {
    grid-column: auto;
  }

  .footer-cols {
    grid-template-columns: auto auto auto auto;
    justify-content: space-between;
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }

  .social-buttons {
    grid-auto-flow: column;
  }

  .thanks h1 {
    font-size: 44px;
  }

  .form-wrap h1 {
    font-size: 30px;
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }

  .hero h1 {
    font-size: 68px;
  }

  .benefit h3 {
    font-size: 30px;
  }

  .thanks h1 {
    font-size: 56px;
  }

  .thanks img {
    width: 320px;
  }
}

/* ---------- Motion ----------
   Everything below only runs when the user hasn't asked for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  @keyframes fade-up {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(80px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .hero-badge,
  .hero h1,
  .hero-sub,
  .hero .btn {
    animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero h1 {
    animation-delay: 0.08s;
  }

  .hero-sub {
    animation-delay: 0.16s;
  }

  .hero .btn {
    animation-delay: 0.24s;
  }

  .hero-visual {
    animation: rise-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
  }

  /* Floating hero decorations */
  @keyframes float {
    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-12px) rotate(4deg);
    }
  }

  .deco {
    animation: float 6s ease-in-out infinite;
  }

  .deco:nth-of-type(2) {
    animation-duration: 7s;
    animation-delay: -2s;
  }

  .deco:nth-of-type(3) {
    animation-duration: 5.5s;
    animation-delay: -1s;
  }

  .deco:nth-of-type(4) {
    animation-duration: 6.5s;
    animation-delay: -3s;
  }

  /* Scroll reveal (classes added by main.js) */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

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

  /* Hover */
  .btn-primary:hover,
  .btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.18);
  }

  .story-card,
  .benefit-media {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.7s ease;
  }

  .story-card.is-visible:hover,
  .benefit-media.is-visible:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(16, 24, 40, 0.1);
  }

  .story-card img,
  .benefit-media img {
    transition: transform 0.5s ease;
  }

  .story-card:hover img,
  .benefit-media:hover img {
    transform: scale(1.03);
  }

  /* CTA phones bob gently */
  .cta-panel-visual img {
    animation: float 7s ease-in-out infinite;
  }

  /* Thank-you page: fox pops in, then waves */
  @keyframes pop-in {
    0% {
      opacity: 0;
      transform: scale(0.6);
    }
    70% {
      opacity: 1;
      transform: scale(1.06);
    }
    100% {
      transform: scale(1);
    }
  }

  @keyframes wave {
    0%,
    100% {
      transform: rotate(0deg);
    }
    25% {
      transform: rotate(-4deg);
    }
    75% {
      transform: rotate(4deg);
    }
  }

  .thanks img {
    animation: pop-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1.3) both, wave 2.4s ease-in-out 0.8s infinite;
    transform-origin: 50% 90%;
  }

  .thanks h1,
  .thanks p,
  .thanks .social-buttons {
    animation: fade-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .thanks h1 {
    animation-delay: 0.25s;
  }

  .thanks p {
    animation-delay: 0.35s;
  }

  .thanks .social-buttons {
    animation-delay: 0.45s;
  }

  /* Waitlist page */
  .form-wrap {
    animation: fade-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

/* ---------- Extra motion: word reveal, 3D hero phones, card tilt, confetti ---------- */

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

@media (prefers-reduced-motion: no-preference) {
  /* Headline words pop up one by one (spans added by main.js) */
  @keyframes word-up {
    from {
      opacity: 0;
      transform: translateY(0.6em) rotate(3deg);
      filter: blur(6px);
    }
    to {
      opacity: 1;
      transform: none;
      filter: blur(0);
    }
  }

  .hero h1.is-split {
    animation: none;
  }

  .hero h1 .word {
    display: inline-block;
    animation: word-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.1s + var(--i) * 0.07s);
  }


  /* Phones start tilted back and stand up as you scroll (transform set by main.js) */
  .hero-visual {
    perspective: 1400px;
  }

  .hero-visual img {
    transform-origin: 50% 100%;
    will-change: transform;
  }

  /* Card tilt follows the pointer (desktop only) */
  .tilt {
    transform-style: preserve-3d;
  }

  .tilt.is-tilting {
    transition: transform 0.08s linear, box-shadow 0.3s ease;
  }
}
