/* =====================================================================
   Gratuity Calculator UAE — Visual System (fintech/SaaS rebuild)
   Vanilla CSS3. No frameworks. Same class names as existing HTML.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #f8fafc;
  --primary: #0f172a;
  --secondary: #1e293b;
  --accent: #2563eb;
  --accent-600: #1d4ed8;
  --accent-700: #1e40af;
  --accent2: #f97316;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --heading: #0f172a;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .12);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(37, 99, 235, .22);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --grad-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #243b6b 100%);
  --grad-accent: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

  --maxw: 1180px;
  --gutter: 24px;
  --header-h: 72px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --primary: #e2e8f0;
  --secondary: #cbd5e1;
  --surface: #111a2e;
  --surface-2: #16213a;
  --border: #243049;
  --border-strong: #334155;
  --text: #e8edf6;
  --text-soft: #c2ccde;
  --muted: #93a1bd;
  --heading: #f4f7fc;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, .55);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .4), 0 10px 26px rgba(0, 0, 0, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
svg { display: block; }
a { color: var(--accent); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--accent-600); }
ul { list-style: none; }
button { font-family: inherit; }

h1, h2, h3, h4 { color: var(--heading); font-weight: 800; letter-spacing: -.021em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.3vw, 2.9rem); line-height: 1.16; }
h2 { font-size: clamp(1.55rem, 1.18rem + 1.5vw, 2.1rem); line-height: 1.22; }
h3 { font-size: clamp(1.2rem, 1.08rem + .55vw, 1.42rem); font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
p { color: var(--text-soft); }
strong { color: var(--heading); font-weight: 700; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-sm { padding: 48px 0; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head h2 { margin-bottom: 0; }
.section-head p { margin-top: 14px; font-size: 1.08rem; color: var(--muted); }
.text-center { text-align: center; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .96rem; padding: 12px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; line-height: 1; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--grad-accent); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37, 99, 235, .36); }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s var(--ease), border-color .25s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); border-color: transparent; }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--grad-primary);
  display: grid; place-items: center; flex-shrink: 0; position: relative; box-shadow: var(--shadow-sm);
}
.brand-mark span { color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1; }
.brand-mark .dot { position: absolute; right: 6px; bottom: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: 1.04rem; color: var(--heading); letter-spacing: -.02em; }
.brand-sub { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

.nav { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; margin-left: auto; }
.nav > a, .dropdown-toggle {
  color: var(--text-soft); font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 9px;
  white-space: nowrap; transition: color .18s, background .18s; line-height: 1;
}
.nav > a:hover, .dropdown-toggle:hover { color: var(--accent); background: var(--surface-2); text-decoration: none; }
.nav > a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; }
.dropdown-toggle .caret { font-size: .6rem; transition: transform .22s var(--ease); }
.has-dropdown.open .caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, 8px);
  min-width: 264px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.dropdown-menu::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}
.has-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown-menu a { display: block; padding: 11px 13px; border-radius: 10px; font-size: .92rem; font-weight: 600; color: var(--text); }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--accent); text-decoration: none; }
.dropdown-menu a small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--heading); cursor: pointer; display: grid; place-items: center;
  transition: border-color .2s, background .2s, transform .16s; flex-shrink: 0; padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.header-cta { display: inline-flex; }

/* Hamburger */
.hamburger {
  display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; position: relative; flex-shrink: 0; padding: 0;
}
.hamburger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--heading); border-radius: 3px; transition: transform .28s var(--ease), opacity .2s var(--ease); }
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 20px; }
.hamburger span:nth-child(3) { top: 26px; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 999; background: var(--surface);
  transform: translateX(100%); transition: transform .3s var(--ease); padding: 20px var(--gutter) 40px;
  overflow-y: auto; visibility: hidden;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a { display: block; padding: 14px 12px; border-radius: 10px; font-weight: 600; color: var(--text); font-size: 1.02rem; border-bottom: 1px solid var(--border); }
.mobile-nav a:hover { background: var(--surface-2); text-decoration: none; }
.mobile-nav a.mobile-cta { display: flex; justify-content: center; align-items: center; margin-top: 22px; padding: 15px 22px; border: none; border-bottom: none; color: #fff; background: var(--grad-accent); }
.mobile-nav a.mobile-cta:hover { background: var(--grad-accent); color: #fff; }
.mobile-group-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding: 18px 12px 6px; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 998; opacity: 0; visibility: hidden; transition: opacity .3s; }
.nav-backdrop.open { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-primary); color: #fff; overflow: hidden; padding: clamp(64px, 9vw, 104px) 0; }
.hero::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; top: -260px; right: -160px; background: radial-gradient(circle, rgba(37, 99, 235, .42), transparent 62%); }
.hero::after { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; bottom: -240px; left: -160px; background: radial-gradient(circle, rgba(249, 115, 22, .22), transparent 64%); }
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero .eyebrow { color: #fbbf90; }
.hero h1 { color: #fff; }
.hero h1 .hl { background: linear-gradient(120deg, #60a5fa, #93c5fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: rgba(255, 255, 255, .8); font-size: 1.16rem; margin: 18px 0 30px; max-width: 540px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-bullets { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-bullets li {
  display: flex; align-items: center; gap: 9px; padding: 9px 15px 9px 11px;
  color: #fff; font-weight: 600; font-size: .9rem; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
  animation: badgeIn .5s var(--ease) both;
}
.trust-bullets li:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .16); border-color: rgba(147, 197, 253, .6); box-shadow: 0 10px 22px rgba(2, 6, 23, .3); }
.trust-bullets li:nth-child(1) { animation-delay: .05s; }
.trust-bullets li:nth-child(2) { animation-delay: .13s; }
.trust-bullets li:nth-child(3) { animation-delay: .21s; }
.trust-bullets li:nth-child(4) { animation-delay: .29s; }
@keyframes badgeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.trust-bullets .tick {
  width: 22px; height: 22px; border-radius: 50%; background: var(--grad-accent); color: #fff;
  display: grid; place-items: center; font-size: .66rem; flex-shrink: 0; box-shadow: 0 3px 8px rgba(37, 99, 235, .4);
}

/* Hero visual */
.hero-visual { position: relative; height: 400px; }
.float-card { position: absolute; border-radius: var(--radius-lg); }
.fc-main {
  inset: 22px 30px; padding: 26px; display: flex; flex-direction: column; gap: 18px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px rgba(2, 6, 23, .4);
  animation: floaty 6s ease-in-out infinite;
}
.fc-top { display: flex; align-items: center; justify-content: space-between; }
.fc-chip { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #93c5fd; background: rgba(37, 99, 235, .22); padding: 6px 11px; border-radius: var(--radius-pill); }
.fc-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--grad-accent); display: grid; place-items: center; color: #fff; font-weight: 800; }
.fc-label { font-size: .76rem; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.fc-amount { font-size: 2.4rem; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; }
.fc-amount small { font-size: 1rem; color: rgba(255, 255, 255, .55); font-weight: 600; margin-right: 4px; }
.fc-bars { display: flex; gap: 8px; align-items: flex-end; height: 64px; margin-top: auto; }
.fc-bars span { flex: 1; background: linear-gradient(180deg, rgba(147, 197, 253, .7), rgba(147, 197, 253, .12)); border-radius: 5px 5px 0 0; }
.fc-bars span:nth-child(1){height:38%}.fc-bars span:nth-child(2){height:60%}.fc-bars span:nth-child(3){height:46%}.fc-bars span:nth-child(4){height:82%}.fc-bars span:nth-child(5){height:64%}
.fc-bars span:last-child { background: linear-gradient(180deg, #fb923c, #f97316); }
.fc-pill {
  width: 104px; height: 104px; right: 0; top: -14px; border-radius: 24px; background: var(--grad-accent);
  display: grid; place-items: center; box-shadow: 0 18px 40px rgba(37, 99, 235, .45); animation: floaty 5s ease-in-out infinite .6s;
}
.fc-pill .glyph { color: #fff; font-size: 2.4rem; font-weight: 800; }
.fc-coin {
  width: 64px; height: 64px; left: 0; bottom: 6px; border-radius: 50%; background: linear-gradient(135deg, #fb923c, #f97316);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 14px 30px rgba(249, 115, 22, .45); animation: floaty 7s ease-in-out infinite 1.1s;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-card); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.feature-card { padding: 28px 26px; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; font-size: 1.4rem;
}
.feature-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature-card p { font-size: .95rem; color: var(--muted); }

/* Steps */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step .num { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-primary); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; font-size: 1.1rem; }
.step h3 { font-size: 1.08rem; margin-bottom: 7px; }
.step p { font-size: .93rem; color: var(--muted); }

/* ---------- Calculator ---------- */
.calc-section { background: var(--surface-2); }
.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calc-card, .result-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: clamp(24px, 3vw, 34px);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.calc-card:hover, .result-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.calc-card h2 { font-size: 1.5rem; }
.calc-card .lead { font-size: .96rem; color: var(--muted); margin: 6px 0 24px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--heading); margin-bottom: 8px; }
.field .hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: .98rem; line-height: 1.3;
  transition: border-color .18s, box-shadow .18s; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: .9rem; pointer-events: none; }
.input-prefix input { padding-left: 52px; }
.calc-actions { display: flex; gap: 12px; margin-top: 6px; }
.field-error { color: #dc2626; font-size: .82rem; margin-top: 6px; display: none; }
.field.invalid input, .field.invalid select { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.field.invalid .field-error { display: block; }

.law-note, .form-note {
  margin-top: 14px; background: color-mix(in srgb, var(--accent2) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent2) 30%, var(--border)); border-left: 3px solid var(--accent2);
  border-radius: var(--radius-sm); padding: 12px 15px; font-size: .85rem; color: var(--text-soft);
}

/* Result */
.result-card { position: relative; }
.result-empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.result-empty .big-icon { font-size: 2.4rem; margin-bottom: 14px; }
.result-empty h3 { color: var(--heading); margin-bottom: 8px; }
.result-content { display: none; }
.result-content.show { display: block; animation: fadeUp .45s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.elig-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--radius-pill); font-weight: 700; font-size: .85rem; margin-bottom: 18px; }
.elig-yes { background: rgba(22, 163, 74, .12); color: #15803d; }
.elig-no { background: rgba(220, 38, 38, .12); color: #dc2626; }

.result-amount-wrap { text-align: center; padding: 26px 20px; background: var(--grad-primary); border-radius: var(--radius); color: #fff; margin-bottom: 22px; position: relative; overflow: hidden; }
.result-amount-wrap::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -120px; right: -60px; background: radial-gradient(circle, rgba(37, 99, 235, .4), transparent 65%); }
.ra-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .65); position: relative; }
.result-amount { font-size: clamp(2.1rem, 6vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; position: relative; line-height: 1.1; margin-top: 6px; }
.result-amount .cur { font-size: 1.05rem; color: #93c5fd; vertical-align: super; margin-right: 6px; font-weight: 700; }

.duration-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.dur { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; }
.dur b { display: block; font-size: 1.5rem; color: var(--heading); line-height: 1; }
.dur small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 5px; display: block; }

.breakdown { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: .92rem; }
.breakdown td { padding: 11px 4px; text-align: left; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.breakdown td:last-child { text-align: right; font-weight: 700; color: var(--heading); }
.breakdown tr.total td { font-size: 1.05rem; border-bottom: none; border-top: 2px solid var(--border-strong); padding-top: 14px; color: var(--heading); }

.cap-warning { background: color-mix(in srgb, var(--accent2) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent2) 32%, var(--border)); border-radius: var(--radius-sm); padding: 12px 15px; font-size: .85rem; color: var(--text-soft); margin-bottom: 18px; }
.formula-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .85rem; color: var(--text-soft); margin-bottom: 20px; line-height: 1.7; }
.formula-box code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); padding: 2px 6px; border-radius: 5px; font-size: .85em; }

.result-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rb {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); font-weight: 600;
  font-size: .84rem; padding: 11px 8px; border-radius: var(--radius-sm); transition: all .18s var(--ease);
}
.rb:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); transform: translateY(-1px); }
.rb svg { width: 16px; height: 16px; flex-shrink: 0; }
.rb.wa:hover { border-color: #22c55e; color: #16a34a; background: rgba(34, 197, 94, .07); }

.result-disclaimer { margin-top: 20px; font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--border-strong); padding-top: 14px; }

