/*
 * Shared design system of the three portal websites (Upadhyay & Sehgal Law Chambers).
 * Palette: deep navy and charcoal, warm white, champagne gold. Each portal's theme colours (--brand, --accent)
 * come from its database settings; portal-specific compositions live in css/portals/{portal}.css.
 * Fonts are self-hosted (wwwroot/fonts, SIL Open Font License).
 */

/* ------------------------------------------------------------------ Fonts */
@font-face {
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/playfair-display-latin-var.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-latin-400.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-latin-500.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/poppins-latin-600.woff2") format("woff2");
}

/* ------------------------------------------------------------------ Tokens */
:root {
    --brand: #1f3a5f;
    --accent: #b08d57;

    --ink: #131821;
    --text: #3a4351;
    --muted: #626b79;
    --paper: #ffffff;
    --ivory: #f8f5ef;
    --ivory-deep: #f0eadf;
    --line: #e6dfd2;
    --navy: #0e1a2b;
    --charcoal: #15181e;
    --night: #0a0f17;
    --danger: #a3232b;
    --focus: #2563eb;

    /* Derived colours (fallbacks first; refined below where color-mix is supported). */
    --deep: #102036;
    --gold-light: #d9c095;
    --gold-ink: #7a6038;
    --gold-soft: #ece1cb;
    --gold-num: #dcc8a3;
    --deep-veil: rgba(10, 18, 30, .9);
    --deep-veil-soft: rgba(10, 18, 30, .45);
    --hero-veil: rgba(10, 18, 30, .8);

    --radius: 6px;
    --radius-sm: 4px;
    --shadow-lift: 0 22px 45px -24px rgba(14, 26, 43, .38);
    --font-serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --container: 76rem;
    --gutter: clamp(1.25rem, 4vw, 2rem);
    --header-height: 5.5rem;
    color-scheme: light;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    :root {
        --deep: color-mix(in srgb, var(--brand) 58%, #070b12);
        --gold-light: color-mix(in srgb, var(--accent) 62%, #ffffff);
        --gold-ink: color-mix(in srgb, var(--accent) 62%, #1a1206);
        --gold-soft: color-mix(in srgb, var(--accent) 22%, #ffffff);
        --gold-num: color-mix(in srgb, var(--accent) 55%, #ffffff);
        --deep-veil: color-mix(in srgb, var(--deep) 90%, transparent);
        --deep-veil-soft: color-mix(in srgb, var(--deep) 42%, transparent);
        --hero-veil: color-mix(in srgb, var(--deep) 80%, transparent);
    }
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.18;
    color: var(--ink);
    margin: 0 0 .6em;
    letter-spacing: -.005em;
    text-wrap: balance;
}

p { margin: 0 0 1em; }

a { color: var(--ink); text-underline-offset: .2em; text-decoration-color: var(--accent); }
a:hover { color: var(--gold-ink); }

img, svg, video { max-width: 100%; height: auto; }

address { font-style: normal; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--gold-soft); color: var(--ink); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: .75rem; top: -3rem; z-index: 100;
    padding: .55rem 1rem; border-radius: var(--radius-sm);
    background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: .75rem; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--muted); }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: .35rem; }

main:focus { outline: none; }

.eyebrow {
    margin: 0 0 1rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.rule {
    display: block;
    width: 4.5rem;
    height: 3px;
    margin-bottom: 1.6rem;
    background: var(--accent);
}

.prose { max-width: 46rem; }
.prose > :last-child { margin-bottom: 0; }
.prose--small { font-size: .94rem; margin-top: 1.5rem; }

.bullets { margin: 0 0 1.1em; padding-left: 1.25rem; }
.bullets li { margin: .4rem 0; padding-left: .25rem; }
.bullets li::marker { color: var(--accent); }

/* ------------------------------------------------------------------ Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 3.1rem;
    padding: .8rem 1.65rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--gold { background: var(--accent); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55); }
.btn--gold:hover { background: var(--gold-light); color: var(--ink); }

.btn--primary { background: var(--deep); color: #fff; }
.btn--primary:hover { background: var(--ink); color: #fff; }

.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }

.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

.btn--small { min-height: 2.6rem; padding: .55rem 1.1rem; font-size: .78rem; }

.btn__icon { flex: none; }

.btn.is-loading { opacity: .75; cursor: progress; }

/* ------------------------------------------------------------------ Header (over the dark hero / page banner) */
.site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 30;
    color: #fff;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: .75rem 1.5rem;
    min-height: var(--header-height);
    padding-top: .9rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
    margin-right: auto;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; }

.brand__mark {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--radius-sm);
    background: rgba(10, 15, 23, .35);
    color: #fff;
}

.brand__mark .brand-icon { width: 1.55rem; height: 1.55rem; }

.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }

