/* ============================================================
   KarSafe — Elevated Design System (redesign layer)
   Loaded AFTER style.css. Unifies typography, spacing, cards,
   color rhythm and motion with the cinematic scroll journey.
   No copy or structural HTML is changed — this is a visual layer.
   ============================================================ */

:root {
  --ease-out: cubic-bezier(.2, .7, .3, 1);
  --section-pad: clamp(76px, 9.5vh, 132px);
  --maxw: 1160px;

  --shadow-soft: 0 2px 5px rgba(15, 30, 48, .05), 0 16px 34px -16px rgba(15, 30, 48, .18);
  --shadow-lift: 0 12px 26px -12px rgba(15, 30, 48, .18), 0 38px 70px -30px rgba(15, 30, 48, .32);
  --radius-card: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --shadow-soft: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 34px -16px rgba(0, 0, 0, .55);
    --shadow-lift: 0 12px 26px -12px rgba(0, 0, 0, .45), 0 38px 70px -30px rgba(0, 0, 0, .65);
  }
}

/* richer ambient field — larger, slower-feeling glows for depth */
body::before {
  background:
    radial-gradient(820px 760px at -8% -12%, rgba(30, 58, 95, .09), transparent 62%),
    radial-gradient(680px 640px at 108% 6%, rgba(232, 145, 58, .08), transparent 62%),
    radial-gradient(900px 820px at 50% 118%, rgba(30, 58, 95, .06), transparent 68%) !important;
}

.container { max-width: var(--maxw); }

/* ============================================================
   Typography — confident, fluid, balanced
   ============================================================ */
.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 800;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.06rem, 1rem + .42vw, 1.24rem);
  line-height: 1.72;
  text-wrap: pretty;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(2rem, 1.35rem + 2.3vw, 3rem);
  line-height: 1.07;
  letter-spacing: -.035em;
  font-weight: 800;
  text-wrap: balance;
  margin-bottom: var(--md);
}
.section-subtitle {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.2rem);
  line-height: 1.72;
  text-wrap: pretty;
  margin-bottom: clamp(44px, 5.5vh, 68px);
}

/* ============================================================
   Section intros — centered, consistent kicker across the page
   ============================================================ */
.section-label,
.section-title,
.section-subtitle {
  text-align: center;
}
.section-title { max-width: 18ch; margin-left: auto; margin-right: auto; }
.section-subtitle { max-width: 640px; margin-left: auto; margin-right: auto; }

.section-label,
.fg-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .76rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: var(--md);
}
.section-label::before,
.section-label::after {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .65;
}
/* the field-guide kicker stays left-aligned inside its card */
.fg-label { justify-content: flex-start; margin-bottom: var(--sm); }
.fg-label::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); opacity: .65; }
.fg-label::after { display: none; }
.regulations .section-label { color: var(--accent); }

/* ============================================================
   Generous section rhythm
   ============================================================ */
.features, .showcase, .reality, .regulations, .guides, .about, .cta-section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* ============================================================
   Card system — unified, layered, premium hover
   ============================================================ */
.feature-card, .reality-card, .field-guide-card, .insight-card,
.about-company, .stats-bar, .enc-flow, .reg-card {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}
.feature-card, .reality-card, .field-guide-card {
  transition: transform .42s var(--ease-out), box-shadow .42s var(--ease-out), border-color .42s var(--ease-out);
}
.feature-card:hover, .field-guide-card:hover, .reality-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(232, 145, 58, .35);
}

/* feature icon tiles — a touch larger, softer */
.feature-icon, .reality-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  margin-bottom: var(--lg);
}
.feature-icon svg, .reality-icon svg { width: 26px; height: 26px; }
.feature-card h3, .reality-card h3 {
  font-size: 1.18rem;
  letter-spacing: -.01em;
  margin-bottom: var(--sm);
}
.feature-card p, .reality-card p { font-size: .96rem; }
.feature-card, .reality-card { padding: clamp(var(--lg), 3vw, var(--xl)); }

.features-grid, .reality-grid, .showcase-grid { gap: clamp(18px, 2vw, 28px); }
.guides-grid, .reg-grid { gap: clamp(18px, 2vw, 26px); }

/* ============================================================
   Stats — designed numerals
   ============================================================ */
.stat-number {
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.7rem);
  letter-spacing: -.03em;
}
.stat-label { font-size: .9rem; }
.hero-stat {
  gap: clamp(18px, 4vw, 56px);
  padding: var(--lg) clamp(var(--lg), 4vw, var(--xxl));
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}
.hero-stat-item strong {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.05rem);
  letter-spacing: -.025em;
}

/* hero badge — refined glass pill */
.hero-badge {
  border: 1px solid var(--border-light);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  padding: var(--sm) var(--md);
}

/* primary buttons — crisper depth */
.btn-download {
  box-shadow: 0 8px 18px -8px rgba(232, 145, 58, .6);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .2s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(232, 145, 58, .7); }

