/* ═══════════════════════════════════════════════════════════════
   Repdoc — homepage styles
   Design system: design-system/repdoc/MASTER.md

   Load order: tokens.css → shell.css → home.css.
   Tokens/reset/buttons live in tokens.css, the site chrome (header,
   nav, footer) in shell.css. Only homepage-specific layout belongs here.
   ═══════════════════════════════════════════════════════════════ */

/* ── Counter-Glass world (Bangla replacement, seed 93b44eab) ────
   Homepage-only skin: white counter glass, ink keylines, enamel green
   boards, one stamp red for stamps/pins/highlights, sign yellow sparing.
   Tool pages keep the incumbent tokens. */
:root {
    --bg-base:      #FFFEFB;
    --bg-surface:   #FFFFFF;
    --bg-muted:     #E9F2EC;
    --bg-elevated:  #FFFFFF;
    --text-primary: #12211D;
    --text-muted:   #4A5A54;
    --primary:       #0E6B4A;
    --primary-hover:#0A4F37;
    --primary-light:#DDEEE5;
    --accent:        #C1272D;
    --accent-deep:   #8E1B20;
    --sign:          #F2B705;
    --border-color: #D5DDD8;
    --border-strong:#A9B8B1;
    --border-focus: #0E6B4A;
    --on-accent:    #FFFFFF;
}
[data-theme="dark"] {
    --bg-base:      #FFFEFB;
    --bg-surface:   #FFFFFF;
    --bg-muted:     #E9F2EC;
    --bg-elevated:  #FFFFFF;
    --text-primary: #12211D;
    --text-muted:   #4A5A54;
    --primary:       #0E6B4A;
    --primary-hover:#0A4F37;
    --primary-light:#DDEEE5;
    --accent:        #C1272D;
    --accent-deep:   #8E1B20;
    --sign:          #F2B705;
    --border-color: #D5DDD8;
    --border-strong:#A9B8B1;
    --border-focus: #0E6B4A;
    --on-accent:    #FFFFFF;
}
/* Single-look site: the dark attribute is intentionally neutralised above —
   the homepage always renders the light Counter-Glass world. */

body { background: var(--bg-base); color: var(--text-primary); }

/* Red margin rail down the page edge (gutter only, ≥1100px). */
body::before, body::after {
    content: "";
    position: fixed;
    top: 0; bottom: 0;
    z-index: 60;
    pointer-events: none;
    display: none;
}
@media (min-width: 1100px) {
    body::before, body::after { display: block; }
    body::before { left: 16px; width: 3px; background: var(--primary); }
    body::after { left: 23px; width: 1px; background: var(--border-strong); }
}

/* Ledger buttons + flatter controls across the homepage. */
.btn { border-radius: 8px; }
.btn-ledger {
    background: var(--primary); color: var(--on-accent);
    border: 2px solid var(--text-primary);
    box-shadow: 3px 3px 0 var(--text-primary);
}
.btn-ledger:hover { background: var(--primary-hover); color: var(--on-accent); }
.btn-ledger:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text-primary); }
.btn-ledger-outline {
    background: transparent; color: var(--text-primary);
    border: 2px solid var(--text-primary);
    box-shadow: 3px 3px 0 var(--text-primary);
}
.btn-ledger-outline:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-ledger-outline:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text-primary); }

/* ── Hero: register header ───────────────────────────────────── */
.hero {
    padding: var(--space-6) 0 var(--space-5);
    background: var(--bg-base);
    background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--border-color) 31px 32px);
    border-bottom: 2px solid var(--text-primary);
}
.hero-ledger-inner { max-width: var(--container); }
.reg-kicker {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: var(--space-3);
    font-family: var(--font-mono);
    font-size: .78rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-muted);
}
.reg-no {
    padding: 3px 10px;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    transform: rotate(-2deg);
}
.reg-title {
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-wrap: balance;
    text-align: center;
}
.reg-title-accent { display: block; color: var(--primary); }
.reg-rule {
    display: block;
    width: 160px; height: 6px;
    margin: var(--space-3) auto 0;
    background: var(--primary);
    border-radius: 3px;
}
.reg-sub { margin: var(--space-3) auto 0; max-width: 620px; text-align: center; color: var(--text-muted); font-size: 1.02rem; }
.reg-note { display: flex; justify-content: center; margin-top: var(--space-3); }
.reg-cta { justify-content: center; margin-top: var(--space-4); }
/* Headline is page-centred; the transparent hero art tucks into the
   right gutter so it never pushes the headline off-centre. */
