/* ================================================================
   CALRIVO — GLOBAL STYLESHEET
   Deep navy #09172B  ·  Amber accent #E07B2E
   Sora (headings) · Inter (body)
   ================================================================ */

/* --- Variables -------------------------------------------------- */
:root {
  --navy:         #09172B;
  --navy-2:       #0E2040;
  --navy-3:       #193057;
  --accent:       #E07B2E;
  --accent-h:     #C96A1E;
  --accent-glow:  rgba(224, 123, 46, 0.12);
  --white:        #FFFFFF;
  --off-white:    #F8F7F5;
  --gray-50:      #F8FAFC;
  --gray-100:     #F1F5F9;
  --gray-200:     #E2E8F0;
  --gray-400:     #94A3B8;
  --gray-600:     #475569;
  --gray-800:     #1E293B;
  --text:         #0D1F35;
  --text-muted:   #536070;
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 20px 48px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t:            0.22s;
  --max-w:        1100px;
  --header-h:     72px;
}

/* --- Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Typography ------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: 'Sora', sans-serif;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.125rem; font-weight: 600; }

p { color: var(--text-muted); }

.section-label {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* --- Layout ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
}

section { padding: 6rem 0; }

/* --- Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 14px rgba(224,123,46,0.38);
}
.btn-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 22px rgba(224,123,46,0.48);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.45);
  color: var(--white);
}

.btn-outline {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* --- Header ----------------------------------------------------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.header.scrolled {
  background: rgba(9, 23, 43, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--white);
  letter-spacing: -0.035em;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

/* --- Hamburger -------------------------------------------------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--t) var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile nav ------------------------------------------------- */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(9, 23, 43, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.25rem 1.5rem 1.75rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
}
.mobile-nav a:hover { color: white; background: rgba(255,255,255,0.07); }
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* --- Hero ------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
}

/* Dot grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.065) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Warm glow */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -8%;
  width: 720px;
  height: 720px;
  background: radial-gradient(ellipse, rgba(224,123,46,0.11) 0%, transparent 65%);
  pointer-events: none;
}

/* Bottom fade into next section */
.hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--off-white));
  pointer-events: none;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: dot-pulse 2.2s ease infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.4rem;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.58);
  max-width: 540px;
  margin-bottom: 2.25rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.32);
  margin-top: 1.1rem;
  letter-spacing: 0.01em;
}

/* Hero entrance animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-badge   { animation: fadeInUp 0.55s var(--ease) 0.10s both; }
.hero h1      { animation: fadeInUp 0.60s var(--ease) 0.20s both; }
.hero-sub     { animation: fadeInUp 0.60s var(--ease) 0.33s both; }
.hero-actions { animation: fadeInUp 0.60s var(--ease) 0.44s both; }
.hero-note    { animation: fadeInUp 0.60s var(--ease) 0.54s both; }

/* --- Section header -------------------------------------------- */
.section-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 4rem;
}
.section-header h2 { margin-bottom: 0.9rem; }
.section-header p  { font-size: 1.0625rem; }

/* --- Benefits --------------------------------------------------- */
.benefits { background: var(--off-white); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: all 0.28s var(--ease);
  position: relative;
  overflow: hidden;
}

.benefit-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #F5A45A);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.benefit-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.benefit-card:hover::after { transform: scaleX(1); }

.benefit-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  color: var(--accent);
  transition: background var(--t);
}

.benefit-card:hover .benefit-icon { background: rgba(224,123,46,0.18); }

.benefit-card h3 { margin-bottom: 0.65rem; color: var(--text); }
.benefit-card p  { font-size: 0.9375rem; line-height: 1.68; }

/* --- How it works ---------------------------------------------- */
.how-it-works { background: var(--white); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  margin-top: 0.5rem;
}

/* Connector line */
.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(16.67% + 28px);
  right: calc(16.67% + 28px);
  height: 1px;
  background: linear-gradient(90deg, var(--gray-200) 0%, rgba(224,123,46,0.45) 50%, var(--gray-200) 100%);
  pointer-events: none;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  transition: background var(--t) var(--ease);
}
.step:hover { background: var(--gray-50); }

