/* ============================================================
   CALCLY — PREMIUM DESIGN SYSTEM v2
   Engineered for trust, clarity, and conversion.
   Font: Inter (loaded below). Palette: Stone + Emerald.
   Class names preserved for backward compatibility (175 pages).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens: Light (default) ---------- */
:root,
[data-theme="light"] {
  /* Surfaces — warm stone, not flat white */
  --bg: #fafaf9;
  --bg-subtle: #f5f5f4;
  --bg-muted: #e7e5e4;
  --surface: #ffffff;
  --surface-2: #fafaf9;

  /* Borders — soft, layered */
  --border: #e7e5e4;
  --border-strong: #d6d3d1;

  /* Text — deep stone, not pure black */
  --text: #0c0a09;
  --text-muted: #57534e;
  --text-subtle: #a8a29e;

  /* Brand: Emerald (money, growth) */
  --accent: #0891b2;
  --accent-hover: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.10);
  --accent-glow: rgba(8, 145, 178, 0.20);
  --accent-contrast: #ffffff;
  --accent-grad: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%);

  --gold: #d97706;
  --gold-soft: rgba(217, 119, 6, 0.10);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;

  --ring: rgba(8, 145, 178, 0.35);

  /* Shadows — soft, multi-layered for realistic depth */
  --shadow-xs: 0 1px 2px rgba(12, 10, 9, 0.04);
  --shadow-sm: 0 1px 3px rgba(12, 10, 9, 0.06), 0 1px 2px rgba(12, 10, 9, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(12, 10, 9, 0.06), 0 2px 4px -2px rgba(12, 10, 9, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(12, 10, 9, 0.08), 0 8px 10px -6px rgba(12, 10, 9, 0.05);
  --shadow-xl: 0 20px 40px -12px rgba(12, 10, 9, 0.12), 0 10px 20px -8px rgba(12, 10, 9, 0.06);
  --shadow-glow: 0 0 24px -4px var(--accent-glow);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  color-scheme: light;
}

/* ---------- Tokens: Dark ---------- */
[data-theme="dark"] {
  --bg: #0c0a09;
  --bg-subtle: #1c1917;
  --bg-muted: #292524;
  --surface: #18181b;
  --surface-2: #1f1f23;

  --border: #2d2d32;
  --border-strong: #3f3f46;

  --text: #fafaf9;
  --text-muted: #a8a29e;
  --text-subtle: #78716c;

  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.20);
  --accent-contrast: #0c0a09;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);

  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.12);
  --success: #4ade80;
  --danger: #f87171;
  --warning: #fbbf24;
  --ring: rgba(34, 211, 238, 0.40);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 32px -4px var(--accent-glow);

  color-scheme: dark;
}

/* ---------- Base Typography ---------- */
body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, var(--border) 0.8px, transparent 0);
  background-size: 28px 28px;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  letter-spacing: -0.011em;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-feature-settings: normal;
  letter-spacing: 0;
}

::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 2rem; }
.row { display: flex; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { display: flex; align-items: center; justify-content: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .625rem; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.035em; transition: opacity .15s; }
.brand:hover { opacity: 0.85; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--accent-grad);
  display: grid; place-items: center; color: var(--accent-contrast);
  font-size: 16px; font-weight: 800; letter-spacing: 0;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.25);
}
.nav-links { display: flex; align-items: center; gap: .375rem; }
.nav-link {
  padding: .5rem .85rem; border-radius: var(--radius-sm); font-size: .875rem;
  font-weight: 500; color: var(--text-muted); transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); display: grid; place-items: center;
  color: var(--text-muted); border: 1px solid var(--border); background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-subtle); }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 48px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.04em;
  font-weight: 800; margin-top: 1.25rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 140%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 1.25rem auto 0; }