.brand__name {
    font-family: var(--font-serif);
    font-size: clamp(1.02rem, 3.6vw, 1.22rem);
    font-weight: 600;
    letter-spacing: .01em;
}

.brand__sub {
    margin-top: .2rem;
    font-size: .64rem;
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.header-cta { flex: none; }
.header-cta__number { display: none; }

/* Very narrow phones: compact header and icon-only call button (the label stays available to screen readers). */
@media (max-width: 25.99rem) {
    .site-header__inner { gap: .5rem; }
    .brand { gap: .6rem; }
    .brand__mark { width: 2.5rem; height: 2.5rem; }
    .brand__mark .brand-icon { width: 1.35rem; height: 1.35rem; }
    .brand__name { font-size: .96rem; white-space: nowrap; }
    .brand__sub { letter-spacing: .24em; }
    .nav-toggle { width: 2.6rem; height: 2.6rem; }
    .header-cta { width: 2.6rem; min-height: 2.6rem; padding: 0; }
    .header-cta > span {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden; clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

.nav-toggle {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.nav-toggle:hover { border-color: var(--gold-light); color: var(--gold-light); }

/* Navigation: a full-screen popover menu on small screens. */
.site-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__list a { text-decoration: none; }

.site-nav:popover-open {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 1.25rem var(--gutter) 2rem;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    color: #fff;
    background: radial-gradient(120% 70% at 100% 0%, rgba(255, 255, 255, .06), transparent 60%), var(--navy);
}

.site-nav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.site-nav__label {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.site-nav__close {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.site-nav:popover-open .site-nav__list { display: grid; gap: .35rem; }

.site-nav:popover-open .site-nav__list a {
    display: block;
    padding: .55rem 0;
    font-family: var(--font-serif);
    font-size: 1.9rem;
    color: #fff;
}

.site-nav:popover-open .site-nav__list a[aria-current="page"] { color: var(--gold-light); }

.site-nav__cta { width: 100%; margin-top: auto; }
.site-nav__cta .btn__extra { white-space: nowrap; }

/* Browsers without popover support: the menu button is hidden and the links form a scrollable row. */
@supports not selector(:popover-open) {
    .nav-toggle, .site-nav__top, .site-nav__cta { display: none; }
    .site-header__inner { flex-wrap: wrap; }
    .site-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
    .site-nav__list { display: flex; gap: 1.25rem; white-space: nowrap; }
    .site-nav__list a { display: block; padding: .35rem 0; color: rgba(255, 255, 255, .85); }
    .site-nav__list a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
}

@media (min-width: 40rem) {
    .header-cta__number { display: inline; }
}

@media (min-width: 64rem) {
    .site-header__inner { gap: 2.25rem; }
    .nav-toggle { display: none; }

    .site-nav,
    .site-nav:popover-open {
        position: static;
        inset: auto;
        display: block;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 0;
        border: 0;
        overflow: visible;
        color: inherit;
        background: none;
    }

    .site-nav__top, .site-nav__cta { display: none; }

    .site-nav__list,
    .site-nav:popover-open .site-nav__list { display: flex; gap: 2rem; }

    .site-nav__list a,
    .site-nav:popover-open .site-nav__list a {
        position: relative;
        display: block;
        padding: .4rem 0;
        font-family: var(--font-sans);
        font-size: .95rem;
        font-weight: 500;
        color: rgba(255, 255, 255, .86);
        transition: color .2s ease;
    }

    .site-nav__list a::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transition: transform .3s ease;
    }

    .site-nav__list a:hover { color: #fff; }
    .site-nav__list a:hover::after,
    .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
    .site-nav__list a[aria-current="page"],
    .site-nav:popover-open .site-nav__list a[aria-current="page"] { color: #fff; }
}

/* ------------------------------------------------------------------ Hero (home page) */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: var(--deep);
}

/* Default composition: full-bleed photograph behind a dark veil (variants refine this per portal). */
.hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 9, 15, .55) 0%, rgba(5, 9, 15, 0) 28%),
        linear-gradient(0deg, var(--hero-veil), var(--hero-veil));
}

.hero__inner {
    display: flex;
    align-items: center;
    min-height: min(46rem, 100svh);
    padding-top: calc(var(--header-height) + clamp(2.75rem, 7vw, 5rem));
    padding-bottom: clamp(4rem, 9vw, 7rem);
}

.hero__content { max-width: 42rem; }

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: .9rem;
    color: var(--gold-light);
}

.hero__eyebrow::before {
    content: "";
    flex: none;
    width: 2.5rem;
    height: 1px;
    background: var(--accent);
}

.hero__title {
    margin-bottom: .45em;
    color: #fff;
    font-size: clamp(2.45rem, 6.4vw, 4.35rem);
    line-height: 1.07;
    letter-spacing: -.012em;
}

.hero__lead {
    max-width: 36rem;
    margin-bottom: 2.2rem;
    font-size: clamp(1.04rem, 2.2vw, 1.18rem);
    color: rgba(255, 255, 255, .86);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero__note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: 2.25rem 0 0;
    max-width: 34rem;
    font-size: .88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .7);
}

.hero__note svg { flex: none; margin-top: .1rem; color: var(--gold-light); }

@media (min-width: 64rem) {
    /* Wide screens: the veil fades to the right so more of the photograph shows. */
    .hero--full .hero__media::after {
        background:
            linear-gradient(180deg, rgba(5, 9, 15, .5) 0%, rgba(5, 9, 15, 0) 26%),
            linear-gradient(90deg, var(--deep-veil) 0%, var(--deep-veil) 34%, var(--deep-veil-soft) 72%, rgba(5, 9, 15, .15) 100%);
    }
}

/* ------------------------------------------------------------------ Inner page banner */
.page-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: var(--deep);
}

