/* RenewFlo — shared styles: tokens, base, header, footer, components.
   Page-specific styles live in the other files in this folder. */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  /* Brand (sampled from the logo) */
  --blue:        #1E5BF5;   /* primary; white text on it passes AA */
  --blue-dark:   #1748C8;   /* hover / pressed */
  --cyan:        #2EB8F5;   /* gradient end + accents on dark; never behind white text */
  --cyan-light:  #8FD6F9;   /* soft accent text on dark */
  --grad:        linear-gradient(135deg, #1E5BF5 0%, #2EB8F5 100%);
  --blue-50:     #EEF3FE;
  --blue-100:    #D8E3FD;

  /* Neutrals */
  --ink:         #15171E;   /* logo near-black: text + dark sections */
  --ink-2:       #222631;   /* raised surfaces on dark */
  --ink-line:    rgba(255,255,255,.10);
  --white:       #FFFFFF;
  --gray-50:     #F7F8FA;
  --gray-100:    #F0F2F5;
  --gray-200:    #E3E6EB;
  --gray-300:    #CDD2DA;
  --gray-400:    #9AA2AF;
  --gray-500:    #6B7280;
  --gray-600:    #4B5363;
  --on-dark:     #E6E8EC;
  --on-dark-2:   #A9AFBB;   /* body text on dark; 7:1+ on --ink */

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --shadow: 0 16px 40px -12px rgba(21,23,30,.14);
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
button { font: inherit; }
strong { font-weight: 700; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--gray-600); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 100px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--ink); background: var(--gray-100); }
.site-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-50); }
.site-nav .btn { margin-left: 10px; color: #fff; white-space: nowrap; }
.site-nav .btn:hover { color: #fff; background: var(--blue-dark); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--gray-200);
  border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--gray-200);
    padding: 12px var(--gutter) 20px; box-shadow: var(--shadow);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
  .site-nav .btn { margin: 8px 0 0; justify-content: center; }
  .brand img { height: 30px; }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-dark-2); padding: 56px 0 32px; }
.footer-top {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding-bottom: 32px; border-bottom: 1px solid var(--ink-line);
}
.footer-brand img { height: 32px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; max-width: 320px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h2 {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark); margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: var(--on-dark-2); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 24px; font-size: 13px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none;
  padding: 13px 24px; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .18s; }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 20px -6px rgba(30,91,245,.55); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-outline { color: var(--gray-600); border-color: var(--gray-200); background: #fff; }
.btn-outline:hover { color: var(--blue); border-color: var(--blue); }
.btn-outline-dark { color: var(--on-dark); border-color: rgba(255,255,255,.22); }
.btn-outline-dark:hover { color: #fff; border-color: var(--cyan); }
.btn-lg { font-size: 17px; padding: 17px 34px; }
.btn-sm { font-size: 14px; padding: 10px 18px; }

/* ── Type helpers ─────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: 6px 14px; border-radius: 100px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.on-dark .eyebrow, .eyebrow.on-dark {
  color: var(--cyan-light); background: rgba(46,184,245,.10); border-color: rgba(46,184,245,.25);
}
.label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
.on-dark .label { color: var(--cyan); }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--blue);
}
.h-display { font-size: clamp(40px, 6.5vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.h-section { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--gray-600); line-height: 1.7; }
.on-dark { color: #fff; }
.on-dark .lead, .lead.on-dark { color: var(--on-dark-2); }

/* ── Layout helpers ───────────────────────────────────────── */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--gray-50); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { margin-bottom: 44px; max-width: 680px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head .lead { margin-top: 14px; }

/* Dark rounded "island" used for page heroes and feature blocks */
.island {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 5vw, 64px);
}
.island::before, .island::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
}
.island::before {
  width: 460px; height: 460px; top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(30,91,245,.38) 0%, transparent 70%);
}
.island::after {
  width: 380px; height: 380px; bottom: -160px; left: -100px;
  background: radial-gradient(circle, rgba(46,184,245,.18) 0%, transparent 70%);
}
.page-hero { padding-top: 32px; }
.page-hero .island h1 { margin: 20px 0 16px; }
.page-hero .island .lead { max-width: 640px; }
.page-hero .island.center { text-align: center; }
.page-hero .island.center .lead { margin-left: auto; margin-right: auto; }

/* Icon tile */
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--blue);
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.solid { background: var(--grad); color: #fff; }
.icon-tile.dark { background: rgba(46,184,245,.14); color: var(--cyan); }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Generic card */
.card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 16px 0 8px; }
.card p { font-size: 15px; color: var(--gray-600); line-height: 1.65; }
a.card:hover, .card.hoverable:hover { border-color: var(--blue-100); box-shadow: var(--shadow); transform: translateY(-3px); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── CTA band (shared closing block) ──────────────────────── */
.cta-band { text-align: center; }
.cta-band h2 { margin: 16px 0 14px; }
.cta-band .lead { max-width: 560px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .cta-actions { flex-direction: column; align-items: stretch; } .cta-actions .btn { justify-content: center; } }

/* ── Reveal-on-scroll (only when JS runs) ─────────────────── */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Home ─────────────────────────────────────────────────── */
.home-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff; text-align: center;
  padding: clamp(72px, 12vw, 140px) 0 clamp(88px, 14vw, 180px);
}
.home-hero::before, .home-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; }
.home-hero::before { width: 620px; height: 620px; top: -220px; right: -160px; background: radial-gradient(circle, rgba(30,91,245,.40) 0%, transparent 70%); }
.home-hero::after { width: 520px; height: 520px; bottom: -240px; left: -140px; background: radial-gradient(circle, rgba(46,184,245,.20) 0%, transparent 70%); }
.home-hero h1 { margin: 26px auto 22px; max-width: 900px; }
.home-hero .lead { max-width: 620px; margin: 0 auto 40px; }
.home-hero .lead strong { color: var(--on-dark); font-weight: 600; }
.home-hero .actions { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.text-link {
  display: inline-flex; align-items: center; gap: 7px; color: var(--on-dark-2);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: color .15s;
}
.text-link svg { width: 15px; height: 15px; transition: transform .15s; }
.text-link:hover { color: #fff; }
.text-link:hover svg { transform: translateX(2px); }

/* ── 404 ──────────────────────────────────────────────────── */
.not-found { padding: 120px 0; text-align: center; }
.not-found h1 { margin: 18px 0 14px; }
.not-found .lead { margin-bottom: 32px; }

/* ── Touch targets on phones ──────────────────────────────── */
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; }
}