/* ---------- Prose ---------- */
.prose { max-width: 800px; margin: 0 auto; }
.prose > p, .prose ul, .prose .data-table-wrap, .prose .callout, .prose .formula-box { font-size: 1.02rem; }
.prose h2 { margin-top: 14px; }
.prose h3 { margin: 32px 0 10px; }
.prose p { margin-bottom: 16px; line-height: 1.75; }
.prose ul.bullets { margin: 0 0 20px; }
.prose ul.bullets li { position: relative; padding-left: 28px; margin-bottom: 11px; color: var(--text-soft); line-height: 1.7; }
.prose ul.bullets li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; box-shadow: var(--shadow-sm);
}
.callout.warn { border-left-color: var(--accent2); }
.callout h4 { margin-bottom: 7px; color: var(--heading); }
.callout p { margin: 0; font-size: .96rem; color: var(--text-soft); }

.data-table-wrap { overflow-x: auto; margin: 20px 0 26px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 460px; background: var(--surface); }
.data-table th { background: var(--primary); color: #fff; padding: 14px 18px; text-align: left; font-size: .85rem; font-weight: 600; letter-spacing: .01em; }
[data-theme="dark"] .data-table th { background: #1e293b; }
.data-table td { padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--surface-2); }

/* Examples */
.example-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .22s, box-shadow .22s; }
.example-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.example-card .ex-head { background: var(--grad-primary); color: #fff; padding: 20px 24px; }
.example-card .ex-head h3 { color: #fff; font-size: 1.1rem; }
.example-card .ex-head .ex-meta { font-size: .85rem; color: rgba(255, 255, 255, .72); margin-top: 3px; }
.example-card .ex-body { padding: 22px 24px; }
.example-card .ex-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .9rem; border-bottom: 1px dashed var(--border); color: var(--muted); }
.example-card .ex-row:last-of-type { border-bottom: none; }
.example-card .ex-row span:last-child { font-weight: 700; color: var(--heading); }
.example-card .ex-result { margin-top: 16px; padding: 15px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; }
.example-card .ex-result b { font-size: 1.45rem; color: var(--accent); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.faq-item { transition: box-shadow .2s, border-color .2s, transform .2s var(--ease); }
.faq-item:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.faq-item.open { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: none; padding: 19px 22px; cursor: pointer; font-weight: 700; font-size: 1.01rem; color: var(--heading); text-align: left; }
.faq-q .fi { width: 24px; height: 24px; flex-shrink: 0; position: relative; }
.faq-q .fi::before, .faq-q .fi::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; transition: transform .3s var(--ease), opacity .25s; }
.faq-q .fi::before { width: 13px; height: 2.4px; top: 11px; left: 5.5px; }
.faq-q .fi::after { width: 2.4px; height: 13px; top: 5.5px; left: 11px; }
.faq-item.open .faq-q .fi::after { transform: rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .32s var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--text-soft); font-size: .96rem; line-height: 1.7; }