.step-num {
  width: 64px;
  height: 64px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
  box-shadow: 0 0 0 6px rgba(9,23,43,0.06);
}

.step:hover .step-num {
  background: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 0 6px var(--accent-glow);
}

.step h3 { margin-bottom: 0.55rem; color: var(--text); }
.step p  { font-size: 0.9375rem; max-width: 220px; margin: 0 auto; line-height: 1.65; }

/* --- Stats band ------------------------------------------------- */
.stats { background: var(--navy); padding: 5.5rem 0; }

.stats-headline {
  text-align: center;
  color: rgba(255,255,255,0.42);
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}

.stat {
  background: var(--navy-2);
  padding: 2.75rem 2rem;
  text-align: center;
  transition: background var(--t) var(--ease);
}
.stat:hover { background: var(--navy-3); }

.stat-number {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  max-width: 200px;
  margin: 0 auto;
}

.stats-note {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  margin-top: 2rem;
}

/* --- Contact ---------------------------------------------------- */
.contact { background: var(--off-white); text-align: center; }

.contact-box { max-width: 580px; margin: 0 auto; }
.contact h2  { margin-bottom: 0.9rem; }
.contact > .contact-box > p { font-size: 1.0625rem; margin-bottom: 2.25rem; }

.contact-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gray-400);
  font-size: 0.8125rem;
}
.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--t) var(--ease);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}
.contact-email:hover {
  color: var(--accent-h);
  text-decoration-color: var(--accent-h);
}

/* --- Footer ----------------------------------------------------- */
.footer {
  background: var(--navy);
  padding: 2.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: -0.035em;
}

.footer-logo .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--t) var(--ease);
}
.footer-links a:hover { color: rgba(255,255,255,0.8); }

/* --- Scroll animations ----------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for direct children */
.stagger > *:nth-child(1).fade-up { transition-delay: 0.06s; }
.stagger > *:nth-child(2).fade-up { transition-delay: 0.13s; }
.stagger > *:nth-child(3).fade-up { transition-delay: 0.20s; }

/* --- Legal pages ------------------------------------------------ */
.legal-hero {
  background: var(--navy);
  padding: calc(var(--header-h) + 3.5rem) 0 4rem;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.legal-hero .container { position: relative; z-index: 1; }
.legal-hero h1 { color: var(--white); font-size: clamp(1.75rem, 4vw, 2.6rem); }
.legal-hero p  { color: rgba(255,255,255,0.45); margin-top: 0.5rem; }

.legal-content { padding: 4.5rem 0 6rem; }
.legal-content .container { max-width: 720px; }

.legal-content h2 {
  font-size: 1.1875rem;
  color: var(--text);
  margin: 2.5rem 0 0.7rem;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.015em;
}
.legal-content h2:first-child { margin-top: 0; }

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.72;
}

.legal-content ul {
  list-style: disc;
  margin: 0 0 1rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.72;
}

.legal-content li { margin-bottom: 0.3rem; }

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  transition: color var(--t) var(--ease);
  margin-bottom: 1.75rem;
}
.back-link:hover { color: white; }
.back-link svg { flex-shrink: 0; }

/* --- Responsive ------------------------------------------------- */
@media (max-width: 920px) {
  .nav           { display: none; }
  .nav-actions   { display: none; }
  .hamburger     { display: flex; }

  .benefits-grid { grid-template-columns: 1fr; }
  .steps         { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .stats-grid    { grid-template-columns: 1fr; }

  .step { text-align: left; display: flex; align-items: flex-start; gap: 1.25rem; padding: 1.25rem; }
  .step-num { margin: 0; flex-shrink: 0; width: 52px; height: 52px; font-size: 1.1rem; }
  .step-text { text-align: left; }
  .step p { max-width: none; margin: 0; }

  .footer .container { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

@media (max-width: 600px) {
  :root { --max-w: 100%; }
  .container { padding: 0 1.25rem; }
  section { padding: 4.5rem 0; }

  .hero .container { padding-top: 3rem; padding-bottom: 4rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .benefit-card { padding: 1.75rem 1.5rem; }
  .contact-box .btn { width: 100%; justify-content: center; }
}
