/* ═══════════════════════════════════════════════════════════════════════════
   Forge 2026 — Public Web App
   Design bar: a premium, invitation-only MSP working room (cap doc §1) — NOT a
   generic SaaS conference app. Editorial serif display over a deep-ink field
   with warm gold accents and a cream paper ground. Mobile-first; ~108 phones.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --ink: #0f1a2b;          /* deep navy — primary field / header */
    --ink-soft: #1c2a3e;     /* raised ink surfaces */
    --paper: #f7f5f0;        /* warm cream ground */
    --card: #ffffff;
    --accent: #b8894a;       /* warm gold — the invitation accent */
    --accent-soft: #f0e6d6;  /* gold wash for chips/rails */
    --muted: #5b6472;
    --muted-2: #8a919d;
    --line: #e2ddd2;

    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --tabbar-h: 4.25rem;
    --maxw: 640px;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 26, 43, 0.04), 0 6px 20px rgba(15, 26, 43, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    /* Leave room for the fixed tab bar + the phone home indicator. */
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.app-header {
    background: var(--ink);
    color: var(--paper);
    padding:
        calc(1.6rem + env(safe-area-inset-top)) 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}
/* A quiet gold hairline seam under the header — an editorial rule, not a shadow. */
.app-header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
    opacity: 0.85;
}
.app-header__brand { min-width: 0; }
.kicker {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.45rem;
}
.wordmark {
    font-family: var(--font-display);
    font-size: 2.05rem;
    font-weight: 600;
    letter-spacing: 0.005em;
    line-height: 1.05;
}
.dates {
    display: block;
    font-size: 0.85rem;
    color: #c2c9d3;
    margin-top: 0.5rem;
}
.safety-pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(184, 137, 74, 0.55);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(184, 137, 74, 0.1);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}
.safety-pill:active { background: rgba(184, 137, 74, 0.22); }

/* ─── View container ─────────────────────────────────────────────────────── */
.app-view {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2rem;
}

/* ─── Section header (per-view) ──────────────────────────────────────────── */
.section-head { margin-bottom: 1.25rem; }
.section-head__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.section-head__title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    margin-top: 0.25rem;
    letter-spacing: 0.005em;
}
.section-head__sub {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 0.4rem;
}
.draft-ribbon {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.3rem 0.6rem;
    background: var(--accent-soft);
    color: #8a6321;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ─── Day switcher (segmented control) ───────────────────────────────────── */
.day-switch {
    display: flex;
    gap: 0.35rem;
    background: #ece7dd;
    border-radius: 12px;
    padding: 0.3rem;
    margin-bottom: 1.5rem;
}
.day-switch__btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 0.4rem;
    border-radius: 9px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
}
.day-switch__btn[aria-selected="true"] {
    background: var(--ink);
    color: var(--paper);
    box-shadow: var(--shadow);
}

/* ─── Schedule timeline ──────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0.85rem; }

.block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
    position: relative;
}
/* Left accent rail encodes block type at a glance. */
.block::before {
    content: "";
    position: absolute;
    left: 0; top: 0.9rem; bottom: 0.9rem;
    width: 3px;
    border-radius: 3px;
    background: var(--accent);
}
.block--meal::before      { background: #cbb78d; }
.block--peer-group::before{ background: #6b8f9c; }
.block--dinner-pod::before{ background: #a4739a; }
.block--bus-tour::before  { background: #7f9a6b; }
.block--breakout::before  { background: linear-gradient(180deg, var(--accent), #6b8f9c); }

.block__time {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
}
.block__type {
    display: inline-block;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-left: 0.5rem;
}
.block__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0.3rem;
    line-height: 1.25;
}
.block__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.block__meta .with-icon { display: inline-flex; align-items: center; gap: 0.3rem; }
.block__note {
    margin-top: 0.55rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Breakout: parallel rooms (the only parallelism, cap doc §3.2). */
.rooms {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 0.7rem;
}
@media (min-width: 480px) {
    .rooms { grid-template-columns: 1fr 1fr; }
}
.room {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
}
.room__label {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}
.room__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.2rem;
    color: var(--ink);
}
.room__speaker { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

/* ─── Placeholder / empty states ─────────────────────────────────────────── */
.placeholder, .empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}
.placeholder__mark, .empty-state__mark {
    width: 44px; height: 44px;
    margin: 0 auto 1rem;
    color: var(--accent);
    opacity: 0.9;
}
.placeholder__title, .empty-state__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.placeholder p, .empty-state p {
    font-size: 0.92rem;
    max-width: 30ch;
    margin: 0 auto;
    line-height: 1.5;
}

/* ─── Bottom tab bar ─────────────────────────────────────────────────────── */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    z-index: 50;
}
.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--muted-2);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding-top: 0.35rem;
    transition: color 0.15s ease;
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg { color: var(--accent); }

/* ─── Motion / accessibility ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
.app-view { animation: viewIn 0.22s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
