/* ============================================================================
   PERSONAL BRAND — SampathBandara Maths.lk home page (2026-11-27)
   ---------------------------------------------------------------------------
   One teacher, one voice: an editorial, premium look built around Sampath
   Bandara Sir. Loaded last on the home page (after home.css), every rule is
   scoped to html[data-bm="home"] so it wins over the earlier layers without
   touching them. Companion script: assets/brand/personal.js.

   Type     Fraunces + Noto Serif Sinhala for headlines (editorial, warm),
            Plus Jakarta Sans + Noto Sans Sinhala for reading,
            Great Vibes for Sir's signature only.
   Colour   midnight #050b1f · navy #0b3a70 · electric #2a8ae0 · gold #f5b301
            on warm cream #faf7f0 and white.
   Rhythm   dark hero → gold topics strip → about Sir → method → classes →
            dark "what we do" → subjects → lessons → results → reviews →
            gallery → events → vision → locations → FAQ → CTA → contact.
   ========================================================================== */

html[data-bm="home"] {
    --pr-mid: #050b1f;  --pr-mid-2: #0a1733; --pr-navy: #0b3a70; --pr-blue: #2a8ae0;
    --pr-gold: #f5b301; --pr-gold-2: #ffd257; --pr-gold-d: #a87400;
    --pr-cream: #faf7f0; --pr-cream-2: #f3eee2; --pr-line: #e9e2d2;
    --pr-ink: #0b1530; --pr-text: #3b4660; --pr-muted: #6b7490;
    --pr-display: 'Fraunces', 'Noto Serif Sinhala', Georgia, serif;
    --pr-body: 'Plus Jakarta Sans', 'Noto Sans Sinhala', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pr-sign: 'Great Vibes', cursive;
    --pr-r: 22px;
    --pr-ease: cubic-bezier(.16,1,.3,1);
    --pr-sh: 0 1px 2px rgba(11,21,48,.04), 0 10px 30px -12px rgba(11,21,48,.14);
    --pr-sh-hi: 0 2px 4px rgba(11,21,48,.05), 0 30px 60px -22px rgba(11,21,48,.30);
    --head: var(--pr-body); --body: var(--pr-body);
}
html[data-bm="home"] body { font-family: var(--pr-body); color: var(--pr-text); background: var(--pr-cream); }
html[data-bm="home"] ::selection { background: rgba(245,179,1,.35); color: var(--pr-ink); }

/* ── section order (the markup keeps its own order for the scripts) ─────── */
html[data-bm="home"] main { display: flex; flex-direction: column; }
html[data-bm="home"] main > .sl { order: 0; }
html[data-bm="home"] main > .px-hero { order: 1; }
html[data-bm="home"] main > .pr-marquee { order: 2; }
html[data-bm="home"] main > .notice { order: 3; }
html[data-bm="home"] main > #about { order: 4; }
html[data-bm="home"] main > #method { order: 5; }
html[data-bm="home"] main > #classes { order: 6; }
html[data-bm="home"] main > #why { order: 7; }
html[data-bm="home"] main > #subjects { order: 8; }
html[data-bm="home"] main > #lessons { order: 9; }
html[data-bm="home"] main > #results { order: 10; }
html[data-bm="home"] main > #reviews { order: 11; }
html[data-bm="home"] main > #gallery { order: 12; }
html[data-bm="home"] main > #events { order: 13; }
html[data-bm="home"] main > #vision { order: 14; }
html[data-bm="home"] main > #locations { order: 15; }
html[data-bm="home"] main > #faq { order: 16; }
html[data-bm="home"] main > .cta { order: 17; }
html[data-bm="home"] main > #contact { order: 18; }
html[data-bm="home"] main > .md, html[data-bm="home"] main > .lb { order: 30; }

/* ── section canvas: cream / white / midnight, no graph paper ───────────── */
html[data-bm="home"] .sec { padding: clamp(76px, 9vw, 128px) 0; position: relative; border: 0; }
html[data-bm="home"] .sec-alt, html[data-bm="home"] .sec-white { background: var(--pr-cream) none; border: 0; }
html[data-bm="home"] #about, html[data-bm="home"] #subjects, html[data-bm="home"] #results,
html[data-bm="home"] #gallery, html[data-bm="home"] #vision, html[data-bm="home"] #faq { background: #fff none; }
html[data-bm="home"] #method, html[data-bm="home"] #classes, html[data-bm="home"] #lessons, html[data-bm="home"] #reviews,
html[data-bm="home"] #events, html[data-bm="home"] #locations, html[data-bm="home"] #contact { background: var(--pr-cream) none; }