.reg-hero-main {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 210px;
    gap: var(--space-5);
}
.reg-hero-title { min-width: 0; }
/* Inlined unDraw plates (see illus/ATTRIBUTION.md): ink follows the text
   colour, the accent follows the ledger red, paper follows the surface —
   both themes hold with no filters. */
.illus { display: block; width: 100%; height: auto; }
.illus .f-ink { fill: currentColor; }
.illus .f-accent { fill: var(--primary); }
.illus .f-wash { fill: currentColor; }
.illus .f-wash2 { fill: currentColor; }
.illus .f-paper { fill: var(--bg-surface); }
.illus .f-skin { fill: currentColor; }
.reg-hero-art {
    position: absolute; right: 0; top: 50%;
    width: min(28%, 300px);
    margin: 0;
    transform: translateY(-50%);
}
.reg-hero-art .illus { width: 100%; }
/* Hero art is transparent line-and-colour work: no frame, it sits on the glass. */
.reg-hero-art .hero-photo { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.hero-photo { border: 2px solid var(--text-primary); border-radius: 6px; box-shadow: 4px 4px 0 var(--text-primary); }
.empty-illus { width: 132px; margin: 0 auto var(--space-3); }
.empty-photo { border: 2px solid var(--text-primary); border-radius: 6px; }

.hero-note {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: var(--space-4);
    font-size: .88rem;
    color: var(--text-muted);
}
.hero-note .icon { width: 16px; height: 16px; color: var(--primary); }
.hero-note a { color: var(--primary); font-weight: 600; text-decoration: underline; }

.category-chips {
    display: flex; flex-wrap: wrap; justify-content: flex-start;
    gap: 8px; margin-top: 0; margin-bottom: var(--space-6);
}
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-surface);
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast),
                background var(--transition-fast), transform var(--transition-fast);
}
.chip:hover { color: var(--text-primary); border-color: var(--text-primary); }
.chip:active { transform: translateY(1px); }
.chip.is-active, .chip[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--text-primary);
    color: var(--on-accent);
    font-weight: 600;
    /* Relief-lock selection: active category lifts with a warm edge. */
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--text-primary);
    outline: 2px solid var(--sign);
    outline-offset: 1px;
}

/* Category pills: white capsules with icon, dark-green when selected. */
.chip-cat {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border: 1px solid #D9E8DF;
    border-radius: 999px;
    background: #fff;
    color: #33503F;
    font-size: .88rem; font-weight: 600;
    box-shadow: 0 1px 2px rgba(14, 107, 74, .04);
}
.chip-cat .icon { width: 16px; height: 16px; }
.chip-cat:hover { border-color: #A9CDB8; color: var(--primary); }
.chip-cat.is-active, .chip-cat[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: none;
    box-shadow: none;
    outline: none;
}

/* ── Hero CTA row ────────────────────────────────────────────── */
.hero-cta {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 12px; margin-top: var(--space-6);
}

/* ── Header view counter (after logo) ────────────────────────── */
.header-view-count {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: .78rem; font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: 999px;
    white-space: nowrap;
}
.header-view-count .icon { width: 15px; height: 15px; color: var(--primary); }
.header-view-count .hvc-label { color: var(--text-muted); font-weight: 500; }
.header-view-count .hvc-value { color: var(--text-primary); font-weight: 700; }
.header-view-count .hvc-sep { color: var(--border-strong); }

@media (max-width: 640px) {
    .header-view-count { font-size: .7rem; padding: 4px 9px; gap: 6px; }
    .header-view-count .hvc-label { display: none; }
}

/* ── Sections ────────────────────────────────────────────────── */
.section { padding: var(--space-8) 0; }
.section-alt { background: var(--bg-surface); border-block: 1px solid var(--border-color); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.section-head h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: 0; }
.section-sub { margin-top: 6px; color: var(--text-muted); font-size: .96rem; }

/* Ad layout was removed from the homepage — no ad slots render here. */
.kicker {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 8px;
    font-size: .74rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--primary);
}
.kicker::before {
    content: "";
    width: 22px; height: 4px; flex: 0 0 auto;
    border-radius: var(--radius-full);
    background: var(--primary);
}
/* ── Tool index: card tiles + featured panel ────────────────────
   Reference comp: pill category chips, white rounded tool tiles
   (icon tile, name + badge, quiet arrow) beside a mint featured
   panel that carries its own paper-stack illustration. */
