/* ============================================================
   Samaj — site design system (one source of truth)
   Built from WEBSITE_REDESIGN_BLUEPRINT.md
   Light default + dark toggle · trilingual · WCAG AA · gold accent
   ============================================================ */

/* ---------- tokens ---------- */
:root{
  /* warm neutrals — LIGHT (default) */
  --bg:#FBFAF7; --surface:#FFFFFF; --surface-2:#F4F2EC;
  --border:rgba(20,18,12,.10); --border-2:rgba(20,18,12,.06);
  --text:#1A1814; --text-2:#5B574E; --text-3:#847E72;
  /* gold accent */
  --gold:#C9912A; --gold-bright:#E8B23A; --gold-soft:rgba(201,145,42,.10);
  --gold-grad:linear-gradient(100deg,#C9912A,#E8B23A);
  --on-gold:#1A1814;
  /* semantic */
  --success:#1f9d6b; --danger:#c4453b;
  /* shape + motion */
  --r-sm:10px; --r-md:16px; --r-lg:24px; --r-xl:32px;
  --shadow-1:0 1px 2px rgba(20,18,12,.06), 0 2px 8px rgba(20,18,12,.05);
  --shadow-2:0 8px 24px rgba(20,18,12,.08);
  --shadow-3:0 24px 60px -24px rgba(20,18,12,.22);
  --ease:cubic-bezier(.2,.7,.2,1);
  --container:1240px; --container-wide:1640px;
  --gutter:clamp(20px,5vw,72px);
}
[data-theme="dark"]{
  --bg:#0B0B0E; --surface:#15151A; --surface-2:#1D1D24;
  --border:rgba(255,255,255,.10); --border-2:rgba(255,255,255,.06);
  --text:#F7F6F3; --text-2:#C2C0B8; --text-3:#928F86;
  --gold:#E8B23A; --gold-bright:#F4C95B; --gold-soft:rgba(232,178,58,.12);
  --gold-grad:linear-gradient(100deg,#D89E2E,#F4C95B);
  --on-gold:#0B0B0E;
  --shadow-1:0 1px 2px rgba(0,0,0,.4); --shadow-2:0 12px 30px rgba(0,0,0,.45);
  --shadow-3:0 30px 70px -30px rgba(0,0,0,.7);
}

/* ---------- reset / base ---------- */
*,*::before,*::after{ box-sizing:border-box; margin:0; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  background:var(--bg); color:var(--text);
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  font-size:16px; line-height:1.6; letter-spacing:-.011em;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
:lang(gu){ font-family:'Noto Sans Gujarati','Inter',sans-serif; line-height:1.75; letter-spacing:0; }
:lang(hi){ font-family:'Noto Sans Devanagari','Inter',sans-serif; line-height:1.75; letter-spacing:0; }
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; border-radius:4px; }
.skip{ position:absolute; left:-999px; top:0; background:var(--gold); color:var(--on-gold);
  padding:10px 16px; border-radius:0 0 10px 0; z-index:100; font-weight:700; }
.skip:focus{ left:0; }

/* ---------- typography ---------- */
.display-xl{ font-family:'Inter Tight','Inter',sans-serif; font-weight:800;
  font-size:clamp(40px,7.4vw,100px); line-height:.96; letter-spacing:-.04em; }
.display-l{ font-family:'Inter Tight','Inter',sans-serif; font-weight:800;
  font-size:clamp(32px,4.8vw,60px); line-height:1.02; letter-spacing:-.035em; }
.h3{ font-family:'Inter Tight','Inter',sans-serif; font-weight:700; font-size:22px; letter-spacing:-.01em; }
.lead{ font-size:clamp(17px,1.4vw,20px); line-height:1.55; color:var(--text-2); }
.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase; color:var(--gold);
  background:var(--gold-soft); border:1px solid color-mix(in srgb,var(--gold) 28%,transparent);
  padding:7px 13px; border-radius:999px; }
.gold-text{ background:var(--gold-grad); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; }
.muted{ color:var(--text-2); } .muted-3{ color:var(--text-3); }

/* ---------- layout ---------- */
.container{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:var(--gutter); }
.container-wide{ width:100%; max-width:var(--container-wide); margin-inline:auto; padding-inline:var(--gutter); }
.section{ padding-block:clamp(64px,9vw,128px); }
.section-tight{ padding-block:clamp(40px,5vw,72px); }
.center{ text-align:center; }
.stack > * + *{ margin-top:16px; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font:inherit; font-weight:700; font-size:15px; letter-spacing:-.01em; cursor:pointer;
  padding:13px 22px; border-radius:var(--r-md); border:1px solid transparent;
  transition:transform .18s var(--ease), box-shadow .18s, background .18s, border-color .18s;
  min-height:46px; }
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--gold-grad); color:var(--on-gold); box-shadow:0 10px 24px -8px color-mix(in srgb,var(--gold) 60%,transparent); }
.btn-ghost{ background:transparent; color:var(--text); border-color:var(--border); }
.btn-ghost:hover{ border-color:var(--gold); }
.btn-lg{ padding:16px 28px; font-size:16px; min-height:54px; }