/* ── headings ──────────────────────────────────────────────────────────── */
html[data-bm="home"] .sx-head, html[data-bm="home"] .sx-head.is-center { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); text-align: left; }
html[data-bm="home"] .sx-kicker, html[data-bm="home"] .tc-copy .sx-kicker, html[data-bm="home"] .faq-side .sx-kicker {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; margin: 0 0 18px; border-radius: 999px;
    font-family: var(--pr-body); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--pr-gold-d); background: rgba(245,179,1,.13); transform: none; clip-path: none; }
html[data-bm="home"] .sx-kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pr-gold); }
html[data-bm="home"] .sx-title, html[data-bm="home"] .tc-copy .sx-title, html[data-bm="home"] .faq-side .sx-title {
    font-family: var(--pr-display); font-size: clamp(30px, 3.7vw, 50px); font-weight: 800; line-height: 1.14; letter-spacing: -.02em; color: var(--pr-ink); }
html[data-bm="home"] .sx-head .sx-title::after, html[data-bm="home"] .tc-copy .sx-title::after, html[data-bm="home"] .faq-side .sx-title::after {
    content: ''; display: block; width: 64px; height: 4px; margin-top: 20px; border-radius: 4px; background: linear-gradient(90deg, var(--pr-gold), var(--pr-gold-2)); background-size: auto; }
html[data-bm="home"] .sx-sub { margin-top: 18px; font-size: 17px; line-height: 1.75; color: var(--pr-muted); max-width: 620px; }
html[data-bm="home"] .hand { font-family: var(--pr-body); color: inherit; }