.tools-section {
    background:
        radial-gradient(58% 46% at 0% 100%, rgba(14, 107, 74, .06), transparent 70%),
        linear-gradient(180deg, #FAFDFB 0%, #FFFEFB 62%);
}
.tools-section .section-head { margin-bottom: var(--space-5); }
.tools-section h2 { font-size: clamp(1.65rem, 2.9vw, 2.15rem); }
.tools-section .section-sub { max-width: 560px; line-height: 1.65; }
.tools-section .category-chips { gap: 10px; margin-bottom: var(--space-5); }

.dir-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.dir-main { min-width: 0; }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.tool-card.tool-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 13px;
    padding: 16px;
    background: #fff;
    border: 1px solid #DCEBE2;
    border-radius: 14px;
    box-shadow: 0 2px 3px -2px rgba(15, 54, 40, .10), 0 14px 30px -30px rgba(15, 54, 40, .55);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.tool-card.tool-tile:hover, .tool-card.tool-tile:focus-visible {
    border-color: #B6D6C4;
    box-shadow: 0 16px 30px -24px rgba(14, 107, 74, .55);
    transform: translateY(-2px);
}
.tool-tile-icon {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: #E9F5EE;
    color: var(--primary);
}
.tool-tile-icon .icon { width: 22px; height: 22px; }
/* Category tinting: documents = mint, templates = blue, certificates = violet. */
.tool-tile[data-cat="documents"] .tool-tile-icon { background: #E7F0FC; color: #2F5BB7; }
.tool-tile[data-cat="templates"] .tool-tile-icon { background: #E9F5EE; color: #0E6B4A; }
.tool-tile[data-cat="certificates"] .tool-tile-icon { background: #F1EAFB; color: #6D45C7; }
.tool-tile-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tool-tile-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-name { font-weight: 700; font-size: 1rem; color: #123A2B; overflow-wrap: anywhere; }
.tool-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #E4F4E9;
    color: var(--primary);
    font-size: .68rem; font-weight: 700;
    letter-spacing: .02em;
}
.tool-desc { font-size: .85rem; line-height: 1.6; color: #5A6F64; overflow-wrap: anywhere; }
.tool-go {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: 0 0 auto;
    border: 1px solid #D6EADF;
    border-radius: 50%;
    background: #F1F9F4;
    color: var(--primary);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.tool-go .icon { width: 16px; height: 16px; }
.tool-card:hover .tool-go, .tool-card:focus-visible .tool-go {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tool-card[hidden] { display: none; }

/* ── Featured panel: mint slip beside the tiles ───────────────── */
.dir-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rail-block {
    position: relative;
    padding: 20px;
    border: 1px solid #D3E9DB;
    border-radius: 16px;
    background: linear-gradient(160deg, #F2FBF5 0%, #E3F4EA 100%);
    box-shadow: inset 0 1px 0 #fff;
}
.rail-block::before { display: none; }
.featured-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px;
    border: 1px solid #D3E9DB;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: .72rem; font-weight: 700;
}
.featured-eyebrow .icon { width: 12px; height: 12px; }
.rail-title {
    margin: 12px 0 6px;
    font-size: clamp(1.3rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: 0;
    color: #0B4A33;
}
.featured-slip { border: 0; box-shadow: none; padding: 0; background: transparent; }
.featured-slip p { color: #4E6659; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.65; }
.featured-slip .btn {
    width: 100%;
    margin-top: 16px;
    border-radius: 10px;
    min-height: 46px;
    font-weight: 700;
}
/* Supplied artwork; `multiply` lets its mint wash sit inside the panel. */
.featured-art {
    width: min(100%, 250px);
    margin: 14px auto 6px;
    border-radius: 12px;
    overflow: hidden;
}
.featured-art img {
    display: block;
    width: 100%; height: auto;
    mix-blend-mode: multiply;
}

/* ── How it works: illustrated step cards ────────────────────── */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
}
.how-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
.how-figure {
    width: 100%;
    margin: 0 0 6px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-muted);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
}
.how-figure img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.how-card .step-num {
    width: 34px; height: 34px;
    margin: 0;
    border-width: 1.5px;
    font-size: .92rem;
}
.how-card h3 { font-size: 1rem; font-weight: 800; }
.how-card p { color: var(--text-muted); font-size: .9rem; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-5);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.empty-title { font-weight: 700; font-size: 1.1rem; }
.empty-text { color: var(--text-muted); margin: var(--space-2) 0 var(--space-5); }

/* ── Step numerals + trust ───────────────────────────────────── */
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    margin-bottom: 8px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    background: transparent;
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 600;
}

.why-banner {
    margin: 0 0 var(--space-5);
    background: var(--bg-surface);
    border: 2px solid var(--text-primary);
    border-radius: 6px;
    overflow: hidden;
}
.why-banner img { width: 100%; height: auto; }

.trust-strip {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}
.trust-tile {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted); font-size: .92rem;
}
.trust-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: 0 0 auto;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
}
.trust-strip strong { display: block; color: var(--text-primary); font-size: .96rem; }

/* ── About: centered proof band + illustrated strip ─────────── */
.about-grid { max-width: var(--container); }
.about-inner { max-width: 720px; margin-inline: auto; text-align: center; }
.about-inner .kicker { justify-content: center; }
.about-inner p { margin-top: var(--space-3); color: var(--text-muted); }
.about-legal {
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .04em;
    color: var(--accent);
}
.about-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}
.about-gallery figure {
    margin: 0;
    height: 100%;
    background: var(--bg-surface);
    border: 2px solid var(--text-primary);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 4px 4px 0 var(--text-primary);
}
.about-gallery img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border-color);
}
.about-gallery figcaption {
    padding: 10px 12px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--text-muted);
}

