/* ============================================================
   Life At 360 — base stylesheet: design tokens + shared UI.

   Editorial theme: pure black on white, hairline rules, and a
   single warm accent. Type does the work — Playfair Display SC
   for display, IBM Plex Serif for reading — so there are no
   rounded corners, tints, or drop shadows to soften it.
   ============================================================ */

:root {
    --font-headline: 'Playfair Display SC', 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    --font-ui: var(--font-body);

    --ink: #000000;
    --ink-soft: #888888;        /* meta lines, timestamps, bylines */
    --paper: #ffffff;
    --paper-card: #ffffff;
    --paper-muted: #f1f1f1;     /* tag chips, pull quotes */
    --rule: #eeeeee;            /* hairline dividers */
    --rule-strong: #000000;     /* structural rules: nav, masthead */
    --accent: #e5633f;
    --accent-dark: #c94a26;
    --success-bg: #eef5ec;
    --success-ink: #2d5a2f;
    --error-bg: #f9ecec;
    --error-ink: #cc2127;

    --radius: 0;
    --shadow: none;

    --wrap: 1170px;             /* content column width */
}

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

/* Links are black in body copy and only colour on hover — the
   accent is a highlight, not a default state. */
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus { color: var(--accent); }

::selection { background: #000; color: #fff; }
::-moz-selection { background: #000; color: #fff; }

code {
    font-family: Consolas, Menlo, monospace;
    font-size: 0.85em;
    background: #f0ede6;
    padding: 0.1em 0.35em;
    border-radius: var(--radius);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 0.3rem 0.85rem; font-size: 0.85rem; }

/* ---- Alerts ---- */
.alert {
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    border-left: 3px solid currentColor;
}
.alert-success { background: var(--success-bg); color: var(--success-ink); }
.alert-error { background: var(--error-bg); color: var(--error-ink); }

/* ---- Auth pages ---- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}
.auth-shell { width: 100%; max-width: 430px; text-align: center; }
.auth-masthead {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 2.1rem;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.01em;
    display: inline-block;
    border-top: 3px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    padding: 0.35rem 1.5rem;
}
.auth-tagline {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-soft);
    margin: 0.7rem 0 1.8rem;
}
.auth-card {
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 1.8rem;
    text-align: left;
}
.auth-title {
    font-family: var(--font-headline);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.auth-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.4rem; }
.auth-alt { margin-top: 1.4rem; font-size: 0.92rem; text-align: center; color: var(--ink-soft); }

/* ---- Forms ---- */
.field { margin-bottom: 1.1rem; }
.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}
.field input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
.field input:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
    border-color: var(--ink);
}
.field-error { color: var(--error-ink); font-size: 0.85rem; margin-top: 0.3rem; }
.field-hint { color: var(--ink-soft); font-size: 0.82rem; margin-top: 0.3rem; }

/* Honeypot — visually removed, still in the DOM for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---- Holding page ---- */
.holding-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
}
.holding-kicker {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
}
.holding-masthead {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 1.05;
    margin: 0.5rem 0;
}
.holding-tagline {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.rule {
    width: 120px;
    border: none;
    border-top: 1px solid var(--rule-strong);
    margin: 1.6rem auto;
}
.holding-note { max-width: 420px; color: var(--ink-soft); margin-bottom: 1.6rem; }
.holding-actions { display: flex; gap: 0.8rem; }

/* ---- Error pages ---- */
.error-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-page { text-align: center; padding: 2rem 1rem; }
.error-code {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
}
.error-page h1 {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    margin: 0.4rem 0 0.6rem;
}
.error-page p { color: var(--ink-soft); margin-bottom: 1.6rem; }

@media (max-width: 480px) {
    .auth-card { padding: 1.4rem 1.1rem; }
    .holding-actions { flex-direction: column; width: 100%; max-width: 280px; }
}

/* ============================================================
   Phase 3: public "Submit Your Story" page
   ============================================================ */
.submit-page { max-width: 760px; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.submit-header { text-align: center; margin-bottom: 1.8rem; }
.submit-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 2rem;
    margin: 1.2rem 0 0.5rem;
}
.submit-intro { color: var(--ink-soft); max-width: 540px; margin: 0 auto; }
.submit-form {
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem 1.6rem;
    text-align: left;
}
.submit-section { border: none; border-top: 1px solid var(--rule); padding: 1.2rem 0 0.4rem; margin-bottom: 1rem; }
.submit-section legend {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.15rem;
    padding-right: 0.8rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.2rem; }
.form-grid .span-2 { grid-column: span 2; }
.field select, .field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
.field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.field-checkbox label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 0.92rem;
}
.field-checkbox input { margin-top: 0.2rem; }
.label-note { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
.form-actions { margin-top: 1.2rem; }

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
}

/* ---- Accessibility & SEO furniture (§25) ---- */

/* Keyboard users must be able to jump the masthead and nav. The link
   only becomes visible once focused. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    text-decoration: none;
}
.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* Visible breadcrumbs, mirroring the BreadcrumbList structured data. */
.np-breadcrumbs {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin: 0 0 1rem;
}
.np-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.np-breadcrumbs li + li::before {
    content: "›";
    margin-right: 0.35rem;
    color: var(--rule);
}
.np-breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.np-breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.np-breadcrumbs [aria-current="page"] { color: var(--ink); }

/* Reserve the intrinsic aspect ratio so images never shift layout
   while they load (Cumulative Layout Shift). */
img[width][height] {
    height: auto;
    max-width: 100%;
}

/* In-article table of contents. */
.np-toc {
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    background: var(--paper-card);
    padding: 0.9rem 1.1rem;
    margin: 1.5rem 0;
    font-family: var(--font-ui);
}
.np-toc-title {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}
.np-toc ol { margin: 0; padding-left: 1.1rem; }
.np-toc li { margin: 0.2rem 0; font-size: 0.92rem; }
.np-toc a { color: var(--ink); text-decoration: none; }
.np-toc a:hover { color: var(--accent); text-decoration: underline; }
.np-toc .toc-h3 { padding-left: 0.8rem; }

/* Anchored headings: keep the target clear of the sticky masthead. */
.article-body h2[id],
.article-body h3[id],
.article-body h4[id] { scroll-margin-top: 1.5rem; }
