/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Design Tokens ── */
:root {
    --navy:          #1a2744;
    --navy-mid:      #243259;
    --navy-light:    #2e3f6e;
    --gold:          #c8a84b;
    --gold-light:    #e2c97e;
    --gold-pale:     #fdf6e3;
    --parchment:     #f9f3e3;
    --parchment-mid: #f0e6c8;
    --text-dark:     #1a1a2e;
    --text-body:     #2e2e45;
    --text-muted:    #6b6b85;
    --white:         #ffffff;
    --border:        #d6c99a;
    --shadow-sm:     0 1px 4px rgba(0,0,0,0.10);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.13);
    --radius:        10px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: Georgia, 'Palatino Linotype', Palatino, 'Book Antiqua', serif;
    line-height: 1.8;
    color: var(--text-body);
    background-color: var(--parchment);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: Georgia, 'Palatino Linotype', Palatino, serif;
    line-height: 1.3;
    color: var(--navy);
}

p {
    margin-bottom: 0.9rem;
    color: var(--text-body);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--navy-light);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--gold);
}

img {
    max-width: 100%;
    display: block;
}

/* ── Top Bar ── */
.top-bar {
    background-color: var(--navy);
    color: var(--gold-light);
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    padding: 0.4rem 1rem;
    text-transform: uppercase;
}

/* ── Header ── */
header {
    position: relative;
    color: white;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    background-image: url('/img/l-noah01.png');
    background-size: cover;
    background-position: center 40%;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 22, 50, 0.72) 0%,
        rgba(20, 28, 65, 0.82) 100%
    );
    z-index: 0;
}

header::after {
    content: '✡';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14rem;
    color: rgba(200, 168, 75, 0.06);
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.header-inner {
    position: relative;
    z-index: 1;
}

.header-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    margin: 0 auto 1rem;
    box-shadow: 0 0 0 5px rgba(200,168,75,0.18), 0 4px 20px rgba(0,0,0,0.5);
}

header h1 {
    font-size: clamp(1.7rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--gold-light);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 0.4rem;
}

header p {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    opacity: 0.88;
    font-style: italic;
    color: rgba(255,255,255,0.88);
    margin-bottom: 0;
    letter-spacing: 0.04em;
}

/* ── Language Switcher ── */
.lang-switch {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.25rem;
    background-color: var(--navy-mid);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
}

.lang-switch span {
    color: var(--gold-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lang-switch a {
    text-decoration: none;
    padding: 0.18rem 0.6rem;
    border-radius: 4px;
    color: var(--gold-light);
    border: 1px solid var(--gold);
    transition: background-color 0.2s, color 0.2s;
}

.lang-switch a:hover {
    background-color: var(--gold);
    color: var(--navy);
}

.lang-switch a.current-lang {
    background-color: var(--gold);
    color: var(--navy);
    pointer-events: none;
    font-weight: 700;
}

/* ── Nav ── */
nav {
    background-color: var(--navy);
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--gold);
}

nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 0.75rem 1.1rem;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    color: var(--gold-light);
    border-bottom: 3px solid var(--gold);
}

/* ── Divider Ornament ── */
.ornament {
    text-align: center;
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    opacity: 0.6;
    padding: 0.3rem 0;
    user-select: none;
}

/* ── Layout ── */
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Featured Image Banner ── */
.featured-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border);
}

/* ── Section Cards ── */
section {
    background-color: var(--white);
    padding: 2rem 2.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--gold);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

section h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--parchment-mid);
}

section h2::before {
    content: '✦ ';
    color: var(--gold);
    font-size: 0.75em;
}

/* ── Lists ── */
.law-list,
.obligation-list {
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
}

.law-list li,
.obligation-list li {
    border-bottom: 1px solid var(--parchment-mid);
}

.law-list li:last-child,
.obligation-list li:last-child {
    border-bottom: none;
}

.law-list li a {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.8rem 0.6rem;
    border-radius: 6px;
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.97rem;
    transition: background-color 0.18s ease;
}

.law-list li a:hover {
    background-color: var(--gold-pale);
    color: var(--navy);
}

.law-list li a strong {
    color: var(--navy);
    min-width: fit-content;
}

.obligation-list li {
    padding: 0.6rem 0.4rem;
    font-size: 0.97rem;
    color: var(--text-body);
}

.obligation-list li a {
    font-weight: 600;
    color: var(--navy-light);
}

.obligation-list li a:hover {
    color: var(--gold);
}

/* ── Resource List ── */
.resource-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.resource-list li {
    padding: 0.9rem 1rem;
    border-radius: 7px;
    border: 1px solid var(--border);
    margin-bottom: 0.7rem;
    background-color: var(--gold-pale);
}

