/* =================================================================
   Riemann Tax AI — styles.css
   ================================================================= */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --ink: #0F172A;
  --ink-2: #1F2937;
  --muted: #64748B;
  --line: #E5E9F0;

  --brand: #0F2847;          /* deep navy */
  --brand-2: #14213D;
  --accent: #0EA5A4;         /* teal */
  --accent-2: #3B82F6;       /* electric blue */
  --gold: #F59E0B;
  --warn: #DC2626;

  --grad: linear-gradient(135deg, #3B82F6 0%, #0EA5A4 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(14,165,164,0.10));

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06), 0 1px 1px rgba(15,23,42,0.04);
  --shadow-md: 0 10px 30px -10px rgba(15,23,42,0.15), 0 4px 10px -4px rgba(15,23,42,0.08);
  --shadow-lg: 0 30px 60px -20px rgba(15,23,42,0.25);

  --radius: 14px;
  --radius-lg: 22px;

  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(14,165,164,0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(14,165,164,0.65); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: #cbd5e1; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(15,23,42,0.05);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.nav-logo img { height: 36px; }
.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
  background: linear-gradient(180deg, #FAFBFE 0%, #FFFFFF 100%);
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 40%, transparent 80%);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.glow-a { width: 520px; height: 520px; background: #3B82F6; top: -180px; left: -120px; }
.glow-b { width: 480px; height: 480px; background: #0EA5A4; top: -100px; right: -120px; opacity: 0.3; }

.hero-inner { text-align: center; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid rgba(14,165,164,0.25);
  color: #0F766E;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #0EA5A4;
  box-shadow: 0 0 0 4px rgba(14,165,164,0.18);
}
.hero-title { max-width: 18ch; margin: 0 auto 1.25rem; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 60ch;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero-stats > div {
  text-align: center;
}
.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-stats span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}
@media (max-width: 620px) {
  .hero-stats { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- section base ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-light { background: var(--bg); }
.section-dark {
  background: linear-gradient(180deg, #0B1729 0%, #11243F 100%);
  color: #CBD5E1;
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 3.5rem; }
.section-head-light h2, .section-head-light .lede { color: #fff; }
.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.kicker-light { color: #5EEAD4; }
.lede {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.lede-light { color: #94A3B8; }

/* ---------- problem cards ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem 1.8rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(14,165,164,0.4); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  letter-spacing: 0.1em;
}
.card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 880px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ---------- workflow comparison ---------- */
.workflow-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 980px) {
  .workflow-compare { grid-template-columns: 1fr; }
  .workflow-arrow { transform: rotate(90deg); margin: 0.5rem auto; }
}

/* ---------- workflow carousel ----------
   Three slides cross-fade in place. All slides share one CSS grid cell
   so the stage sizes to the tallest, no fixed height, no layout jump.
   Inactive slides drop pointer events + visibility so keyboard focus
   can't land on the hidden ones. */
.workflow-carousel { position: relative; }
.carousel-stage { display: grid; }
.carousel-slide {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  /* Delay visibility flip to the end of the fade so the leaving slide
     stays interactable until the new one is fully in. */
  transition: opacity 400ms ease, visibility 0s linear 400ms;
}
.carousel-slide-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 400ms ease, visibility 0s linear 0s;
}
.carousel-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148,163,184,0.18);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}
.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(148,163,184,0.35);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.carousel-dot:hover { background: rgba(148,163,184,0.6); }
.carousel-dot:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}
.carousel-dot-active {
  background: linear-gradient(135deg, #3B82F6 0%, #0EA5A4 100%);
  transform: scale(1.25);
}
@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: opacity 0s, visibility 0s; }
}

.workflow-col {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
}
.workflow-current { background: rgba(220,38,38,0.06); border-color: rgba(220,38,38,0.25); }
.workflow-ai { background: rgba(14,165,164,0.08); border-color: rgba(14,165,164,0.35); }

.workflow-col-head { margin-bottom: 1.5rem; }
.workflow-col-head h3 { font-size: 1.4rem; margin: 0.6rem 0 0.4rem; }
.workflow-col-head p { color: #94A3B8; font-size: 0.95rem; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag-muted { background: rgba(220,38,38,0.15); color: #FCA5A5; }
.tag-accent { background: rgba(14,165,164,0.18); color: #5EEAD4; }

.workflow-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.workflow-steps li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(148,163,184,0.12);
}
.workflow-steps li:first-child { border-top: 0; }
.workflow-steps h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.workflow-steps p { color: #94A3B8; font-size: 0.9rem; }

.step-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(220,38,38,0.12);
  display: grid;
  place-items: center;
  color: #FCA5A5;
}
.step-icon-ai {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(14,165,164,0.5);
}
.step-icon svg { width: 22px; height: 22px; }

.workflow-arrow {
  display: grid;
  place-items: center;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  padding: 1.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.feature:hover { transform: translateY(-2px); background: #fff; box-shadow: var(--shadow-md); }
.feature h3 { margin: 1rem 0 0.4rem; font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }
.feature-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(14,165,164,0.65);
}
.feature-ic svg { width: 22px; height: 22px; }

/* ---------- impact / stats ---------- */
.section-stats {
  background:
    radial-gradient(ellipse 60% 70% at 80% 0%, rgba(59,130,246,0.18), transparent 70%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(14,165,164,0.18), transparent 70%),
    linear-gradient(180deg, #0F172A 0%, #14213D 100%);
  color: #CBD5E1;
}
.section-stats h2 { color: #fff; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 880px) { .stats-grid { grid-template-columns: 1fr; } }
.stat {
  padding: 2rem 1.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
  background: linear-gradient(135deg, #93C5FD 0%, #5EEAD4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
}
.stat h3 { color: #fff; margin-bottom: 0.4rem; }
.stat p { color: #94A3B8; font-size: 0.95rem; }

/* ---------- testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 980px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.testimonial:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(14,165,164,0.35); }
.testimonial::before {
  content: '“';
  position: absolute;
  top: 0.4rem;
  right: 1.25rem;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: rgba(14,165,164,0.15);
  pointer-events: none;
}
.testimonial blockquote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.testimonial figcaption strong { display: block; color: var(--ink); font-size: 0.95rem; }
.testimonial figcaption span { color: var(--muted); font-size: 0.82rem; }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ---------- CTA ---------- */
.section-cta {
  background: linear-gradient(135deg, #0F2847 0%, #14213D 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 20% 20%, rgba(59,130,246,0.35), transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 80%, rgba(14,165,164,0.35), transparent 60%);
  pointer-events: none;
}
.cta-inner { position: relative; text-align: center; max-width: 720px; }
.cta-inner h2 { color: #fff; margin-bottom: 1rem; }
.cta-inner p { color: #CBD5E1; font-size: 1.1rem; margin-bottom: 2rem; }
.cta-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.section-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.25); }
.section-cta .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

/* ---------- footer ---------- */
.footer {
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand img { height: 32px; margin-bottom: 0.4rem; }
.footer-brand p { color: var(--muted); font-size: 0.88rem; }
.footer-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
