/* ===========================================================
   Nyay Neeti Foundation
   =========================================================== */

:root {
    --primary: #1b2e3c;        /* deep navy */
    --primary-700: #142430;
    --primary-900: #0e1a23;
    --accent: #c49a45;         /* gold */
    --accent-600: #b08833;
    --text-dark: #1f2933;
    --text-muted: #5b6b78;
    --text-light: #f4f6f8;
    --bg-light: #f7f8fa;
    --surface: #ffffff;
    --border: #e3e7eb;
    --serif: 'Lora', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', 'Segoe UI', Tahoma, Geneva, sans-serif;
    --maxw: 1160px;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 30, 40, 0.06), 0 2px 8px rgba(16, 30, 40, 0.05);
    --shadow-md: 0 8px 28px rgba(16, 30, 40, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--sans);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--primary); font-weight: 600; }
a { color: var(--accent-600); }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
header {
    background: var(--primary);
    color: var(--text-light);
    padding: 0.9rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 6px 20px rgba(0,0,0,0.18);
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.brand-sub { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.6px; text-transform: uppercase; }

nav { display: flex; gap: 1.8rem; }
nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.25rem 0;
    position: relative;
    transition: color 0.2s;
}
nav a::after {
    content: "";
    position: absolute; left: 0; bottom: -2px;
    width: 0; height: 2px; background: var(--accent);
    transition: width 0.25s ease;
}
nav a:hover { color: #fff; }
nav a:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--primary-900); }
.btn-primary:hover { background: #d6ab57; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: var(--text-light);
    padding: 7rem 5% 6.5rem;
    text-align: center;
    background:
        linear-gradient(rgba(14,26,35,0.86), rgba(20,36,48,0.9)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><rect width="120" height="120" fill="%231b2e3c"/><circle cx="60" cy="60" r="48" stroke="%23c49a45" stroke-width="1" fill="none" opacity="0.12"/><circle cx="60" cy="60" r="30" stroke="%23c49a45" stroke-width="1" fill="none" opacity="0.08"/></svg>');
    background-size: cover, 200px 200px;
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); color: #fff; font-weight: 700; margin-bottom: 1.3rem; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: #cdd8e0; max-width: 680px; margin: 0 auto 2.2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-600);
    margin-bottom: 0.75rem;
}
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 0.9rem; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Practice cards ---------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.8rem;
}
.card {
    background: var(--surface);
    padding: 2.2rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-top-color: var(--accent); }
.card h3 { font-size: 1.25rem; margin-bottom: 0.85rem; }
.card p { color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Counsel / bios ---------- */
.bio-sector { background: #eef2f6; }
.attorney-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
}
.bio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* photo with monogram fallback (shown until a real image is dropped in) */
.bio-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bio-photo::after {
    content: attr(data-initials);
    font-family: var(--serif);
    font-size: 3.2rem;
    font-weight: 600;
    color: rgba(196, 154, 69, 0.85);
    letter-spacing: 2px;
}
.bio-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
}