.page-header__media { position: absolute; inset: 0; z-index: -1; }

.page-header__img { display: block; width: 100%; height: 100%; object-fit: cover; }

.page-header__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 9, 15, .55) 0%, rgba(5, 9, 15, 0) 40%),
        linear-gradient(90deg, var(--deep-veil) 0%, var(--deep-veil) 45%, var(--deep-veil-soft) 100%);
}

.page-header__inner {
    padding-top: calc(var(--header-height) + clamp(2.5rem, 6vw, 4rem));
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.page-header__eyebrow { color: var(--gold-light); }

.page-header__title {
    margin-bottom: .35em;
    color: #fff;
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    max-width: 22ch;
}

.page-header__lead { max-width: 44rem; margin: 0; font-size: 1.06rem; color: rgba(255, 255, 255, .82); }

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
    font-size: .84rem;
    color: rgba(255, 255, 255, .7);
}

.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--accent); }
.breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }

/* ------------------------------------------------------------------ Sections */
.section { padding: clamp(4.25rem, 8vw, 6.75rem) 0; }

.section__intro { margin-bottom: 2.5rem; }

.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .rule { margin-left: auto; margin-right: auto; }

.section-title { font-size: clamp(1.95rem, 3.6vw, 2.8rem); margin-bottom: .45em; }

.section-lead { margin: 0; font-size: 1.05rem; color: var(--muted); }
.section-lead p:last-child { margin-bottom: 0; }

.section-actions { margin-top: clamp(2.25rem, 4vw, 3rem); }
.section-actions--center { text-align: center; }

/* ------------------------------------------------------------------ Introduction band (home page body text) */
.intro-band {
    padding: clamp(2.75rem, 5vw, 3.75rem) 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
}

.intro-band__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    text-align: center;
}

.intro-band__mark { color: var(--accent); }
.intro-band__mark .brand-icon { display: block; width: 1.9rem; height: 1.9rem; }

.intro-band__text {
    max-width: 50rem;
    font-family: var(--font-serif);
    font-size: clamp(1.12rem, 2.3vw, 1.4rem);
    line-height: 1.6;
    color: var(--ink);
}

.intro-band__text .bullets { display: inline-block; text-align: left; font-family: var(--font-sans); font-size: 1rem; }

