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

/* ── Design tokens ── */
:root {
  --bg:           #f8f3e8;
  --bg-alt:       #f1ece0;
  --paper:        rgba(255, 252, 245, 0.82);
  --paper-strong: rgba(255, 252, 245, 0.96);

  --ink:     #1c140c;
  --text:    #5d5044;
  --muted:   #9a8d7e;
  --eyebrow: #8f4b34;

  --accent:        #d95763;
  --accent-hover:  #c44855;
  --accent-soft:   rgba(217, 87, 99, 0.09);
  --accent-border: rgba(217, 87, 99, 0.28);
  --accent-glow:   rgba(217, 87, 99, 0.18);

  --border:        rgba(59, 46, 36, 0.10);
  --border-strong: rgba(59, 46, 36, 0.18);

  --shadow-sm: 0 2px 12px rgba(74, 54, 34, 0.07);
  --shadow:    0 16px 48px rgba(74, 54, 34, 0.12);
  --shadow-lg: 0 32px 80px rgba(74, 54, 34, 0.16);

  --radius-btn:  14px;
  --radius-card: 24px;

  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-head: "Space Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #13161b;
    --bg-alt:       #0d1014;
    --paper:        rgba(20, 25, 33, 0.80);
    --paper-strong: rgba(20, 25, 33, 0.96);

    --ink:     #f0f4f8;
    --text:    #8fa0b4;
    --muted:   #566476;
    --eyebrow: #f4a261;

    --accent:        #f4a261;
    --accent-hover:  #e8924d;
    --accent-soft:   rgba(244, 162, 97, 0.10);
    --accent-border: rgba(244, 162, 97, 0.28);
    --accent-glow:   rgba(244, 162, 97, 0.15);

    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.30);
    --shadow:    0 16px 48px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.50);
  }
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fixed background with brand glows */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at  0%  0%, rgba(217,  87, 99, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 100%  5%, rgba( 15, 118,110, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at  50% 100%, rgba(217, 87, 99, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Grain overlay for depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.032;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

body > * { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Section header ── */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-title {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 14px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-btn);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.15s, border-color 0.15s, color 0.15s;
  letter-spacing: -0.01em;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 32px var(--accent-glow);
}

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0d1014; }
}

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-nav {
  background: var(--paper-strong);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 18px;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-nav:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: rgba(248, 243, 232, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(19, 22, 27, 0.80);
  }
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-logo:hover { color: var(--accent); }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 110px 28px 96px;
  text-align: center;
  overflow: hidden;
}

/* Subtle dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, var(--border-strong) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 30px;

  animation: fadeUp 0.7s var(--ease) 0.05s both;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.hero-headline {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--ink);
  margin-bottom: 28px;
  animation: fadeUp 0.7s var(--ease) 0.15s both;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeUp 0.7s var(--ease) 0.25s both;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  animation: fadeUp 0.7s var(--ease) 0.35s both;
}

.hero-trust {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  animation: fadeUp 0.7s var(--ease) 0.45s both;
}

.hero-how-link {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  animation: fadeUp 0.7s var(--ease) 0.55s both;
}
.hero-how-link:hover { color: var(--accent); }

/* ── Features ── */
.features {
  padding: 96px 0 104px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 26px 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;

  opacity: 0;
  transform: translateY(18px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent-border);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
  flex-shrink: 0;
}

.feature-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.65;
}

/* ── How it works ── */
.how {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(217, 87, 99, 0.03) 0%, transparent 50%, rgba(15, 118, 110, 0.03) 100%);
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .how-steps {
    grid-template-columns: 1fr 56px 1fr 56px 1fr;
    align-items: center;
  }
}

.how-step {
  text-align: center;
  padding: 28px 24px 32px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.how-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.how-step:nth-child(3).visible { transition-delay: 0.1s; }
.how-step:nth-child(5).visible { transition-delay: 0.2s; }

.how-num {
  font-family: var(--font-head);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.25;
  margin-bottom: 18px;
  display: block;
}

.how-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.how-desc {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.65;
  max-width: 220px;
  margin: 0 auto;
}

/* Connector: vertical on mobile, horizontal on desktop */
.how-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.how-connector::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  opacity: 0.22;
}

@media (min-width: 720px) {
  .how-connector::before {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  }
}

/* ── Demo ── */
.demo {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.demo-frame {
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--paper);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.demo-frame.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── CTA ── */
.cta-section {
  position: relative;
  padding: 120px 0 130px;
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.cta-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-headline {
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--ink);
  margin: 14px 0 18px;
}

.cta-sub {
  font-size: 17px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 36px;
}

.cta-contact {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.cta-contact-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
  transition: opacity 0.15s;
}
.cta-contact-link:hover { opacity: 0.8; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--accent); }

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
  }

  .feature-card,
  .how-step,
  .cta-inner {
    opacity: 1;
    transform: none;
  }
}

/* ── Mobile refinements ── */
@media (max-width: 480px) {
  .hero { padding: 80px 20px 72px; }
  .how-step { padding: 20px 16px 24px; }
  .feature-card { padding: 22px 20px 24px; }
  .cta-section { padding: 88px 0 96px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
}