.bio-body { padding: 1.5rem 1.6rem 1.8rem; }
.bio-body h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.bio-title {
    font-size: 0.78rem;
    color: var(--accent-600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.bio-body p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Footer ---------- */
footer {
    background: var(--primary-900);
    color: #9fb0bd;
    padding: 4rem 5% 2rem;
    font-size: 0.9rem;
    border-top: 3px solid var(--accent);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    max-width: var(--maxw);
    margin: 0 auto 3rem;
}
.footer-col h4 { color: #fff; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: #9fb0bd; text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-contact address { font-style: normal; line-height: 1.7; margin-bottom: 0.8rem; }
.footer-org { color: #fff; font-weight: 600; margin-bottom: 0.4rem; }
.footer-phone a { color: var(--accent); font-weight: 600; }
.footer-hours { margin-top: 0.4rem; font-size: 0.82rem; color: #738795; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.8rem;
    text-align: center;
    max-width: var(--maxw);
    margin: 0 auto;
    font-size: 0.82rem;
    color: #738795;
}

/* ===========================================================
   Cinematic intro splash
   =========================================================== */
.splash-lock { overflow: hidden; height: 100vh; }

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background:
        radial-gradient(ellipse at center, rgba(196,154,69,0.18) 0%, rgba(14,26,35,0) 55%),
        linear-gradient(160deg, var(--primary-900) 0%, var(--primary-700) 60%, var(--primary-900) 100%);
    transition: opacity 1s ease, transform 1.1s cubic-bezier(0.7, 0, 0.3, 1);
}
.splash.is-leaving { opacity: 0; transform: translateY(-3%) scale(1.04); pointer-events: none; }

.splash-stage { display: flex; flex-direction: column; align-items: center; gap: 2.2rem; padding: 1.5rem; }

.splash-doc {
    position: relative;
    width: min(38vh, 320px);
    aspect-ratio: 960 / 1286;
    border-radius: 4px;
    overflow: hidden;
    background: #fdfaf2;
    box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(196,154,69,0.5), 0 0 60px rgba(196,154,69,0.25);
    opacity: 0;
    transform: translateY(60px) scale(0.7) rotateX(14deg);
    transform-origin: center bottom;
}
.splash-doc img { width: 100%; height: 100%; object-fit: cover; }

/* light glinting across the gold ink */
.splash-glint {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
}

.splash-text { text-align: center; opacity: 0; transform: translateY(18px); }
.splash-eyebrow {
    text-transform: uppercase; letter-spacing: 4px; font-size: 0.72rem;
    color: var(--accent); margin-bottom: 0.7rem; font-weight: 600;
}
.splash-words {
    font-family: var(--serif); color: #fff; font-weight: 600;
    font-size: clamp(1.1rem, 3.2vw, 1.7rem); letter-spacing: 1px; margin-bottom: 0.9rem;
}
.splash-sign {
    font-family: var(--serif); font-style: italic; color: var(--accent);
    font-size: clamp(0.95rem, 2vw, 1.15rem); letter-spacing: 0.5px;
}

.splash-skip {
    position: absolute; bottom: 1.6rem; right: 1.8rem;
    background: transparent; border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7); padding: 0.45rem 1.1rem; border-radius: 50px;
    font-family: var(--sans); font-size: 0.8rem; letter-spacing: 1px; cursor: pointer;
    opacity: 0; transition: opacity 0.4s ease 1s, color 0.2s, border-color 0.2s;
}
.splash.is-playing .splash-skip { opacity: 1; }
.splash-skip:hover { color: #fff; border-color: var(--accent); }

.splash.is-playing .splash-doc { animation: doc-splash 1.1s cubic-bezier(0.18, 0.9, 0.32, 1.25) forwards; }
.splash.is-playing .splash-glint { animation: doc-glint 1.4s ease-in-out 1.1s forwards; }
.splash.is-playing .splash-text { animation: text-rise 0.9s ease forwards 1s; }

@keyframes doc-splash {
    0%   { opacity: 0; transform: translateY(60px) scale(0.7) rotateX(14deg); filter: blur(6px); }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}
@keyframes doc-glint {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
@keyframes text-rise {
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   "We, the People" charter band
   =========================================================== */
.constitution {
    background:
        radial-gradient(circle at 80% 20%, rgba(196,154,69,0.08), transparent 45%),
        linear-gradient(180deg, var(--primary) 0%, var(--primary-700) 100%);
    color: var(--text-light);
    overflow: hidden;
}
.constitution-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.constitution-frame {
    position: relative;
    padding: 0.9rem;
    background: linear-gradient(160deg, var(--accent), var(--accent-600));
    border-radius: 6px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    transform: perspective(1200px) rotateY(7deg) translateX(30px);
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1s ease;
}
.constitution-frame.in-view { transform: perspective(1200px) rotateY(0) translateX(0); opacity: 1; }
.constitution-frame img { border-radius: 3px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

.constitution-copy { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease 0.15s, transform 0.9s ease 0.15s; }
.constitution-copy.in-view { opacity: 1; transform: translateY(0); }
.constitution-copy .eyebrow { color: var(--accent); }
.constitution-copy h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.2rem; }
.constitution-copy > p { color: #cdd8e0; font-size: 1.05rem; max-width: 46ch; margin-bottom: 1.8rem; }

.constitution-values { list-style: none; display: grid; gap: 0.85rem; }
.constitution-values li {
    position: relative; padding-left: 1.6rem; color: #aebcc7; font-size: 0.97rem;
}
.constitution-values li::before {
    content: "\269C"; /* fleur-de-lis */
    position: absolute; left: 0; top: -1px; color: var(--accent); font-size: 0.95rem;
}
.constitution-values span { color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .constitution-inner { grid-template-columns: 1fr; text-align: center; }
    .constitution-frame { max-width: 320px; margin: 0 auto; transform: none; }
    .constitution-frame.in-view { transform: none; }
    .constitution-copy > p { margin-left: auto; margin-right: auto; }
    .constitution-values { justify-items: center; text-align: left; max-width: 360px; margin: 0 auto; }
}

@media (max-width: 720px) {
    header { flex-direction: column; gap: 0.7rem; align-items: flex-start; padding: 0.9rem 1.2rem; }
    nav { gap: 1.2rem; flex-wrap: wrap; }
    .section { padding: 3.5rem 0; }
    .hero { padding: 5rem 5% 4.5rem; }
    .splash-doc { width: min(34vh, 230px); }
    .error-main { min-height: calc(100vh - 120px); }
}

/* ===========================================================
   404 / error page
   =========================================================== */
.error-main {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    background:
        radial-gradient(ellipse at center, rgba(196,154,69,0.10) 0%, rgba(247,248,250,0) 60%),
        var(--bg-light);
}
.error-inner { max-width: 560px; }
.error-code {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(5.5rem, 18vw, 9rem);
    line-height: 1;
    color: var(--primary);
    letter-spacing: 2px;
    display: inline-block;
}
.error-code::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    background: var(--accent);
    margin: 1.2rem auto 0;
}
.error-eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-600);
    margin-bottom: 1.4rem;
}
.error-inner h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 1.6rem 0 1rem; }
.error-inner p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2.2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.error-actions .btn-primary { background: var(--primary); color: #fff; }
.error-actions .btn-primary:hover { background: var(--accent); color: var(--primary-900); }
.error-actions .btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.error-actions .btn-outline:hover { border-color: var(--accent); color: var(--accent-600); }

/* ===========================================================
   Bio card -> profile link
   =========================================================== */
.bio-card { position: relative; }
.bio-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    margin-top: 1.1rem; font-weight: 600; font-size: 0.9rem;
    color: var(--accent-600); text-decoration: none;
}
.bio-link span { transition: transform 0.2s ease; }
.bio-card:hover .bio-link span { transform: translateX(4px); }
.bio-link::after { content: ""; position: absolute; inset: 0; } /* stretch click target over whole card */

/* ===========================================================
   Profile pages
   =========================================================== */
.breadcrumb { background: #fff; border-bottom: 1px solid var(--border); }
.breadcrumb-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0.85rem 1.5rem;
    font-size: 0.82rem; color: var(--text-muted);
}
.breadcrumb-inner a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-inner a:hover { color: var(--accent-600); }
.breadcrumb-sep { margin: 0 0.55rem; color: #c3ccd3; }
.breadcrumb-inner [aria-current] { color: var(--primary); font-weight: 600; }

.profile-hero {
    color: var(--text-light);
    padding: clamp(3rem, 6vw, 5rem) 0;
    background:
        radial-gradient(circle at 78% 25%, rgba(196,154,69,0.10), transparent 45%),
        linear-gradient(180deg, var(--primary) 0%, var(--primary-700) 100%);
}
.profile-hero-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 290px 1fr; gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.profile-photo {
    padding: 0.75rem;
    background: linear-gradient(160deg, var(--accent), var(--accent-600));
    border-radius: 6px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.profile-photo img {
    border-radius: 3px; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center top;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.profile-headline .eyebrow { color: var(--accent); }
.profile-headline h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.5rem; }
.profile-title {
    font-family: var(--serif); font-style: italic; color: var(--accent);
    font-size: 1.15rem; margin-bottom: 1.3rem;
}
.profile-lead { color: #cdd8e0; font-size: 1.08rem; max-width: 52ch; margin-bottom: 1.8rem; }
.profile-hero .hero-actions { justify-content: flex-start; }

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}
.profile-content h2 { font-size: 1.5rem; margin: 0 0 1rem; }
.profile-content h2:not(:first-child) { margin-top: 2.4rem; }
.profile-content p { color: var(--text-muted); margin-bottom: 1.1rem; }
.profile-timeline { list-style: none; display: grid; gap: 1.2rem; margin-top: 0.5rem; }
.profile-timeline li { padding-left: 1.4rem; position: relative; }
.profile-timeline li::before {
    content: ""; position: absolute; left: 0; top: 0.55rem;
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.profile-timeline strong { display: block; color: var(--primary); font-family: var(--serif); }
.profile-timeline span { color: var(--text-muted); font-size: 0.95rem; }

.profile-aside { display: grid; gap: 1.5rem; position: sticky; top: 92px; }
.aside-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow-sm);
}
.aside-card h3 {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--accent-600); margin-bottom: 1.1rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    background: #eef2f6; color: var(--primary); border: 1px solid var(--border);
    padding: 0.4rem 0.85rem; border-radius: 50px; font-size: 0.82rem; font-weight: 500;
}
.facts { list-style: none; display: grid; gap: 0.95rem; }
.facts li { display: grid; gap: 0.15rem; }
.facts dt, .facts .fact-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);
}
.facts .fact-value { color: var(--text-dark); font-weight: 500; font-size: 0.95rem; }
.aside-cta { background: var(--primary); color: #fff; border-color: var(--primary); }
.aside-cta h3 { color: var(--accent); }
.aside-cta p { color: #cdd8e0; font-size: 0.9rem; margin-bottom: 1.1rem; }
.aside-cta .btn { width: 100%; text-align: center; }

@media (max-width: 820px) {
    .profile-hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .profile-photo { max-width: 250px; }
    .profile-lead { margin-left: auto; margin-right: auto; }
    .profile-hero .hero-actions { justify-content: center; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-aside { position: static; }
}

/* Honour reduced-motion: no animations, no transforms */
@media (prefers-reduced-motion: reduce) {
    .constitution-frame, .constitution-copy { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}