/* ---------- Tool grid (index) ---------- */
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px;
  padding: 16px 0 72px;
}
.tool-card {
  position: relative; display: block; padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs);
  transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1), border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent-grad); opacity: 0; transition: opacity .25s;
}
.tool-card:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow-lg);
}
.tool-card:hover::before { opacity: 1; }
.tool-card .tc-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
  transition: transform .2s, background .2s;
}
.tool-card:hover .tc-icon { transform: scale(1.08) rotate(-2deg); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tool-card h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.02em; }
.tool-card p { font-size: .875rem; color: var(--text-muted); margin-top: .4rem; line-height: 1.55; }
.tool-card .tc-tags { display: flex; gap: .4rem; margin-top: 16px; flex-wrap: wrap; }
.tag {
  font-size: .68rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-subtle); padding: .225rem .55rem; border-radius: 6px; border: 1px solid var(--border);
  text-transform: lowercase; letter-spacing: .01em;
}

/* ---------- Page header (tool pages) ---------- */
.tool-header { padding: 48px 0 12px; }
.tool-header .crumbs { font-size: .8rem; color: var(--text-subtle); font-weight: 500; }
.tool-header .crumbs a { transition: color .15s; }
.tool-header .crumbs a:hover { color: var(--accent); }
.tool-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -0.035em; font-weight: 800; margin-top: .6rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 130%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tool-header p { color: var(--text-muted); margin-top: .6rem; max-width: 640px; font-size: 1.05rem; }

/* ---------- Cards / Panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-header h2, .card-header h3 { font-size: .95rem; font-weight: 700; letter-spacing: -0.02em; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }

/* ---------- Tool layout ---------- */
.split {
  display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: 24px; align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Result display ---------- */
.result-big {
  font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1;
}
.result-label { font-size: .75rem; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: .5rem; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.result-row:last-child { border-bottom: none; }
.result-row .rl-label { font-size: .875rem; color: var(--text-muted); }
.result-row .rl-value { font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.result-row.highlight { background: var(--accent-soft); border-radius: var(--radius-sm); padding: .75rem 1rem; margin: .35rem 0; border-bottom: none; }
.result-row.highlight .rl-value { font-size: 1.15rem; color: var(--accent); font-weight: 700; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.125rem; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: .825rem; font-weight: 600; color: var(--text); margin-bottom: .45rem; letter-spacing: -0.005em; }
.label .hint { font-weight: 400; color: var(--text-subtle); }
.input, .textarea, .select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .65rem .85rem; font-size: .9rem; color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); background: var(--surface);
}
.textarea { resize: vertical; min-height: 120px; font-family: inherit; line-height: 1.5; font-variant-numeric: normal; }
.input.mono, .textarea.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.25rem; }