/* Two warm-white sections in a row get a hairline between them. */
.assist--tint + .contact-section { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ Practice areas (service cards) */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.1rem 1.85rem 1.85rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--accent);
    transform: scaleX(.18);
    transform-origin: left;
    transition: transform .45s ease;
}

.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }

.card__num {
    display: block;
    margin-bottom: 1.3rem;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
    color: var(--gold-num);
    transition: color .35s ease;
}

.card:hover .card__num { color: var(--accent); }

.card__title { margin-bottom: .6rem; font-size: 1.38rem; }

/* The whole card is clickable through the title link. */
.card__link { color: var(--ink); text-decoration: none; }
.card__link:hover { color: var(--ink); }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }

.card__text { flex: 1; margin-bottom: 1.35rem; font-size: .96rem; color: var(--text); }

.card__more {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.card__more svg { transition: transform .3s ease; }
.card:hover .card__more svg { transform: translateX(4px); }

.practice--tint { background: var(--ivory); }

/* Card and step grids: one column on phones, two on tablets (a lone last item spans the row), three or more on
   wide screens. */
@media (min-width: 40rem) {
    .card-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid > :last-child:nth-child(odd), .steps > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 64rem) {
    .card-grid { grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid > :last-child:nth-child(odd), .steps > :last-child:nth-child(odd) { grid-column: auto; }
}

/* ------------------------------------------------------------------ About Us */
.about__grid { display: grid; gap: 3.5rem; align-items: center; }

.about__title { font-size: clamp(2.2rem, 4.4vw, 3.3rem); }

.about__subtitle {
    margin: -.2em 0 1.6rem;
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

.about__body { font-size: 1.02rem; }

.about__blocks {
    display: grid;
    gap: 1.75rem;
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--line);
}

.about__block-title { margin-bottom: .55rem; font-size: 1.28rem; }
.about__block-text { font-size: .96rem; }
.about__block-text p:last-child { margin-bottom: 0; }

.about__actions { margin: 2.5rem 0 0; }

.about__media { position: relative; padding: 2rem 2rem 0 0; }

.about__frame {
    position: relative;
    isolation: isolate;
    max-width: 30rem;
    margin: 0 auto;
}

/* Gold block offset behind the photograph (reference design). */
.about__frame::before {
    content: "";
    position: absolute;
    top: -2rem;
    right: -2rem;
    z-index: -1;
    width: 78%;
    height: 82%;
    background: var(--accent);
}

.about__img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    box-shadow: 0 30px 60px -30px rgba(10, 15, 23, .55);
}

@media (min-width: 40rem) {
    .about__blocks { grid-template-columns: 1fr 1fr; gap: 2.25rem; }
}

@media (min-width: 64rem) {
    .about__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 5.5rem; }
    .about--image-left .about__grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
    .about--image-left .about__media { order: -1; padding: 2rem 0 0 2rem; }
    .about--image-left .about__frame::before { right: auto; left: -2rem; }
}

.about--dark { color: rgba(255, 255, 255, .78); background: var(--charcoal); }
.about--dark .about__title,
.about--dark .about__block-title { color: #fff; }
.about--dark .about__subtitle { color: var(--gold-light); }
.about--dark .about__blocks { border-top-color: rgba(255, 255, 255, .14); }

/* ------------------------------------------------------------------ How We Assist You */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    position: relative;
    padding: 2.6rem 2rem 2.4rem;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .35s ease, box-shadow .35s ease;
}

.step::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 4rem;
    height: 3px;
    background: var(--accent);
    transform: translateX(-50%) scaleX(.5);
    transition: transform .4s ease;
}

.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.step:hover::after { transform: translateX(-50%) scaleX(1.6); }

.step__num {
    display: block;
    font-family: var(--font-serif);
    font-size: 3.6rem;
    font-weight: 600;
    line-height: 1;
    color: #c9d0da;
    transition: color .35s ease;
}

.step:hover .step__num { color: var(--accent); }

.step__title { margin: 1.35rem 0 .8rem; font-size: 1.4rem; }

.step__text { font-size: .97rem; }
.step__text p:last-child { margin-bottom: 0; }

.assist--tint { background: var(--ivory); }

.assist--dark {
    color: rgba(255, 255, 255, .78);
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, .06), transparent 60%),
        var(--deep);
}