.resource-list li strong {
    display: block;
    color: var(--navy);
    font-size: 0.97rem;
    margin-bottom: 0.2rem;
}

.resource-list li em {
    display: block;
    font-size: 0.87rem;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 0.15rem;
}

/* ── Contact List ── */
.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.contact-list li {
    display: flex;
    gap: 0.6rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--parchment-mid);
    font-size: 0.97rem;
    flex-wrap: wrap;
}

.contact-list li:last-child {
    border-bottom: none;
}

/* ── Contact Form ── */
.contact-form {
    margin-top: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: 'Segoe UI', sans-serif;
}

.form-group input,
.form-group textarea {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--gold-pale);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,168,75,0.18);
    background-color: var(--white);
}

.contact-form button {
    align-self: flex-start;
    padding: 0.7rem 2rem;
    background-color: var(--navy);
    color: var(--gold-light);
    border: 2px solid var(--gold);
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-form button:hover {
    background-color: var(--gold);
    color: var(--navy);
}

/* ── Law Detail Page ── */
section.law-detail {
    max-width: 100%;
}

.law-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--navy);
    background-color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.7rem;
    font-family: 'Segoe UI', sans-serif;
}

section.law-detail h2 {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    border-bottom: none;
    margin-bottom: 0.5rem;
}

section.law-detail h2::before {
    content: '';
}

.law-summary {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--navy);
    margin-bottom: 1.8rem;
    padding: 0.8rem 1.1rem;
    background-color: var(--gold-pale);
    border-left: 4px solid var(--gold);
    border-radius: 0 6px 6px 0;
}

section.law-detail h3 {
    font-family: Georgia, serif;
    color: var(--navy-mid);
    font-size: 1.05rem;
    margin: 1.6rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--parchment-mid);
}

.law-detail-list {
    list-style: disc;
    margin: 0.6rem 0 0.8rem 1.5rem;
}

.law-detail-list li {
    margin-bottom: 0.45rem;
    font-size: 0.97rem;
    color: var(--text-body);
}

.law-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 2px solid var(--parchment-mid);
    flex-wrap: wrap;
    gap: 0.7rem;
}

.law-nav a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 5px;
    font-family: 'Segoe UI', sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.law-nav a:hover {
    background-color: var(--navy);
    color: var(--gold-light);
    border-color: var(--navy);
}

.law-nav span {
    display: inline-block;
}

/* ── History Page ── */
.history-entry {
    margin-top: 2rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--parchment-mid);
}

.history-entry:first-of-type {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
}

.history-entry h3 {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--navy);
    margin-bottom: 0.2rem;
}

.history-period {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--navy);
    background-color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.9rem;
    font-family: 'Segoe UI', sans-serif;
}

.history-entry p {
    font-size: 0.97rem;
    line-height: 1.8;
}

.history-quote {
    margin: 1.2rem 0;
    padding: 1rem 1.3rem;
    border-left: 4px solid var(--gold);
    background-color: var(--gold-pale);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--navy-mid);
    font-size: 0.97rem;
    line-height: 1.7;
}

/* ── Footer ── */
footer {
    background: var(--navy);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-family: 'Segoe UI', sans-serif;
    border-top: 3px solid var(--gold);
}

footer p {
    color: rgba(255,255,255,0.7);
}

footer .footer-star {
    color: var(--gold);
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* ── Mobile: 768px ── */
@media (max-width: 768px) {
    nav {
        gap: 0;
        padding: 0 0.25rem;
        position: static;
    }

    nav a {
        font-size: 0.82rem;
        padding: 0.6rem 0.7rem;
    }

    section {
        padding: 1.4rem 1.2rem;
    }

    .law-list li a {
        flex-direction: column;
        gap: 0.1rem;
    }

    .law-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ── Mobile: 480px ── */
@media (max-width: 480px) {
    header {
        padding: 2rem 1rem 1.8rem;
    }

    .header-logo {
        width: 70px;
        height: 70px;
    }

    .container {
        padding: 1rem 0.75rem;
        gap: 1rem;
    }

    section {
        padding: 1.2rem 1rem;
        border-radius: 7px;
    }

    section h2 {
        font-size: 1.15rem;
    }

    nav a {
        font-size: 0.78rem;
        padding: 0.55rem 0.55rem;
    }

    .contact-form button {
        width: 100%;
        text-align: center;
    }

    .law-nav a {
        width: 100%;
        text-align: center;
        display: block;
    }

    .resource-list li {
        padding: 0.75rem 0.75rem;
    }

    .lang-switch {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
}