/* currency input prefix */
.input-group { display: flex; align-items: stretch; }
.input-group .prefix { padding: .65rem .6rem .65rem .85rem; background: var(--bg-subtle); border: 1px solid var(--border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-subtle); font-size: .9rem; font-weight: 600; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* range */
input[type="range"] { width: 100%; accent-color: var(--accent); height: 24px; }
.range-row { display: flex; align-items: center; gap: .75rem; }
.range-val { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .8rem; color: var(--text-muted); min-width: 42px; text-align: right; }

/* checkbox */
.check { display: flex; align-items: center; gap: .55rem; font-size: .875rem; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* segment control */
.segments { display: inline-flex; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.segments button { padding: .4rem .85rem; font-size: .8rem; font-weight: 500; border-radius: 7px; color: var(--text-muted); transition: background .15s, color .15s, box-shadow .15s; }
.segments button:hover { color: var(--text); }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.15rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); letter-spacing: -0.005em;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: var(--accent-contrast); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%); border-color: transparent; box-shadow: var(--shadow-md), var(--shadow-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Chart (canvas-based, anti-snippet) ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap canvas { width: 100% !important; height: auto !important; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; font-size: .8rem; }
.chart-legend .leg { display: flex; align-items: center; gap: .4rem; color: var(--text-muted); }
.chart-legend .leg .dot { width: 12px; height: 12px; border-radius: 4px; }

/* ---------- Amortization table ---------- */
.amort-table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.amort-table th { text-align: right; padding: .55rem .65rem; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--text-subtle); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.amort-table th:first-child { text-align: left; }
.amort-table td { text-align: right; padding: .5rem .65rem; border-bottom: 1px solid var(--border); }
.amort-table td:first-child { text-align: left; font-weight: 600; }
.amort-table tbody tr:hover { background: var(--bg-subtle); }
.table-scroll { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--text); color: var(--bg);
  padding: .7rem 1.15rem; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500;
  box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: .5rem;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 96px; padding: 36px 0; color: var(--text-subtle); font-size: .85rem; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ---------- SEO copy ---------- */
.seo-copy { max-width: 780px; padding-bottom: 56px; }
.seo-copy h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 2.5rem; margin-bottom: .6rem; }
.seo-copy h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 1.75rem; margin-bottom: .5rem; }
.seo-copy p { color: var(--text-muted); margin-bottom: .85rem; line-height: 1.7; }
.seo-copy ul { list-style: disc; padding-left: 1.4rem; margin-bottom: .85rem; }
.seo-copy ul li { color: var(--text-muted); margin-bottom: .35rem; line-height: 1.6; }
.seo-copy strong { color: var(--text); font-weight: 600; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.note { font-size: .82rem; color: var(--text-muted); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; line-height: 1.55; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Scrollbar ---------- */
.table-scroll::-webkit-scrollbar { width: 8px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ===================================================================
   PREMIUM HERO, GRADIENT MESH, ANIMATIONS & GLASSMORPHISM (v3)
   =================================================================== */

/* Fixed gradient mesh background — replaces flat dot grid */
.bg-mesh { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-mesh::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 15%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    radial-gradient(ellipse 40% 40% at 88% 25%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 60%);
}
.bg-mesh::after {
  content: ''; position: absolute; top: -8%; left: 55%;
  width: 600px; height: 600px; max-width: 70vw; max-height: 70vw;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  filter: blur(70px); opacity: 0.4;
  animation: blobFloat 18s ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-80px,60px) scale(1.1); }
  66% { transform: translate(40px,-50px) scale(0.9); }
}
body { background-image: none; }

/* Logo mark */
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; }

/* Premium hero */
.hero-premium { text-align: center; padding: 80px 0 64px; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: .4rem 1.1rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.045em; margin-bottom: 1.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #06b6d4 40%, var(--accent-hover) 100%);
  background-size: 200% auto; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-muted);
  max-width: 560px; margin: 0 auto 2rem; line-height: 1.65;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.btn-lg { padding: .85rem 1.75rem; font-size: 1rem; border-radius: var(--radius-sm); }

/* Glass stat cards */
.hero-stats { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.glass-stat {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem; text-align: center; min-width: 130px;
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.glass-stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.glass-stat .gs-num { font-size: 1.75rem; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }
.glass-stat .gs-label { font-size: .78rem; color: var(--text-subtle); font-weight: 600; margin-top: .2rem; }

/* Section header */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.035em; }
.section-header p { color: var(--text-muted); margin-top: .5rem; }
.tools-section { padding-bottom: 4rem; }

/* Enhanced card icon hover */
.tool-card .tc-icon { transition: transform .3s cubic-bezier(0.4,0,0.2,1); }
.tool-card:hover .tc-icon { transform: scale(1.1) rotate(-4deg); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(0.16,1,0.3,1), transform .7s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Premium about section */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.about-feature { padding: 1.75rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); transition: transform .2s, box-shadow .2s; }
.about-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.about-feature .af-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.about-feature h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; letter-spacing: -0.02em; }
.about-feature p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* CTA banner */
.cta-banner {
  text-align: center; padding: 3rem 2rem; margin: 3rem 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border));
}
.cta-banner h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .5rem; }
.cta-banner p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Mobile */
@media (max-width: 768px) {
  .hero-premium { padding: 48px 0 40px; }
  .hero-stats { gap: .75rem; }
  .glass-stat { padding: 1rem 1.25rem; min-width: 95px; }
  .glass-stat .gs-num { font-size: 1.4rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ===================================================================
   v4 — IMAGE-ENHANCED HERO, TESTIMONIALS, PHOTO CTA
   Adds real photography to transform from "AI slop" to premium brand
   =================================================================== */

/* ---- Hero Split Layout (index pages only) ---- */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  text-align: left !important;
  padding: 56px 0 48px !important;
}
.hero-split .hero-content { max-width: 580px; }
.hero-split .hero-badge,
.hero-split .hero-title,
.hero-split .hero-sub { margin-left: 0; text-align: left; }
.hero-split .hero-sub { margin: 0 0 1.75rem; max-width: 520px; }
.hero-split .hero-cta { justify-content: flex-start; margin-bottom: 2rem; }
.hero-split .hero-stats { justify-content: flex-start; }

/* ---- Hero Photo ---- */
.hero-visual { position: relative; padding: 8px; }
.hero-photo-frame {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.hero-photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
}
.hero-photo-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, transparent 40%, color-mix(in srgb, var(--accent) 22%, transparent) 100%);
}
/* gradient ring around photo */
.hero-visual::before {
  content: ''; position: absolute; inset: -3px; border-radius: calc(var(--radius-xl) + 3px);
  background: var(--accent-grad); opacity: 0.15; z-index: -1; filter: blur(24px);
}