/* ── buttons ───────────────────────────────────────────────────────────── */
html[data-bm="home"] .btn { border-radius: 999px; font-family: var(--pr-body); font-weight: 700; letter-spacing: .01em; }
html[data-bm="home"] .btn-gold { background: linear-gradient(135deg, var(--pr-gold-2), var(--pr-gold) 55%, #e9a400); color: var(--pr-mid); border: 0;
    box-shadow: 0 14px 30px -14px rgba(245,179,1,.75), inset 0 1px 0 rgba(255,255,255,.45); }
html[data-bm="home"] .btn-gold:hover { color: var(--pr-mid); filter: saturate(1.1) brightness(1.04); }
html[data-bm="home"] .btn-navy { background: var(--pr-mid); color: #fff; border: 0; }
html[data-bm="home"] .btn-navy:hover { background: var(--pr-navy); color: #fff; }
html[data-bm="home"] .btn-outline { background: transparent; color: var(--pr-ink); border: 1.5px solid rgba(11,21,48,.18); }
html[data-bm="home"] .btn-outline:hover { background: var(--pr-ink); color: #fff; border-color: var(--pr-ink); }
html[data-bm="home"] .btn i.fa-arrow-right { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px;
    background: rgba(5,11,31,.12); margin-right: -6px; }
html[data-bm="home"] .btn-navy i.fa-arrow-right { background: rgba(255,255,255,.14); }

/* ── header: white glass ───────────────────────────────────────────────── */
html[data-bm="home"] .tb { background: var(--pr-mid); }
html[data-bm="home"] .hd { background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(11,21,48,.06); }
html[data-bm="home"] .hd-in { height: 80px; transition: height .3s var(--pr-ease); }
html[data-bm="home"] .hd.is-stuck .hd-in { height: 66px; }
html[data-bm="home"] .hd-logo img { height: 52px; transition: height .3s var(--pr-ease); }
html[data-bm="home"] .hd.is-stuck .hd-logo img { height: 44px; }
html[data-bm="home"] .hd-nav a { font-family: var(--pr-body); font-weight: 600; font-size: 14.5px; color: var(--pr-ink); }
html[data-bm="home"] .hd-nav a::after { background: var(--pr-gold) !important; height: 3px !important; border-radius: 3px; bottom: 0 !important; }

/* ════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════ */
html[data-bm="home"] .px-hero { background: radial-gradient(1200px 700px at 78% 30%, #10325f 0%, #081a3a 45%, var(--pr-mid) 80%); padding-top: clamp(54px, 7vw, 96px); }
html[data-bm="home"] .px-bg::before { opacity: .45; }
html[data-bm="home"] .px-bg .g1 { background: rgba(42,138,224,.38); }
html[data-bm="home"] .pr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
html[data-bm="home"] .pr-spot { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
    background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%), rgba(245,179,1,.10), transparent 60%); }
html[data-bm="home"] .px-hero:hover .pr-spot { opacity: 1; }
html[data-bm="home"] .px-eyebrow { font-family: var(--pr-body); font-weight: 700; letter-spacing: .04em; }
html[data-bm="home"] .px-title { font-family: var(--pr-display); font-size: clamp(34px, 4.1vw, 58px); font-weight: 800; line-height: 1.16; letter-spacing: -.02em; }
html[data-bm="home"] .px-title .hl { background: linear-gradient(100deg, var(--pr-gold-2), var(--pr-gold) 45%, #ffb703 60%, var(--pr-gold-2));
    background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-bm="home"] .px-title .hl::after { z-index: 0; bottom: -.06em; opacity: .9; }
html[data-bm="home"] .px-lead { font-size: 17.5px; color: rgba(255,255,255,.74); }
html[data-bm="home"] .px-stats b { font-family: var(--pr-display); font-size: 38px; }
html[data-bm="home"] .btn.px-ghost { border-color: rgba(255,255,255,.28); }

/* the photo: an arch with an orbit */
html[data-bm="home"] .px-disc { left: 50%; bottom: 0; width: min(76%, 430px); height: 86%; aspect-ratio: auto; border-radius: 999px 999px 34px 34px;
    background:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 30px 30px,
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 30px 30px,
        linear-gradient(170deg, #2a8ae0 0%, #0e5aa8 42%, #0b3a70 78%, #081a3a 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 0 12px rgba(255,255,255,.03), 0 50px 90px -30px rgba(0,0,0,.7); }
html[data-bm="home"] .px-ring { left: 50%; bottom: 8%; width: min(104%, 600px); aspect-ratio: 1; margin-left: calc(min(104%, 600px) / -2);
    border: 1.5px solid rgba(245,179,1,.28); border-style: dashed; }
html[data-bm="home"] .px-ring::after { content: ''; position: absolute; top: 50%; left: -7px; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    background: var(--pr-gold); box-shadow: 0 0 0 6px rgba(245,179,1,.18), 0 0 24px rgba(245,179,1,.8); }
html[data-bm="home"] .px-stage.is-photo .px-photo { width: min(70%, 400px); border-radius: 999px 999px 30px 30px; aspect-ratio: 4 / 5; margin-bottom: 7%; border-width: 5px; }
html[data-bm="home"] .px-mark { width: min(44%, 250px); margin-bottom: 26%; }
html[data-bm="home"] .px-tag { border-radius: 16px; font-family: var(--pr-body); box-shadow: 0 24px 50px -18px rgba(0,0,0,.6), 0 0 0 1px rgba(11,21,48,.04); }
html[data-bm="home"] .px-tag-name b { font-family: var(--pr-display); font-size: 16px; }
html[data-bm="home"] .px-chip { font-family: var(--pr-display); }
html[data-bm="home"] .px-wave { fill: var(--pr-gold); }

/* ── topics strip ──────────────────────────────────────────────────────── */
html[data-bm="home"] .pr-marquee { position: relative; overflow: hidden; background: var(--pr-gold); color: var(--pr-mid); padding: 14px 0 16px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
html[data-bm="home"] .pr-track { display: flex; width: max-content; align-items: center; gap: 26px; white-space: nowrap; }
html[data-bm="home"] .pr-track span { font-family: var(--pr-display); font-size: clamp(18px, 2vw, 24px); font-weight: 800; letter-spacing: -.01em; }
html[data-bm="home"] .pr-track i { font-style: normal; font-size: 13px; opacity: .55; }

/* ── about Sir ─────────────────────────────────────────────────────────── */
html[data-bm="home"] .tc { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 100px); }
html[data-bm="home"] .tc-photo { position: relative; padding: 0; }
html[data-bm="home"] .tc-photo::before { content: ''; position: absolute; inset: 22px -22px -22px 22px; border-radius: 999px 999px 32px 32px;
    border: 2px solid var(--pr-gold); z-index: 0; }
html[data-bm="home"] .tc-photo::after { display: none !important; }
html[data-bm="home"] .tc-photo img, html[data-bm="home"] .tc-ph { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: 999px 999px 32px 32px; box-shadow: var(--pr-sh-hi); }
html[data-bm="home"] .tc-ph { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: radial-gradient(500px 400px at 50% 20%, #10325f, var(--pr-mid)) !important; }
html[data-bm="home"] .tc-ph b { font-family: var(--pr-display); font-size: clamp(70px, 9vw, 110px); font-weight: 800; letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--pr-gold-2), var(--pr-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-bm="home"] .tc-ph em { font-family: var(--pr-sign); font-style: normal; font-size: 34px; color: rgba(255,255,255,.85); clip-path: none; }
html[data-bm="home"] .tc-role { display: inline-block; margin-top: 16px; padding: 6px 14px; border-radius: 999px; background: var(--pr-mid); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .04em; }
html[data-bm="home"] .tc-text { margin-top: 22px; font-size: 16.5px; line-height: 1.85; color: var(--pr-text); }
html[data-bm="home"] .tc-quote { position: relative; margin-top: 30px; padding: 24px 28px 24px 64px !important; border: 0 !important;
    background: var(--pr-cream) !important; border-radius: 20px; font-family: var(--pr-display) !important; font-style: italic !important;
    font-size: clamp(18px, 1.8vw, 22px) !important; font-weight: 600; line-height: 1.55; color: var(--pr-ink) !important; clip-path: none !important; }
html[data-bm="home"] .tc-quote::before { content: '\201C'; position: absolute; left: 18px; top: 2px; font-family: var(--pr-display); font-size: 72px;
    line-height: 1; color: var(--pr-gold); }
html[data-bm="home"] .tc-sign { margin-top: 22px; font-family: var(--pr-sign); font-size: clamp(38px, 4vw, 52px); color: var(--pr-navy); line-height: 1;
    transform: rotate(-3deg); transform-origin: left; }

/* ── method ────────────────────────────────────────────────────────────── */
html[data-bm="home"] .pr-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 32px); counter-reset: none; }
html[data-bm="home"] .pr-steps::before { content: ''; position: absolute; left: 8%; right: 8%; top: 62px; height: 2px; z-index: 0;
    background: repeating-linear-gradient(90deg, var(--pr-gold) 0 10px, transparent 10px 18px); transform-origin: left; }
html[data-bm="home"] .pr-step { position: relative; z-index: 1; padding: 34px 30px 32px; background: #fff; border-radius: var(--pr-r); border: 1px solid var(--pr-line);
    box-shadow: var(--pr-sh); }
html[data-bm="home"] .pr-step-n { position: absolute; right: 24px; top: 18px; font-family: var(--pr-display); font-size: 64px; font-weight: 800; line-height: 1;
    color: transparent; -webkit-text-stroke: 1.5px rgba(245,179,1,.55); }
html[data-bm="home"] .pr-step-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 24px;
    background: var(--pr-mid); color: var(--pr-gold); box-shadow: 0 14px 28px -14px rgba(5,11,31,.7); }
html[data-bm="home"] .pr-step h3 { margin-top: 26px; font-family: var(--pr-display); font-size: 28px; font-weight: 800; color: var(--pr-ink); }
html[data-bm="home"] .pr-step p { margin-top: 10px; font-size: 15.5px; line-height: 1.75; color: var(--pr-muted); }
@media (max-width: 860px) { html[data-bm="home"] .pr-steps { grid-template-columns: 1fr; } html[data-bm="home"] .pr-steps::before { display: none; } }

/* ── cards: classes, subjects, lessons, results, reviews… ──────────────── */
html[data-bm="home"] .cl-card, html[data-bm="home"] .sj-card, html[data-bm="home"] .vd, html[data-bm="home"] .rs,
html[data-bm="home"] .ts, html[data-bm="home"] .vm-card, html[data-bm="home"] .ev, html[data-bm="home"] .lc, html[data-bm="home"] .faq-item {
    border-radius: var(--pr-r) !important; border: 1px solid var(--pr-line) !important; box-shadow: var(--pr-sh) !important; background: #fff; }
html[data-bm="home"] .cl-card { padding: 32px 30px 26px !important; border-left: 1px solid var(--pr-line) !important; position: relative; overflow: hidden; }
html[data-bm="home"] .cl-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--pr-navy), var(--pr-blue), var(--pr-gold)); }
html[data-bm="home"] .cl-card h3 { font-family: var(--pr-display); font-size: 23px; font-weight: 800; color: var(--pr-ink); line-height: 1.25; }
html[data-bm="home"] .cl-card p { color: var(--pr-muted); line-height: 1.75; }
html[data-bm="home"] .cl-tags li { border-radius: 999px !important; background: var(--pr-cream) !important; color: var(--pr-text) !important; font-weight: 600; padding: 5px 12px !important; }
html[data-bm="home"] .cl-link { border-top: 1px dashed var(--pr-line); color: var(--pr-navy); font-weight: 700; }
html[data-bm="home"] .cl-link i { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--pr-gold); color: var(--pr-mid); font-size: 12px; }

/* cursor glow on cards (personal.js sets --gx / --gy) */
html[data-bm="home"] .pr-glow { position: relative; isolation: isolate; }
html[data-bm="home"] .pr-glow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .35s;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(245,179,1,.14), transparent 60%); }
html[data-bm="home"] .pr-glow:hover::after { opacity: 1; }
html[data-bm="home"] .cl-card:hover, html[data-bm="home"] .sj-card:hover, html[data-bm="home"] .vd:hover, html[data-bm="home"] .pr-step:hover,
html[data-bm="home"] .ts:hover, html[data-bm="home"] .rs:hover { transform: translateY(-6px); box-shadow: var(--pr-sh-hi) !important; border-color: rgba(245,179,1,.45) !important; }
html[data-bm="home"] .cl-card, html[data-bm="home"] .sj-card, html[data-bm="home"] .vd, html[data-bm="home"] .pr-step, html[data-bm="home"] .ts, html[data-bm="home"] .rs {
    transition: transform .45s var(--pr-ease), box-shadow .45s var(--pr-ease), border-color .3s; }

html[data-bm="home"] .sj-card { overflow: hidden; }
html[data-bm="home"] .sj-body b { font-family: var(--pr-display); font-size: 26px; color: var(--pr-ink); }
html[data-bm="home"] .vd-thumb { border-radius: calc(var(--pr-r) - 6px); margin: 8px 8px 0; }
html[data-bm="home"] .vd-play { background: var(--pr-gold) !important; color: var(--pr-mid) !important; }
html[data-bm="home"] .vd-body b { font-family: var(--pr-body); font-weight: 700; color: var(--pr-ink); }
html[data-bm="home"] .ts-msg { font-family: var(--pr-display); font-style: italic; font-size: 17px; color: var(--pr-ink); }
html[data-bm="home"] .ts-stars { color: var(--pr-gold); }

/* ── "what we do": midnight, glass cards ───────────────────────────────── */
html[data-bm="home"] #why.sec-navy { background:
        radial-gradient(800px 400px at 10% 0%, rgba(42,138,224,.22), transparent 60%),
        radial-gradient(700px 380px at 95% 100%, rgba(245,179,1,.12), transparent 60%),
        var(--pr-mid) !important; border: 0 !important; }