/* ============================================================
   Showcase — device screens sit on a soft pedestal
   ============================================================ */
.showcase-screen { border-radius: 30px; box-shadow: var(--shadow-soft); }
.showcase-card:hover .showcase-screen { box-shadow: var(--shadow-lift); transform: translateY(-6px); }
.showcase-card h3 { font-size: 1.18rem; letter-spacing: -.01em; min-height: 2.5em; }

/* Symmetric row: equal-height cards + equal-height device screens,
   and keep all three side-by-side (no lone 2+1 orphan on tablet). */
.showcase-grid { align-items: stretch; }
.showcase-card { display: flex; flex-direction: column; }
.showcase-screen { display: flex; flex-direction: column; flex: 1 1 auto; }
.showcase-screen .screen-body { flex: 1 1 auto; }
@media (max-width: 1024px) {
  .showcase-grid { grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }
}
@media (max-width: 768px) {
  .showcase-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .showcase-screen { flex: 0 1 auto; }
}

/* ============================================================
   Encryption flow — feels like an instrument panel
   ============================================================ */
.enc-flow {
  padding: clamp(var(--lg), 4vw, var(--xxl)) clamp(var(--md), 3vw, var(--xl));
  border-radius: var(--radius-card);
}
.enc-step-icon { box-shadow: var(--shadow-soft); }
.enc-tagline { font-size: 1.05rem; }

/* ============================================================
   Regulations — the bold navy anchor, with depth
   ============================================================ */
.regulations { position: relative; overflow: hidden; }
.regulations::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 520px at 12% -10%, rgba(232, 145, 58, .14), transparent 60%),
    radial-gradient(720px 560px at 100% 110%, rgba(91, 141, 191, .22), transparent 62%);
}
.regulations .container { position: relative; z-index: 1; }
.reg-card {
  transition: transform .42s var(--ease-out), background .42s var(--ease-out), box-shadow .42s var(--ease-out);
}
.reg-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, .13);
  box-shadow: var(--shadow-lift);
}
.reg-card .reg-years {
  font-size: clamp(2.6rem, 2rem + 2.2vw, 3.5rem);
  letter-spacing: -.04em;
}
.reg-card h3 { font-size: 1.2rem; letter-spacing: -.01em; }

/* ============================================================
   Guides — editorial cards
   ============================================================ */