/* floating stat card */
.hero-float {
  position: absolute; bottom: -20px; left: -24px; z-index: 3;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem 1.35rem; box-shadow: var(--shadow-xl);
  display: flex; align-items: center; gap: .85rem;
}
.hero-float .hf-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
}
.hero-float .hf-num { font-size: 1.35rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.hero-float .hf-label { font-size: .72rem; color: var(--text-muted); margin-top: .15rem; }

/* floating badge top-right */
.hero-float-badge {
  position: absolute; top: -14px; right: -14px; z-index: 3;
  background: var(--accent-grad); color: var(--accent-contrast);
  border-radius: 999px; padding: .55rem 1.1rem; box-shadow: var(--shadow-lg);
  font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}

/* ---- Trust bar ---- */
.trust-bar {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  flex-wrap: wrap; padding: 1.75rem 1.5rem; margin: 0 auto;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: 720px;
}
.trust-bar .trust-item {
  display: flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
}
.trust-bar .trust-item svg { color: var(--accent); flex-shrink: 0; }

/* ---- Testimonials ---- */
.testimonials { padding: 1rem 0 3rem; }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.testimonial-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow-xs); transition: transform .25s cubic-bezier(0.4,0,0.2,1), box-shadow .25s;
}
.testimonial-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.testimonial-stars { color: var(--gold); font-size: 1rem; letter-spacing: 3px; margin-bottom: .85rem; }
.testimonial-text { font-size: .92rem; line-height: 1.65; color: var(--text); margin-bottom: 1.25rem; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); flex-shrink: 0;
}
.testimonial-name { font-size: .875rem; font-weight: 700; color: var(--text); }
.testimonial-role { font-size: .75rem; color: var(--text-muted); }

/* ---- Photo CTA ---- */
.photo-cta {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  margin: 3rem auto; padding: 4rem 2rem; text-align: center;
}
.photo-cta-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0;
}
.photo-cta-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg) 88%, transparent), color-mix(in srgb, var(--bg) 70%, transparent));
}
.photo-cta > .photo-cta-content { position: relative; z-index: 2; }
.photo-cta h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: .5rem; }
.photo-cta p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; text-align: center !important; gap: 40px; padding: 40px 0 32px !important; }
  .hero-split .hero-content { max-width: 100%; }
  .hero-split .hero-badge,
  .hero-split .hero-title,
  .hero-split .hero-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-split .hero-cta { justify-content: center; }
  .hero-split .hero-stats { justify-content: center; }
  .hero-visual { max-width: 400px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .hero-float { left: 50%; transform: translateX(-50%); bottom: -16px; }
  .hero-float-badge { display: none; }
  .hero-photo { aspect-ratio: 1 / 1.1; }
  .trust-bar { gap: 1rem; }
  .testimonial-card { padding: 1.25rem; }
}