html[data-bm="home"] #why .sx-kicker { color: var(--pr-gold-2); background: rgba(245,179,1,.12); }
html[data-bm="home"] #why .sx-title { color: #fff; }
html[data-bm="home"] #why .why-grid { gap: 18px; background: transparent; border: 0; }
html[data-bm="home"] #why .why { padding: 28px 26px !important; border-radius: var(--pr-r); border: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(255,255,255,.035) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: transform .45s var(--pr-ease), background .3s, border-color .3s; }
html[data-bm="home"] #why .why:hover { transform: translateY(-5px); background: rgba(255,255,255,.06) !important; border-color: rgba(245,179,1,.35) !important; }
html[data-bm="home"] #why .why-ico { width: 52px; height: 52px; border-radius: 15px; border: 0; background: linear-gradient(135deg, var(--pr-gold-2), var(--pr-gold)); color: var(--pr-mid); }
html[data-bm="home"] #why .why h3 { font-family: var(--pr-body) !important; font-size: 18px !important; font-weight: 800; color: #fff !important; clip-path: none !important; animation: none !important; }
html[data-bm="home"] #why .why p { color: rgba(255,255,255,.66) !important; opacity: 1 !important; animation: none !important; }

/* ── gallery: clean rounded tiles (no polaroid tilt) ───────────────────── */
html[data-bm="home"] .gl-item { padding: 0 !important; border-radius: var(--pr-r) !important; overflow: hidden !important; transform: none; box-shadow: var(--pr-sh) !important; }
html[data-bm="home"] .gl-item img { aspect-ratio: 4 / 3; transition: transform .8s var(--pr-ease); }
html[data-bm="home"] .gl-item:hover img { transform: scale(1.06); }
html[data-bm="home"] .gl-cap { inset: auto 0 0 0 !important; padding: 40px 18px 16px !important; font-family: var(--pr-body) !important; font-size: 14px !important;
    color: #fff !important; background: linear-gradient(transparent, rgba(5,11,31,.75)) !important; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
html[data-bm="home"] .faq-item summary { font-family: var(--pr-body); font-weight: 700; color: var(--pr-ink); }
html[data-bm="home"] .faq-item[open] { border-color: rgba(245,179,1,.5) !important; box-shadow: var(--pr-sh-hi) !important; }
html[data-bm="home"] .faq-help { border-radius: var(--pr-r); background: var(--pr-mid); }

/* ── call to action: a dark panel with gold light ──────────────────────── */
html[data-bm="home"] .cta { background: var(--pr-cream); padding: clamp(30px, 4vw, 56px) 0; }
html[data-bm="home"] .cta-in { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(40px, 5vw, 64px) clamp(28px, 5vw, 64px) !important;
    background: radial-gradient(600px 300px at 90% 120%, rgba(245,179,1,.35), transparent 60%), radial-gradient(500px 300px at 0% 0%, rgba(42,138,224,.35), transparent 60%), var(--pr-mid);
    box-shadow: var(--pr-sh-hi); }
html[data-bm="home"] .cta h2 { font-family: var(--pr-display) !important; font-size: clamp(30px, 3.6vw, 46px) !important; font-weight: 800; color: #fff; clip-path: none !important; animation: none !important; }
html[data-bm="home"] .cta p { color: rgba(255,255,255,.72); opacity: 1 !important; animation: none !important; }
html[data-bm="home"] .cta .cta-btns { opacity: 1 !important; animation: none !important; }

/* ── contact + footer ──────────────────────────────────────────────────── */
html[data-bm="home"] .ct-item { border-radius: 18px !important; background: #fff; border: 1px solid var(--pr-line); }
html[data-bm="home"] .ct-item span { background: var(--pr-mid) !important; color: var(--pr-gold) !important; border-radius: 14px !important; }
html[data-bm="home"] .ct-form { border-radius: 26px !important; border: 1px solid var(--pr-line) !important; box-shadow: var(--pr-sh-hi) !important; }
html[data-bm="home"] .ct-form h3 { font-family: var(--pr-display); font-size: 26px; }
html[data-bm="home"] .form input, html[data-bm="home"] .form textarea { border-radius: 12px !important; border-color: var(--pr-line) !important; background: var(--pr-cream) !important; }
html[data-bm="home"] .form input:focus, html[data-bm="home"] .form textarea:focus { border-color: var(--pr-gold) !important; box-shadow: 0 0 0 4px rgba(245,179,1,.18) !important; background: #fff !important; }
html[data-bm="home"] .ft { background: var(--pr-mid); border-top: 0; }
html[data-bm="home"] .ft h4 { font-family: var(--pr-display); font-size: 19px; }
html[data-bm="home"] .ft h4::after { background: var(--pr-gold); }

/* ── phones ────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    html[data-bm="home"] .tc { grid-template-columns: 1fr; }
    html[data-bm="home"] .tc-photo { max-width: 380px; margin: 0 auto 10px; width: calc(100% - 30px); }
}
@media (max-width: 600px) {
    html[data-bm="home"] .sec { padding: 64px 0; }
    html[data-bm="home"] .hd-logo img { height: 42px; }
    html[data-bm="home"] .px-title { font-size: 36px; }
    html[data-bm="home"] .cta-in { border-radius: 24px; }
}

/* ════════════════════════════════════════════════════════════════════════
   MOTION (only when the device allows it)
   ════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
    @keyframes prMarq { to { transform: translateX(-50%); } }
    @keyframes prOrbit { to { transform: rotate(360deg); } }
    @keyframes prShine { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
    @keyframes prLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    @keyframes prBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    @keyframes prSign { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -5% -20% 0); } }
    @keyframes prFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

    html[data-bm="home"] .pr-track { animation: prMarq 38s linear infinite; }
    html[data-bm="home"] .pr-marquee:hover .pr-track { animation-play-state: paused; }
    html[data-bm="home"] .px-ring { animation: prOrbit 26s linear infinite !important; }
    html[data-bm="home"] .px-title .hl { animation: pxUp .8s cubic-bezier(.16,1,.3,1) .22s both, prShine 6s linear 1.4s infinite; }

    /* reveal: rise out of a soft blur */
    html[data-bm="home"].js .rv, html[data-bm="home"] .js .rv { opacity: 0; transform: translateY(34px); filter: blur(6px);
        transition: opacity .9s var(--pr-ease), transform 1s var(--pr-ease), filter .9s var(--pr-ease); transition-delay: var(--d, 0ms); }
    html[data-bm="home"].js .rv.in, html[data-bm="home"] .js .rv.in { opacity: 1; transform: none; filter: none; }
    html[data-bm="home"] .rv .sx-title::after { transform: scaleX(0); transform-origin: left; transition: transform .9s var(--pr-ease) .35s; }
    html[data-bm="home"] .rv.in .sx-title::after { transform: scaleX(1); }

    /* method: the dashed line runs across once the steps are in view */
    html[data-bm="home"] .pr-steps::before { transform: scaleX(0); transition: transform 1.4s var(--pr-ease) .3s; }
    html[data-bm="home"] .pr-steps.pr-in::before { transform: scaleX(1); }
    html[data-bm="home"] .pr-step-ic { transition: transform .5s cubic-bezier(.3,.8,.3,1.4); }
    html[data-bm="home"] .pr-step:hover .pr-step-ic { transform: rotate(-8deg) scale(1.08); }

    /* about: the arch frame slides into place, the signature is written */
    html[data-bm="home"] .tc-photo::before { transition: transform 1.2s var(--pr-ease) .2s; transform: translate(-22px, -22px); }
    html[data-bm="home"] .tc-photo.in::before { transform: none; }
    html[data-bm="home"] .tc-copy .tc-sign { clip-path: inset(-20% 100% -20% 0); }
    html[data-bm="home"] .tc-copy.in .tc-sign { animation: prSign 1.8s cubic-bezier(.5,.1,.3,1) .9s both; }
    html[data-bm="home"] .tc-ph b { animation: prFloat 6s ease-in-out infinite; }

    /* cards rise a little more when the pointer is on them */
    html[data-bm="home"] .cl-link i, html[data-bm="home"] .btn i.fa-arrow-right { transition: transform .3s cubic-bezier(.3,.8,.3,1.4); }
    html[data-bm="home"] .cl-card:hover .cl-link i, html[data-bm="home"] .btn:hover i.fa-arrow-right { transform: translateX(4px) rotate(-45deg); }
}

/* headlines in the display face — matches the strength of home.css's
   "html[data-bm] body :is(h1, h2 …)" font rule, and wins by coming later */
html[data-bm="home"] body :is(.sx-title, .px-title, .pr-step h3, .cl-card h3, .sj-body b, .tc-quote, .cta h2, .ct-form h3, .ft h4,
    .px-tag-name b, .px-stats b, .tc-ph b, .pr-track span, .ts-msg, .vm-card h3) { font-family: var(--pr-display); }
html[data-bm="home"] body :is(.btn, .hd-nav a, .sx-kicker, .tc-role, .faq-item summary, .cl-link, .vd-body b) { font-family: var(--pr-body); }
html[data-bm="home"] .pr-steps { list-style: none; margin: 0; padding: 0; }
html[data-bm="home"] .pr-step::marker { content: none; }
/* home.css's heading rule reads var(--head); giving the headline elements
   their own --head makes that rule draw them in the display face too */
html[data-bm="home"] :is(.sx-title, .px-title, .pr-step h3, .cl-card h3, .sj-body b, .tc-quote, .cta h2, .ct-form h3, .ft h4,
    .px-tag-name b, .px-stats b, .tc-ph b, .pr-track span, .ts-msg, .vm-card h3) { --head: var(--pr-display); --ca-head: var(--pr-display); --ca-font: var(--pr-display); }
/* one back-to-top button (the motion layer's, with its progress ring) */
html[data-bm="home"] .to-top { display: none !important; }

/* ════════════════════════════════════════════════════════════════════════
   GALLERY — bento grid: one large tile, wide tiles, captions that rise
   ════════════════════════════════════════════════════════════════════════ */
html[data-bm="home"] #gallery .gl { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 230px); grid-auto-flow: dense; gap: 16px; }
html[data-bm="home"] #gallery .gl-item { position: relative; display: block; width: 100%; height: 100%; padding: 0 !important; margin: 0; border: 0;
    border-radius: var(--pr-r) !important; overflow: hidden !important; background: var(--pr-mid); cursor: zoom-in; box-shadow: var(--pr-sh) !important; transform: none; }
html[data-bm="home"] #gallery .gl-item:nth-child(9n+1) { grid-column: span 2; grid-row: span 2; }
/* 9 tiles = one 2x2 + four wide + four single = exactly 4 full rows of 4 */
html[data-bm="home"] #gallery .gl-item:nth-child(9n+4), html[data-bm="home"] #gallery .gl-item:nth-child(9n+5), html[data-bm="home"] #gallery .gl-item:nth-child(9n+6), html[data-bm="home"] #gallery .gl-item:nth-child(9n) { grid-column: span 2; }
html[data-bm="home"] #gallery .gl-item img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
    transition: transform 1s var(--pr-ease), filter .6s; }
html[data-bm="home"] #gallery .gl-item:hover img { transform: scale(1.07); filter: saturate(1.1); }
html[data-bm="home"] #gallery .gl-cap { position: absolute; inset: auto 0 0 0 !important; z-index: 2; display: flex !important; flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 60px 20px 18px !important; text-align: left; white-space: normal !important; opacity: 1 !important; transform: none !important;
    background: linear-gradient(transparent, rgba(5,11,31,.82)) !important; color: #fff !important; font-family: var(--pr-body) !important; }
html[data-bm="home"] #gallery .gl-cap b { font-family: 'Noto Sans Sinhala', var(--pr-body); font-size: 15px; font-weight: 700; line-height: 1.4;
    transform: translateY(8px); opacity: .92; transition: transform .5s var(--pr-ease), opacity .5s; }