/* ---------- forms ---------- */
.field{ display:flex; gap:8px; flex-wrap:wrap; }
.input{ flex:1; min-width:200px; font:inherit; padding:14px 16px; border-radius:var(--r-md);
  border:1px solid var(--border); background:var(--surface); color:var(--text); }
.input::placeholder{ color:var(--text-3); }
.input:focus-visible{ border-color:var(--gold); outline:none; box-shadow:0 0 0 4px var(--gold-soft); }
.form-note{ font-size:12.5px; color:var(--text-3); margin-top:10px; }
.form-ok{ border:1px solid color-mix(in srgb,var(--success) 45%,transparent); color:var(--success);
  background:color-mix(in srgb,var(--success) 10%,transparent); padding:13px 16px; border-radius:var(--r-md); font-weight:600; }

/* ---------- nav ---------- */
.nav{ position:sticky; top:0; z-index:50; background:color-mix(in srgb,var(--bg) 72%,transparent);
  -webkit-backdrop-filter:blur(16px) saturate(140%); backdrop-filter:blur(16px) saturate(140%);
  border-bottom:1px solid var(--border); }
.nav-in{ height:66px; display:flex; align-items:center; gap:20px; }
.nav-brand{ display:flex; align-items:center; gap:11px; font-family:'Inter Tight'; font-weight:800; font-size:23px; letter-spacing:-.02em; }
.nav-brand .mark{ width:30px; height:30px; border-radius:8px; background:var(--gold-grad); box-shadow:0 4px 10px -3px color-mix(in srgb,var(--gold) 60%,transparent); }
.nav-links{ display:flex; gap:4px; margin-left:auto; align-items:center; }
.nav-links a{ position:relative; padding:8px 12px; border-radius:9px; font-size:14.5px; font-weight:500; color:var(--text-2); transition:color .2s; }
.nav-links a:hover{ color:var(--text); }
.nav-links a::after{ content:''; position:absolute; left:12px; right:12px; bottom:3px; height:2px;
  background:var(--gold); border-radius:2px; transform:scaleX(0); transform-origin:left; transition:transform .25s var(--ease); }
.nav-links a:hover::after{ transform:scaleX(1); }
.lang-switch{ display:flex; gap:2px; border:1px solid var(--border); border-radius:999px; padding:3px; }
.lang-switch a{ padding:5px 10px; border-radius:999px; font-size:12.5px; font-weight:600; color:var(--text-3); }
.lang-switch a[aria-current="true"]{ background:var(--gold-soft); color:var(--gold); }
.theme-toggle{ width:40px; height:40px; border-radius:999px; border:1px solid var(--border);
  background:var(--surface); color:var(--text); cursor:pointer; display:grid; place-items:center; }
.nav-cta{ background:var(--gold-grad); color:var(--on-gold); padding:9px 16px; border-radius:10px; font-weight:700; font-size:14px; }
.nav-burger{ display:none; width:42px; height:42px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); font-size:18px; cursor:pointer; }
@media(max-width:920px){
  .nav-links{ display:none; } .lang-switch{ display:none; }
  .nav-burger{ display:grid; place-items:center; }
}
.drawer{ display:none; position:fixed; left:0; right:0; top:66px; bottom:0; z-index:49;
  background:var(--bg); padding:24px var(--gutter); flex-direction:column; gap:4px; overflow-y:auto; }
.drawer.open{ display:flex; }
.drawer a{ padding:15px 4px; font-size:18px; font-weight:600; color:var(--text); border-bottom:1px solid var(--border); }
.drawer a.btn{ border:none; margin-top:16px; justify-content:center; }
@media(min-width:921px){ .drawer{ display:none!important; } }