.assist--dark .section-title { color: #fff; }
.assist--dark .section-lead { color: rgba(255, 255, 255, .72); }
.assist--dark .step { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .13); }
.assist--dark .step__num { color: rgba(255, 255, 255, .16); }
.assist--dark .step:hover .step__num { color: var(--accent); }
.assist--dark .step__title { color: #fff; }

/* ------------------------------------------------------------------ Contact section, details and forms */
.contact-section { background: var(--ivory); }

.contact-section__grid { display: grid; gap: 3rem; align-items: start; }

@media (min-width: 64rem) {
    .contact-section__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 5rem; }
}

.contact-section__info .section-lead { margin-bottom: 2.25rem; }

.form-card {
    padding: clamp(1.6rem, 4vw, 2.6rem);
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -38px rgba(14, 26, 43, .45);
}

.form-card__title { margin-bottom: 1.4rem; font-size: 1.55rem; }

.contact-details { display: grid; gap: 1.5rem; }

.contact-details__name { margin: 0; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); }

.contact-details__row { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); gap: 1rem; align-items: start; }

.contact-details__icon {
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--gold-ink);
}

.contact-details__label {
    display: block;
    margin-bottom: .15rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-details a { color: var(--ink); }
.contact-details__map { display: inline-block; margin-top: .35rem; font-size: .9rem; }

.form { display: grid; gap: 1.15rem; }

.field { display: grid; gap: .4rem; }

.field label { font-weight: 500; font-size: .92rem; color: var(--ink); }

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 3.1rem;
    padding: .7rem .9rem;
    border: 1px solid #d6cebf;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem; /* 16px prevents iOS zoom on focus */
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field textarea { resize: vertical; min-height: 9rem; }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(176, 141, 87, .22); }

.field-row { display: grid; gap: 1.15rem; }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }

.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .7rem; }
.field--check input { width: 1.2rem; height: 1.2rem; min-height: 0; margin-top: .3rem; accent-color: var(--deep); }
.field--check label { font-weight: 400; font-size: .92rem; color: var(--text); }
.field--check .field-error { grid-column: 1 / -1; }

.field-error { color: var(--danger); font-size: .9rem; }
.field-error:empty { display: none; }

.input-validation-error { border-color: var(--danger) !important; }

.form-alert {
    padding: .85rem 1rem;
    border: 1px solid #f0c2c5;
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    background: #fdf2f2;
    color: var(--danger);
}

.form-note { margin: 0; font-size: .86rem; color: var(--muted); }

.form .btn { justify-self: start; }

/* Honeypot field (kept out of view and out of the accessibility tree). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ Call-to-action band */
.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(3.25rem, 6vw, 4.75rem) 0;
    color: rgba(255, 255, 255, .78);
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(255, 255, 255, .07), transparent 60%),
        var(--deep);
}

.cta-band::before {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    right: 1.5%;
    width: 1.6rem;
    border-left: 3px solid var(--accent);
    border-right: 1px solid var(--accent);
    opacity: .5;
    transform: skewX(18deg);
    pointer-events: none;
}

.cta-band__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem 3rem;
}