html[data-bm="home"] #gallery .gl-item:nth-child(9n+1) .gl-cap b { font-size: 19px; }
html[data-bm="home"] #gallery .gl-cat { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; background: var(--pr-gold); color: var(--pr-mid); }
html[data-bm="home"] #gallery .gl-cap i { display: grid !important; position: absolute; right: 16px; bottom: 16px; width: 38px; height: 38px; place-items: center;
    border-radius: 50%; background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 14px;
    opacity: 0; transform: scale(.7); transition: opacity .35s, transform .45s cubic-bezier(.3,.8,.3,1.4); }
html[data-bm="home"] #gallery .gl-item:hover .gl-cap i { opacity: 1; transform: none; }
html[data-bm="home"] #gallery .gl-item:hover .gl-cap b { transform: none; opacity: 1; }
html[data-bm="home"] #gallery .gl-item:focus-visible { outline: 3px solid var(--pr-gold); outline-offset: 3px; }
html[data-bm="home"] #gallery .sec-more { margin-top: 36px; }
@media (max-width: 900px) {
    html[data-bm="home"] #gallery .gl { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: 12px; }
    /* 9 tiles = one 2x2 + four wide + four single = exactly 4 full rows of 4 */
html[data-bm="home"] #gallery .gl-item:nth-child(9n+4), html[data-bm="home"] #gallery .gl-item:nth-child(9n+5), html[data-bm="home"] #gallery .gl-item:nth-child(9n+6), html[data-bm="home"] #gallery .gl-item:nth-child(9n) { grid-column: span 2; }
}
@media (max-width: 520px) {
    html[data-bm="home"] #gallery .gl { grid-auto-rows: 140px; }
    html[data-bm="home"] #gallery .gl-cap { padding: 40px 12px 12px !important; }
    html[data-bm="home"] #gallery .gl-cap b { font-size: 12.5px; }
    html[data-bm="home"] #gallery .gl-cat { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    /* tiles open like a curtain, one after another */
    html[data-bm="home"].js #gallery .gl-item.rv { opacity: 1; filter: none; transform: none; clip-path: inset(100% 0 0 0 round var(--pr-r));
        transition: clip-path 1.1s cubic-bezier(.7,0,.2,1) var(--d, 0ms); }
    html[data-bm="home"].js #gallery .gl-item.rv img { transform: scale(1.25); transition: transform 1.6s var(--pr-ease) var(--d, 0ms); }
    html[data-bm="home"].js #gallery .gl-item.rv.in { clip-path: inset(0 0 0 0 round var(--pr-r)); }
    html[data-bm="home"].js #gallery .gl-item.rv.in img { transform: none; }
}