/* ---------- cards ---------- */
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:28px; transition:transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-2); border-color:color-mix(in srgb,var(--gold) 30%,var(--border)); }
.card-ico{ width:52px; height:52px; border-radius:14px; display:grid; place-items:center;
  background:var(--gold-soft); color:var(--gold); margin-bottom:14px; }
.card-ico svg{ width:26px; height:26px; }
.card h3{ font-family:'Inter Tight'; font-weight:700; font-size:21px; letter-spacing:-.012em; }
.card p{ color:var(--text-2); font-size:16px; margin-top:6px; }

/* ---------- bento ---------- */
.bento{ display:grid; grid-template-columns:repeat(6,1fr); gap:18px; }
.bento .card{ grid-column:span 2; }
.bento .card.wide{ grid-column:span 3; }
@media(max-width:900px){ .bento{ grid-template-columns:repeat(2,1fr); } .bento .card,.bento .card.wide{ grid-column:span 1; } }
@media(max-width:560px){ .bento{ grid-template-columns:1fr; } }

/* ---------- stats ---------- */
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; text-align:center; }
.stat .n{ font-family:'Inter Tight'; font-weight:800; font-size:34px; }
.stat .l{ color:var(--text-3); font-size:13.5px; margin-top:3px; }
@media(max-width:640px){ .stats{ grid-template-columns:repeat(2,1fr); } }

/* ---------- steps ---------- */
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.step{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:30px; }
.step .num{ width:40px; height:40px; border-radius:999px; background:var(--gold-grad); color:var(--on-gold);
  font-weight:800; display:grid; place-items:center; margin-bottom:14px; }
@media(max-width:760px){ .steps{ grid-template-columns:1fr; } }

/* ---------- story (alternating Apple-style) ---------- */
.story{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(32px,5vw,72px); align-items:center; }
.story.flip .story-media{ order:-1; }
@media(max-width:860px){ .story{ grid-template-columns:1fr; } .story.flip .story-media{ order:0; } }

/* ---------- phone frames ---------- */
.phones{ position:relative; width:100%; max-width:560px; margin-inline:auto; aspect-ratio:5/6; }
.phone{ position:absolute; top:50%; width:56%; padding:9px; border-radius:38px;
  background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-3); }
.phone img{ border-radius:30px; }
.phone.back{ left:0; transform:translateY(-52%) rotate(-8deg) scale(.92); z-index:1; }
.phone.front{ right:0; transform:translateY(-48%) rotate(5deg); z-index:2; }
.phone::after{ content:''; position:absolute; inset:-40px; z-index:-1; border-radius:60px;
  background:radial-gradient(circle at 50% 30%,var(--gold-soft),transparent 60%); filter:blur(30px); }

/* ---------- band (CTA / trust) ---------- */
.band{ border-radius:var(--r-xl); padding:clamp(32px,5vw,56px);
  background:linear-gradient(120deg,var(--gold-soft),transparent); border:1px solid var(--border); }
.cta-band{ background:var(--gold-grad); color:var(--on-gold); text-align:center; }
.cta-band .input{ background:rgba(255,255,255,.92); border:none; color:#1a1814; }
.cta-band .btn-primary{ background:var(--on-gold); color:#fff; }

/* ---------- footer ---------- */
.footer{ border-top:1px solid var(--border); margin-top:clamp(48px,7vw,96px); }
.footer-top{ display:flex; flex-wrap:wrap; gap:48px; justify-content:space-between; padding-block:60px 30px; }
.footer-brand{ max-width:300px; }
.footer-tag{ color:var(--text-3); font-size:14px; margin-top:8px; }
.footer-cols{ display:flex; gap:60px; flex-wrap:wrap; }
.footer-col h4{ font-size:11.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--text-3); font-weight:700; margin-bottom:14px; }
.footer-col a{ display:block; color:var(--text-2); font-size:14.5px; padding:5px 0; }
.footer-col a:hover{ color:var(--gold); }
.footer-bottom{ border-top:1px solid var(--border); padding-block:22px 40px; color:var(--text-3); font-size:13px; }

/* ---------- motion (enhance, never hide; respects reduced-motion) ---------- */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    .reveal{ animation:reveal linear both; animation-timeline:view(); animation-range:entry 0% cover 14%; }
    @keyframes reveal{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
  }
}
@media (prefers-reduced-motion:reduce){ *{ animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
