/* Shared styles for ThapalaBox legal / policy pages.
   Matches the coming-soon aesthetic (spice palette, DM Serif Display + Instrument Sans)
   but optimised for long-form reading. */

:root {
    --saffron: #E8872A;
    --turmeric: #F5B041;
    --cardamom: #2D5F3E;
    --cream: #FFF8F0;
    --charcoal: #1A1A18;
    --warm-gray: #8C8577;
    --spice-red: #C0392B;
    --line: #EFE6DA;
    --card: #FFFFFF;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Instrument Sans', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Faint grain, consistent with the landing page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 100;
}

/* ---------- Header ---------- */
.site-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }

.logo-mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--saffron), var(--turmeric));
    color: #fff;
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(232, 135, 42, 0.3);
}

.logo-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--charcoal);
}

.header-back {
    font-size: 0.85rem;
    color: var(--warm-gray);
    text-decoration: none;
    transition: color 0.2s;
}
.header-back:hover { color: var(--saffron); }

/* ---------- Document ---------- */
.doc {
    max-width: 820px;
    margin: 0.5rem auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.doc-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(26, 26, 24, 0.05);
}

.doc h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.doc-meta {
    color: var(--warm-gray);
    font-size: 0.85rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.doc-meta strong { color: var(--charcoal); font-weight: 600; }

.doc h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    margin: 2.5rem 0 0.75rem;
    color: var(--cardamom);
}

.doc h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--charcoal);
}

.doc p { margin-bottom: 1rem; color: #35332E; }

.doc ul, .doc ol { margin: 0 0 1rem 1.25rem; color: #35332E; }
.doc li { margin-bottom: 0.4rem; }

.doc a { color: var(--saffron); text-decoration: none; }
.doc a:hover { text-decoration: underline; }

.doc strong { font-weight: 600; color: var(--charcoal); }

/* Callout box for grievance officer / key contact blocks */
.callout {
    background: var(--cream);
    border: 1px solid var(--line);
    border-left: 4px solid var(--saffron);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.policy-table th, .policy-table td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
.policy-table th {
    background: var(--cream);
    font-weight: 600;
    color: var(--charcoal);
}
.policy-table td { color: #35332E; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 2.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.footer-links a {
    font-size: 0.85rem;
    color: var(--warm-gray);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--saffron); }
.footer-legal {
    font-size: 0.78rem;
    color: var(--warm-gray);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .doc-card { padding: 1.75rem; }
    .site-header { padding: 1.25rem 1.25rem; }
    .doc { padding: 0 1.25rem; }
}