/* ── Closing CTA: ready-to-start invitation ─────────────────────
   Soft mint plate per the reference comp: pill kicker, green heading,
   four quiet perks, the operator illustration centred between copy and
   actions. The artwork is a white-background render, so `multiply`
   lets the card tint it instead of pasting a white box on the mint. */
.cta-band { padding-top: 0; }
.cta-start {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .78fr) auto;
    grid-template-areas: "copy art actions";
    align-items: center;
    gap: clamp(18px, 2.4vw, 32px);
    padding: clamp(22px, 3vw, 38px) clamp(22px, 3.2vw, 42px);
    border: 1px solid #D8EBDD;
    border-radius: 26px;
    background:
        radial-gradient(85% 130% at 88% 12%, #DFF1E6 0%, rgba(223, 241, 230, 0) 62%),
        linear-gradient(135deg, #FDFEFD 0%, #F3FAF5 55%, #EAF6EE 100%);
    box-shadow: 0 26px 50px -44px rgba(14, 107, 74, .55);
    overflow: hidden;
}
.cta-start-copy { grid-area: copy; min-width: 0; }
.cta-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px 5px 6px;
    border: 1px solid #CDE8D6;
    border-radius: 999px;
    background: #E4F4E9;
    color: var(--primary);
    font-size: .78rem; font-weight: 600;
    letter-spacing: .02em;
}
.cta-eyebrow-mark {
    display: grid; place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}
