/*
 * Shell for the pages rendered through views/layout.php.
 * The landing page (views/home.php) carries its own styles; these tokens are
 * copied from it, so change both together.
 *
 * The @font-face rules behind --serif and --sans are the one thing the two
 * pages do share: assets/css/fonts.css, which both of them link.
 */

:root {
    --cream: #edebec;
    --ink: #2c3135;
    --coral: #f27482;
    --card: #ffffff;
    --line: #dcd9da;
    --muted: #4a4f52;
    --error: #b3223a;
    --serif: "IvyPresto Headline", Georgia, "Times New Roman", serif;
    --serif-italic: "IvyOra Display", Georgia, "Times New Roman", serif;
    --serif-italic-sm: "IvyJournal", Georgia, "Times New Roman", serif;
    --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--sans);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.8;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
}

h1 {
    font-family: var(--serif);
    font-weight: 100;
    font-size: 2.9rem;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* HEADER / FOOTER */

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(237, 235, 236, 0.92);
}

.site-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 24px;
}

.logo {
    display: block;
    line-height: 0;
}

.logo img {
    display: block;
    width: 220px;
    height: auto;
}

@media (max-width: 820px) {
    .logo img {
        width: 160px;
    }
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 72px 24px 96px;
}

.site-footer {
    text-align: center;
    padding: 32px 24px;
    font-size: 1rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.footer-links {
    margin-top: 10px;
    font-size: 0.9rem;
}

.footer-links a {
    text-decoration: underline;
    color: var(--ink);
}

.footer-links a:hover {
    color: var(--coral);
}

.footer-links .sep {
    margin: 0 4px;
    color: #8b9095;
}

/* FORM */

.lede {
    color: #000;
    font-size: 1.08rem;
    margin: 18px 0 40px;
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.field .optional {
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: none;
}

.field input,
.field textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--card);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.02rem;
    font-weight: 400;
    line-height: 1.6;
}

.field textarea {
    min-height: 130px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid var(--coral);
    outline-offset: 1px;
}

.field-error input,
.field-error textarea {
    border-color: var(--error);
}

.field .error {
    display: block;
    margin-top: 7px;
    font-size: 1rem;
    color: var(--error);
}

/* Bot trap: never shown, never announced, never tab-stopped. */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    border-left: 3px solid var(--error);
    background: var(--card);
    padding: 16px 20px;
    margin-bottom: 32px;
    font-size: 0.98rem;
}

.btn-primary {
    display: inline-block;
    border: none;
    cursor: pointer;
    background: var(--ink);
    color: #fff;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 18px 44px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--coral);
}

.microcopy {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 18px;
    letter-spacing: 0.5px;
}

/* LEGAL PAGES */

.legal {
    font-size: 1rem;
    line-height: 1.75;
}

.legal .meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 14px 0 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.legal h2 {
    font-family: var(--serif);
    font-weight: 100;
    font-size: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 44px 0 12px;
}

.legal h2 .num {
    color: var(--coral);
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 2px;
    margin-right: 1rem;
    vertical-align: 2px;
}

.legal h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 24px 0 6px;
}

.legal p {
    margin: 0 0 15px;
}

.legal ul {
    margin: 0 0 15px;
    padding-left: 22px;
}

.legal li {
    margin: 0 0 8px;
}

.legal a {
    color: var(--ink);
    text-decoration: underline;
}

.legal strong {
    font-weight: 500;
}

.legal .toc {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 20px 24px;
    margin: 32px 0 8px;
}

.legal .toc-title {
    font-size: 0.86rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 10px;
}

.legal .toc ol {
    margin: 0;
    padding-left: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.legal .toc li {
    margin: 0 0 4px;
}

.legal .table-scroll {
    overflow-x: auto;
    margin: 0 0 15px;
}

.legal table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.6;
}

.legal th,
.legal td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.legal th {
    background: var(--card);
    font-weight: 500;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--muted);
}