.cta-band__text { max-width: 44rem; }
.cta-band__title { margin-bottom: .35em; color: #fff; font-size: clamp(1.65rem, 3.2vw, 2.3rem); }
.cta-band p { margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ------------------------------------------------------------------ Service detail, side cards, contact page */
.detail { display: grid; gap: 3rem; align-items: start; }

@media (min-width: 64rem) {
    .detail { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 4.5rem; }
}

.detail__body { font-size: 1.04rem; }
.detail__actions { margin-top: 2rem; }
.detail__aside { display: grid; gap: 1.5rem; }

.side-card {
    padding: 1.85rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.side-card__title { margin-bottom: 1.1rem; font-size: 1.3rem; }

.side-card--dark { color: rgba(255, 255, 255, .78); background: var(--deep); border-color: transparent; }
.side-card--dark .side-card__title,
.side-card--dark .contact-details__name { color: #fff; }
.side-card--dark .contact-details__icon { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: var(--gold-light); }
.side-card--dark .contact-details__label { color: rgba(255, 255, 255, .6); }
.side-card--dark a { color: #fff; }
.side-card--dark a:hover { color: var(--gold-light); }

@media (max-width: 25.99rem) {
    .side-card { padding: 1.35rem 1.15rem; }
    .contact-details__row { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .8rem; }
    .contact-details__icon { width: 2.5rem; height: 2.5rem; }
    .contact-details a { font-size: .95rem; }
}

.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav li + li { border-top: 1px solid var(--line); }
.side-nav a {
    display: block;
    padding: .8rem .25rem .8rem .9rem;
    color: var(--text);
    text-decoration: none;
    box-shadow: inset 2px 0 0 transparent;
    transition: color .2s ease, box-shadow .2s ease;
}
.side-nav a:hover { color: var(--ink); box-shadow: inset 2px 0 0 var(--line); }
.side-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }

.contact-page { display: grid; gap: 2.5rem; align-items: start; }

@media (min-width: 64rem) {
    .contact-page { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3.5rem; }
}

.thanks-card {
    max-width: 44rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 5vw, 3rem);
    display: grid;
    gap: 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
}

.thanks-card__icon {
    display: grid;
    place-items: center;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: var(--ivory);
    color: var(--gold-ink);
}

.thanks-card__actions { margin: 0; }

/* ------------------------------------------------------------------ Footer */
.site-footer {
    position: relative;
    color: rgba(255, 255, 255, .68);
    background: var(--night);
    font-size: .94rem;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
    opacity: .7;
}

.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--gold-light); }

.site-footer__grid { display: grid; gap: 2.5rem; padding-top: 4.5rem; padding-bottom: 3rem; }

@media (min-width: 40rem) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 64rem) {
    .site-footer__grid { grid-template-columns: 1.5fr 1fr 1.15fr 1.25fr; gap: 3rem; }
}

.footer-brand { display: inline-flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.site-footer .footer-brand { color: #fff; }

.footer-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-sm);
}
.footer-brand__mark .brand-icon { width: 1.55rem; height: 1.55rem; }

.footer-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.footer-brand__name { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; }
.footer-brand__sub { margin-top: .2rem; font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-light); }

.site-footer__about { max-width: 26rem; font-size: .9rem; }
.site-footer__about p:last-child { margin-bottom: 0; }

.site-footer__advocate { margin: 1.1rem 0 0; font-weight: 500; color: rgba(255, 255, 255, .88); }

.site-footer__title {
    margin-bottom: 1.15rem;
    font-size: 1.08rem;
    color: #fff;
}

.footer-links li + li,
.footer-contact li + li { margin-top: .6rem; }

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 2rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
}

.site-footer__legal p { margin: 0; }
.site-footer__legal p:first-child { max-width: 48rem; }

/* ------------------------------------------------------------------ Bar Council of India disclaimer */
.disclaimer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 12, 19, .78);
}

.disclaimer__panel {
    width: 100%;
    max-width: 41rem;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: clamp(1.6rem, 5vw, 2.4rem);
    background: var(--paper);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.disclaimer__title { font-size: 1.7rem; }
.disclaimer__body { font-size: .94rem; color: var(--text); }
.disclaimer__actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------------ Motion (subtle; disabled for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    .hero__content > *,
    .page-header__inner > * {
        animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
    }

    .hero__content > :nth-child(2), .page-header__inner > :nth-child(2) { animation-delay: .08s; }
    .hero__content > :nth-child(3), .page-header__inner > :nth-child(3) { animation-delay: .16s; }
    .hero__content > :nth-child(4), .page-header__inner > :nth-child(4) { animation-delay: .24s; }
    .hero__content > :nth-child(5) { animation-delay: .32s; }

    .site-nav:popover-open { animation: fade .25s ease both; }

    /* Gentle reveal while scrolling, where the browser supports scroll-driven animations. */
    @supports (animation-timeline: view()) {
        .card, .step, .about__frame, .form-card {
            animation: reveal linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 40%;
        }
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(32px); }
}

@keyframes fade {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ Print */
@media print {
    .site-nav, .nav-toggle, .header-cta, .skip-link, .disclaimer, .hero__actions, .form, .hero__media, .page-header__media, .cta-band { display: none !important; }
    .site-header { position: static; color: var(--ink); }
    .brand, .brand__mark { color: var(--ink); }
    .hero, .page-header { background: none; color: var(--ink); }
    .hero__title, .hero__lead, .page-header__title, .page-header__lead { color: var(--ink); }
    .site-footer { background: none; color: var(--ink); }
}