/* ---------- Trust ---------- */
.trust-section { background: var(--surface-2); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-item { display: flex; gap: 15px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.trust-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trust-item .ti-icon { width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); display: grid; place-items: center; flex-shrink: 0; font-size: 1.25rem; }
.trust-item h4 { font-size: 1rem; margin-bottom: 5px; }
.trust-item p { font-size: .88rem; margin: 0; color: var(--muted); }

/* ---------- CTA ---------- */
.cta-band { background: var(--grad-primary); color: #fff; border-radius: var(--radius-lg); padding: clamp(44px, 6vw, 64px) clamp(24px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; top: -140px; right: -80px; background: radial-gradient(circle, rgba(37, 99, 235, .4), transparent 64%); }
.cta-band::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; bottom: -150px; left: -70px; background: radial-gradient(circle, rgba(249, 115, 22, .22), transparent 66%); }
.cta-band h2 { color: #fff; position: relative; z-index: 1; }
.cta-band p { color: rgba(255, 255, 255, .82); max-width: 560px; margin: 13px auto 28px; position: relative; z-index: 1; font-size: 1.08rem; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- Page hero (inner) ---------- */
.page-hero { background: var(--grad-primary); color: #fff; padding: clamp(48px, 7vw, 76px) 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; top: -180px; right: -110px; background: radial-gradient(circle, rgba(37, 99, 235, .38), transparent 64%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 640px; margin-top: 14px; font-size: 1.1rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; margin-bottom: 20px; }
.breadcrumb a { color: rgba(255, 255, 255, .72); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: rgba(255, 255, 255, .4); }
.breadcrumb span[aria-current] { color: #93c5fd; font-weight: 600; }

.reviewed { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); background: var(--surface-2); padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.reviewed .pulse { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }

.indep-banner { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; font-size: .92rem; color: var(--text-soft); display: flex; gap: 12px; align-items: flex-start; line-height: 1.6; }
.indep-banner .ib-icon { flex-shrink: 0; font-size: 1.1rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.info-list li { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-list .il-icon { width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.info-list h4 { font-size: .98rem; margin-bottom: 2px; }
.info-list p { font-size: .88rem; margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #cbd5e1; padding: clamp(48px, 6vw, 64px) 0 0; margin-top: 24px; }
[data-theme="dark"] .site-footer { background: #070d19; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #94a3b8; }
.footer-about { font-size: .92rem; color: #94a3b8; margin: 16px 0; line-height: 1.7; }
.footer-indep { font-size: .8rem; color: #7e8aa3; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius-sm); padding: 11px 14px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { color: #aab4c8; font-size: .92rem; display: inline-block; transition: color .2s var(--ease), transform .2s var(--ease); }
.footer-col a:hover { color: #fff; text-decoration: none; transform: translateX(4px); }
.footer-contact p { font-size: .9rem; color: #94a3b8; margin-bottom: 11px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.footer-contact .fc-i { flex-shrink: 0; width: 18px; text-align: center; }

/* Global hard cap: no icon inside the footer may ever exceed 28px.
   (Footer social icons were removed; this is a permanent safety net.) */
.site-footer svg, .site-footer img {
  width: 22px !important; height: 22px !important; max-width: 26px !important; max-height: 26px !important;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #cbd5e1;
  transition: background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease), transform .2s var(--ease);
}
.footer-social a:hover { transform: translateY(-3px); color: #fff; }
.footer-social .s-fb:hover { background: #1877f2; border-color: #1877f2; }
.footer-social .s-x:hover  { background: #000000; border-color: #000000; }
.footer-social .s-li:hover { background: #0a66c2; border-color: #0a66c2; }
.footer-social .s-ig:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.footer-social .s-yt:hover { background: #ff0000; border-color: #ff0000; }
.footer-social .s-wa:hover { background: #25d366; border-color: #25d366; }
.footer-social .s-tg:hover { background: #229ed9; border-color: #229ed9; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; font-size: .85rem; color: #94a3b8; }
.footer-bottom a { color: #aab4c8; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Back to top + progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad-accent); z-index: 1100; transition: width .1s linear; }
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad-accent); color: #fff; border: none; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .35); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s; z-index: 900;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; } .reveal.d5 { transition-delay: .35s; }

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; }
  body { color: #111 !important; font-size: 12pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Hide chrome and EVERY section (incl. other .calc-section blocks) */
  .site-header, .mobile-nav, .nav-backdrop, .back-to-top, .scroll-progress, .site-footer, .skip-link { display: none !important; }
  main > section { display: none !important; }

  /* Show only the calculator section, trimmed to the result report */
  main > section#calculator { display: block !important; padding: 0 !important; background: #fff !important; }
  #calculator .container { max-width: none !important; padding: 0 !important; }
  #calculator > .container > .section-head { display: none !important; }
  #calculator .calc-wrap { display: block !important; gap: 0 !important; }
  #calculator .calc-card, .result-empty, .result-buttons { display: none !important; }
  .result-card { display: block !important; box-shadow: none !important; border: none !important; padding: 0 !important; page-break-inside: avoid; }
  .result-content { display: block !important; }
  .print-only { display: block !important; }

  /* Clean white report with blue/orange accents */
  .print-head { text-align: center; border-bottom: 2px solid #2563eb; padding-bottom: 12px; margin-bottom: 20px; }
  .print-head strong { display: block; font-size: 18pt; color: #0f172a; letter-spacing: -.01em; }
  .print-head span { display: inline-block; margin-top: 4px; font-size: 9.5pt; color: #f97316; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .elig-badge { background: #fff !important; border: 1px solid #cbd5e1; color: #0f172a !important; }
  .result-amount-wrap { background: #fff !important; color: #0f172a !important; border: 2px solid #2563eb; border-radius: 10px; padding: 16px !important; margin-bottom: 18px !important; }
  .result-amount-wrap::after { display: none !important; }
  .ra-label { color: #2563eb !important; }
  .result-amount { color: #0f172a !important; }
  .result-amount .cur { color: #f97316 !important; }
  .duration-cards .dur { background: #fff !important; border: 1px solid #cbd5e1 !important; }
  .dur b { color: #0f172a !important; }
  .breakdown td { color: #111 !important; border-color: #ddd !important; }
  .breakdown tr.total td { border-top-color: #2563eb !important; color: #0f172a !important; }
  .formula-box, .cap-warning { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; color: #222 !important; }
  .formula-box code { background: #eef2ff !important; color: #1d4ed8 !important; }
  .result-disclaimer { color: #555 !important; border-top: 1px dashed #cbd5e1 !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav, .header-cta { display: none; }
  .hamburger { display: block; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { height: 330px; max-width: 420px; width: 100%; margin: 0 auto; }
  .calc-wrap { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  :root { --gutter: 18px; }
  .grid-2, .grid-3, .steps, .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .field-row { grid-template-columns: 1fr; }
  .result-buttons { grid-template-columns: repeat(2, 1fr); }
  .duration-cards { grid-template-columns: 1fr 1fr; }
  .brand-sub { display: none; }
  .calc-actions { flex-direction: column; }
  .hero-sub { font-size: 1.06rem; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact { grid-column: auto; }
  .duration-cards { grid-template-columns: 1fr; }
}