.field-guide-card h3 { font-size: 1.22rem; letter-spacing: -.015em; line-height: 1.3; }
.field-guide-card .fg-btn {
  box-shadow: 0 8px 18px -10px rgba(30, 58, 95, .5);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.field-guide-card:hover .fg-btn { transform: translateY(-1px); }

/* ============================================================
   CTA — premium navy finish
   ============================================================ */
.cta-section { padding-left: var(--lg); padding-right: var(--lg); }
.cta-section .container {
  position: relative;
  overflow: hidden;
  max-width: 1000px;
  padding: clamp(52px, 7vh, 92px) clamp(var(--lg), 5vw, var(--xxl));
  border-radius: 30px;
  background:
    radial-gradient(620px 420px at 18% -20%, rgba(232, 145, 58, .26), transparent 60%),
    linear-gradient(155deg, #234a78, #14263d 70%);
  box-shadow: var(--shadow-lift);
}
.cta-section h2 {
  color: #fff;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.cta-section p { color: rgba(255, 255, 255, .78); }
.cta-section .store-btn {
  background: #fff;
  color: var(--primary);
}
.cta-section .store-btn svg { fill: var(--primary); }
.cta-section .store-btn-sub { color: #475569; opacity: 1; }
.cta-section .store-btn:hover { background: #f1f5f9; color: var(--primary); }
.cta-section #coming-soon-text { color: rgba(255, 255, 255, .6) !important; }

/* ============================================================
   Scroll-reveal motion — the page breathes like the journey.
   Gated on html.reveal-ready so no-JS / SEO sees everything.
   ============================================================ */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}
html.reveal-ready [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  html.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .feature-card:hover, .reality-card:hover, .field-guide-card:hover,
  .reg-card:hover, .showcase-card:hover .showcase-screen { transform: none; }
}

/* ============================================================
   Connective scroll cue under the hero -> into the journey
   ============================================================ */
.hero-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: clamp(28px, 4vh, 48px);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-cue svg { width: 26px; height: 26px; animation: heroBob 2.2s var(--ease-out) infinite; }
@keyframes heroBob { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(8px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .hero-cue svg { animation: none; } }

/* ============================================================
   Mobile polish
   ============================================================ */
@media (max-width: 768px) {
  .cta-section .container { border-radius: 24px; }
  .hero-stat { width: auto; }
  .section-title { max-width: 100%; }
}

/* ============================================================
   Showcase — real device mockups (merged from exploration)
   ============================================================ */
.rw-devices { display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(20px,3vw,40px); align-items:start; }
.rw-device-card { display:flex; flex-direction:column; align-items:center; text-align:center; }
.rw-stage { position:relative; width:100%; display:flex; justify-content:center; padding:30px 0 26px; }
.rw-stage::before { content:""; position:absolute; left:50%; top:46%; transform:translate(-50%,-50%);
  width:118%; height:78%; border-radius:50%;
  background:radial-gradient(ellipse at center, rgba(232,145,58,.16) 0%, transparent 70%); }
.rw-phone { position:relative; width:min(252px,72%); aspect-ratio:1320/2868; border-radius:34px;
  background:linear-gradient(160deg,#283642,#11181f); padding:5px; box-shadow:var(--shadow-lift);
  transition:transform .42s var(--ease-out); }
.rw-device-card:hover .rw-phone { transform:translateY(-6px); }
.rw-phone img { display:block; width:100%; height:100%; object-fit:cover; border-radius:29px; }
.rw-badge { position:absolute; top:-14px; right:calc(14% - 14px); width:46px; height:46px; border-radius:50%;
  background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:800; font-size:1.15rem; box-shadow:0 10px 22px -8px rgba(212,120,42,.7);
  border:3px solid var(--bg); }
.rw-device-card h3 { font-family:var(--font-display); font-weight:700; font-size:1.2rem; letter-spacing:-.01em; margin:8px 0; color:var(--text-primary); }
.rw-device-card p { color:var(--text-secondary); font-size:.96rem; line-height:1.6; max-width:32ch; }

/* ============================================================
   Reality — editorial bento (merged from exploration)
   ============================================================ */
.rw-bento { display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(14px,1.8vw,22px); }
.rw-tile { border-radius:var(--radius-card); padding:clamp(var(--lg),2.4vw,var(--xl));
  background:var(--glass-fill); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  border:1px solid var(--border-light); box-shadow:var(--shadow-soft);
  transition:transform .42s var(--ease-out), box-shadow .42s var(--ease-out), border-color .42s var(--ease-out); }
.rw-tile:hover { transform:translateY(-5px); box-shadow:var(--shadow-lift); border-color:rgba(232,145,58,.35); }
.rw-tile .ico { width:50px; height:50px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:rgba(30,58,95,.07); color:var(--primary); margin-bottom:16px; }
.rw-tile .ico svg { width:25px; height:25px; }
.rw-tile h3 { font-family:var(--font-display); font-weight:700; font-size:1.16rem; letter-spacing:-.01em; margin-bottom:8px; color:var(--text-primary); }
.rw-tile p { color:var(--text-secondary); font-size:.95rem; line-height:1.6; }
.rw-stat { text-align:left; }
.rw-stat .ico { background:rgba(232,145,58,.12); color:var(--accent); }
.rw-stat .num { font-family:var(--font-display); font-weight:800; letter-spacing:-.03em;
  font-size:clamp(2.4rem,1.8rem+2vw,3.2rem); line-height:1; color:var(--primary); }
.rw-stat .lab { color:var(--text-secondary); font-size:.92rem; margin-top:8px; }
.rw-stat .src { color:var(--text-secondary); opacity:.6; font-size:.72rem; margin-top:6px; }
/* Closing statement sits clear of the tile grid above it. */
.reality .reality-bottom { margin-top:clamp(28px,4vw,48px); }
/* "NRIs have it worse" tile — a plain tile in the India edition (A/C),
   highlighted navy only in the NRI/foreign edition (v=b → html.ks-ed-foreign). */
.rw-nri .kicker { display:block; font-family:var(--font-display); font-weight:700; font-size:.7rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--accent); margin-bottom:10px; }
.ks-ed-foreign .rw-nri { background:linear-gradient(155deg,#234a78,#14263d 75%); border-color:transparent; color:#fff; position:relative; overflow:hidden; }
.ks-ed-foreign .rw-nri::before { content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(420px 300px at 110% -20%, rgba(232,145,58,.28), transparent 60%); }
.ks-ed-foreign .rw-nri .ico { background:rgba(255,255,255,.12); color:#fff; }
.ks-ed-foreign .rw-nri h3 { color:#fff; font-size:1.34rem; }
.ks-ed-foreign .rw-nri p { color:rgba(255,255,255,.82); }
.ks-ed-foreign .rw-nri .kicker { position:relative; }
.reality .rw-callout { margin-top:clamp(16px,2vw,22px); text-align:center; max-width:760px; margin-left:auto; margin-right:auto;
  font-size:1.05rem; line-height:1.7; color:var(--text-primary); padding:clamp(18px,2.4vw,26px);
  background:rgba(30,58,95,.05); border:1px solid rgba(30,58,95,.1); border-radius:var(--radius-card); }
@media (max-width:768px){
  .rw-devices{ grid-template-columns:1fr; max-width:360px; margin:0 auto; }
  .rw-bento{ grid-template-columns:1fr; }
}