.cta-eyebrow-mark .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.cta-start h2 {
    margin-top: 14px;
    font-size: clamp(1.65rem, 2.9vw, 2.15rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    color: #0B4A33;
}
.cta-lead {
    margin-top: 10px;
    max-width: 44ch;
    color: #2F443B;
    font-size: .98rem;
    line-height: 1.7;
}
.cta-note {
    margin-top: 6px;
    max-width: 48ch;
    color: #5C7168;
    font-size: .86rem;
    line-height: 1.65;
}
.cta-perks {
    display: flex; flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 18px; padding-top: 15px;
    border-top: 1px dashed #CBE3D4;
    list-style: none;
}
.cta-perks li {
    display: inline-flex; align-items: center; gap: 7px;
    color: #2C4A3C;
    font-size: .84rem; font-weight: 600;
}
.cta-perks .icon { width: 17px; height: 17px; color: var(--primary); stroke-width: 2; }
.cta-start-art {
    grid-area: art;
    width: 100%; max-width: 400px;
    margin: 0;
    justify-self: center;
}
.cta-start-art img {
    display: block;
    width: 100%; height: auto;
    mix-blend-mode: multiply;
}
.cta-start-actions {
    grid-area: actions;
    display: flex; align-items: center;
    gap: 10px;
}
.cta-start .btn {
    border-radius: 999px;
    min-height: 46px;
    padding: 11px 18px;
    font-size: .92rem; font-weight: 700;
    white-space: nowrap;
}
.cta-start .btn .icon { width: 17px; height: 17px; }
.cta-start .btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    box-shadow: 0 14px 24px -18px rgba(14, 107, 74, .9);
}
.cta-start .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.cta-start .btn-primary:active { transform: translateY(1px); }
.cta-start .btn-secondary {
    background: #fff;
    border: 1px solid #C6DDCE;
    color: #173D2E;
    box-shadow: none;
}
.cta-start .btn-secondary:hover { background: #F5FBF7; border-color: #ADD2BA; color: #0B4A33; }

/* ── Ledger motion (transform/opacity only) ────────────────────
   The register stamps, rules draw, rows file in. One focal entrance;
   rows re-run their entrance whenever the filter toggles `hidden`.
   All keyframes end at the natural resting state, so disabled or
   reduced motion leaves every element exactly where it belongs. */
@keyframes reg-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes reg-draw {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@keyframes reg-stamp {
    from { opacity: 0; transform: scale(1.12) rotate(-4deg); }
    to { opacity: 1; transform: rotate(-2deg); }
}
@keyframes reg-row-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.reg-no { animation: reg-stamp .35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.reg-title { animation: reg-rise .55s cubic-bezier(0.16, 1, 0.3, 1) .05s both; }
.reg-rule { transform-origin: left center; animation: reg-draw .45s cubic-bezier(0.16, 1, 0.3, 1) .3s both; }
.reg-hero-art .illus { animation: reg-rise .6s cubic-bezier(0.16, 1, 0.3, 1) .35s both; }
.tool-tile { animation: reg-row-in .3s ease-out both; }
.tool-tile:nth-child(2) { animation-delay: .05s; }
.tool-tile:nth-child(3) { animation-delay: .1s; }
.tool-tile:nth-child(4) { animation-delay: .15s; }
.how-card { animation: reg-row-in .35s ease-out both; }
.how-card:nth-child(2) { animation-delay: .06s; }
.how-card:nth-child(3) { animation-delay: .12s; }

/* ── Ledger chrome (homepage overrides of shell.css) ─────────── */
.site-header { border-bottom: 2px solid var(--text-primary); border-top: 3px solid var(--primary); }
/* Stamped masthead: wordmark beside the logo. */
.brand-ledger .brand-logo { height: 40px; width: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word strong { font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; }
.brand-word small { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
/* Ledger index numerals on the primary nav. */
.site-nav { counter-reset: ledger-nav; }
.site-nav .nav-link::before {
    counter-increment: ledger-nav;
    content: "০" counter(ledger-nav, bengali);
    margin-right: 7px;
    font-family: var(--font-mono);
    font-size: .72em;
    font-weight: 600;
    color: var(--primary);
}
/* Drop the decorative numerals once the nav has to compact (see shell.css). */
@media (max-width: 1600px) {
    .site-nav .nav-link::before { content: none; }
}
.user-chip { font-family: var(--font-mono); border-width: 1.5px; }
/* Footer styling lives in its own block below. */
.footer-col h3::before { content: "§ "; color: var(--primary); }
.empty-state { border: 2px dashed var(--border-strong); border-radius: 6px; }
.section-alt { border-block: 2px solid var(--text-primary); }

/* ── Footer: mint contact sheet ─────────────────────────────────
   Five columns on a pale mint wash, hairline dividers, icon-topped
   headings and chevron links, closing on the deep-green base bar.
   Leaf wash is painted with gradients (no extra raster weight). */
.footer-mint {
    border-top: 1px solid #D8EBDD;
    padding-top: 0;
    background:
        radial-gradient(42% 62% at 3% 82%, rgba(14, 107, 74, .10), transparent 70%),
        radial-gradient(36% 56% at 98% 76%, rgba(14, 107, 74, .12), transparent 72%),
        linear-gradient(180deg, #F7FCF8 0%, #EEF8F1 100%);
}
.footer-grid--5 {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1.1fr;
    gap: 22px;
    padding-block: 44px 38px;
}
/* The logo lockup already carries the wordmark — no second "Repdoc" text. */
.footer-mint .footer-brandmark { display: inline-flex; align-items: center; }
.footer-mint .footer-brandmark .brand-logo { height: 46px; width: auto; }
.footer-tagline {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--primary);
}
.footer-mint .footer-about {
    margin-top: 10px; max-width: 300px;
    color: #4A5F55; font-size: .87rem; line-height: 1.7;
}
.footer-mint .footer-legal { margin-top: 8px; color: #6C8177; font-size: .78rem; }
.social-links--icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-mint .social-links--icons a {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    border: 1px solid #CBE3D4;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.footer-mint .social-links--icons a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.social-links--icons .icon { width: 15px; height: 15px; stroke-width: 1.7; }
.social-links--icons .icon-brand { stroke: none; }

.footer-mint .footer-col { border-left: 1px solid #DAEDE2; padding-left: 22px; }
.footer-mint .footer-head {
    display: flex; align-items: center; gap: 9px;
    margin-bottom: 14px;
    font-size: .92rem; font-weight: 700;
    color: #123A2B;
}
.footer-head-icon {
    display: grid; place-items: center;
    width: 27px; height: 27px;
    border: 1px solid #CEE8D7;
    border-radius: 8px;
    background: #E1F3E7;
    color: var(--primary);
}
.footer-head-icon .icon { width: 14px; height: 14px; }
.footer-mint .footer-col ul { gap: 9px; }
.footer-mint .footer-col a {
    display: inline-flex; align-items: flex-start; gap: 7px;
    color: #3C5648; font-size: .86rem; line-height: 1.5;
}
.footer-mint .footer-col a::before { content: "›"; color: #93AC9F; font-size: 1rem; line-height: 1.2; }
.footer-mint .footer-col a:hover { color: var(--primary); }
.footer-mint .footer-col a:hover::before { color: var(--primary); }
.footer-contact a::before { display: none; }
.footer-contact a { align-items: center; gap: 8px; }
.footer-contact .icon { width: 15px; height: 15px; color: var(--primary); stroke-width: 1.7; flex: 0 0 auto; }

.footer-base { background: linear-gradient(90deg, #0C5A40, #137A56); color: #E6F5ED; }
.footer-base-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding-block: 14px;
    font-size: .82rem;
}
.footer-base-inner p { margin: 0; color: #D6EDE1; }
.footer-mint .back-top {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px 7px 10px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    color: #fff; font-size: .8rem; font-weight: 600;
}
.footer-mint .back-top:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.footer-mint .back-top .icon { width: 15px; height: 15px; }

/* ── Responsive ──────────────────────────────────────────────── */
/* Three-up CTA (copy | art | actions) needs the full container; below
   that the actions wrap under the pair instead of squeezing the copy. */
@media (max-width: 1120px) {
    .cta-start {
        grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
        grid-template-areas: "copy art" "actions actions";
    }
    .cta-start-actions { justify-content: flex-start; }

    .footer-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
    .footer-mint .footer-brand { grid-column: 1 / -1; padding-bottom: 22px; border-bottom: 1px solid #DAEDE2; }
    .footer-mint .footer-col { border-left: 0; padding-left: 0; }
}

/* Register hero compacts; the tool index starts in-viewport. */
@media (max-width: 900px) {
    .hero { background-image: none; }
    .reg-hero-main { flex-direction: column; align-items: center; min-height: 0; }
    .reg-hero-art {
        position: static; transform: none;
        width: min(100%, 300px); margin: var(--space-4) auto 0;
    }
    .reg-title { font-size: clamp(1.7rem, 8vw, 2.2rem); }
    .cta-start {
        grid-template-columns: 1fr;
        grid-template-areas: "copy" "art" "actions";
        text-align: center;
    }
    .cta-start-art { max-width: 430px; }
    .cta-start .cta-lead, .cta-start .cta-note { margin-inline: auto; }
    .cta-perks { justify-content: center; }
    .cta-start-actions { justify-content: center; flex-wrap: wrap; }
}

/* The featured panel keeps its place beside the tiles for as long as the
   column fits; below that the tiles go single-file before the panel drops. */
@media (max-width: 1024px) {
    .dir-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
}

@media (max-width: 900px) {
    .dir-grid { grid-template-columns: minmax(0, 1fr) 260px; }
    .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .dir-grid { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 640px) {
    .dir-grid { grid-template-columns: 1fr; }
    .dir-rail { display: grid; grid-template-columns: 1fr; width: 100%; max-width: 420px; margin-inline: auto; align-items: start; }
}

@media (max-width: 640px) {
    .hero { padding: var(--space-6) 0 var(--space-6); }
    .chip { padding: 8px 14px; font-size: .85rem; }
    .category-chips { margin-bottom: var(--space-5); }
    .tool-grid { grid-template-columns: 1fr; }
    .dir-rail { grid-template-columns: 1fr; max-width: none; margin-inline: 0; }
    .how-grid, .trust-strip, .about-gallery { grid-template-columns: 1fr; }
    .tool-tile { padding: 14px; }
    .featured-art { max-width: 230px; }
    .section-head { flex-wrap: wrap; }
    .cta-start { padding: var(--space-5); }
    .cta-perks { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 10px 24px; }
    .footer-grid--5 { grid-template-columns: 1fr; gap: 22px; }
    .footer-mint .footer-col { border-top: 1px solid #DAEDE2; padding-top: 20px; }
    .footer-mint .footer-brand { padding-bottom: 20px; }
    .footer-base-inner { justify-content: center; text-align: center; }
    .empty-state { padding: var(--space-6) var(--space-4); }
    .how-card { padding: 12px; }
}

@media (min-width: 1121px) {
    .cta-perks { display: grid; grid-template-columns: repeat(2, max-content); gap: 9px 22px; }
}

@media (max-width: 480px) {
    .reg-title { font-size: 1.6rem; }
    .hero-note { flex-wrap: wrap; }
    .section-head { margin-bottom: var(--space-5); }
    .cta-start-actions { flex-direction: column; align-items: stretch; }
    .cta-start-actions .btn { width: 100%; }
    .hero-cta .btn { flex: 1 1 100%; }
    .trust-tile { font-size: .9rem; }
    .trust-tile { padding: 14px; }
    .cta-start { padding: var(--space-5) var(--space-4); }
}

/* Stamped masthead collapses gracefully on narrow headers. */
@media (max-width: 560px) {
    .brand-word small { display: none; }
    .brand-word strong { font-size: .95rem; }
}
@media (max-width: 400px) {
    .brand-word { display: none; }
}

/* ── Reduced motion: hero is static art, nothing to suppress ─── */
@media (prefers-reduced-motion: reduce) {
    .tool-card:hover, .tool-card:focus-visible { transform: none; }
    /* The global kill zeroes durations but not delays: without this the
       entrance keyframes above would hold content invisible until each
       delay elapses. */
    .reg-no, .reg-title, .reg-rule,
    .reg-hero-art .illus, .tool-tile, .how-card { animation-delay: 0s !important; }
}
