:root {
    --paper: #f4efe4;
    --paper-soft: rgba(255, 251, 245, 0.82);
    --paper-strong: rgba(255, 255, 255, 0.92);
    --ink: #173042;
    --ink-soft: #476173;
    --line: rgba(23, 48, 66, 0.14);
    --steel: #1f587d;
    --rust: #c3643d;
    --sage: #6f7d56;
    --gold: #c59f52;
    --shadow: 0 28px 80px rgba(23, 48, 66, 0.12);
    --radius: 26px;
    --radius-sm: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "IBM Plex Sans", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(197, 159, 82, 0.16), transparent 24%),
        radial-gradient(circle at 85% 10%, rgba(31, 88, 125, 0.14), transparent 28%),
        linear-gradient(180deg, #f7f2e9 0%, #f4efe4 48%, #efe7d8 100%);
}

.page-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 48, 66, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 48, 66, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 92%);
    opacity: 0.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input {
    font: inherit;
}

.shell {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 239, 228, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(23, 48, 66, 0.08);
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand__mark {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--steel), var(--rust));
    box-shadow: var(--shadow);
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.brand__text strong {
    font-size: 1rem;
}

.brand__text span {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav__link {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--ink-soft);
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link.is-active {
    background: rgba(31, 88, 125, 0.1);
    color: var(--ink);
    transform: translateY(-1px);
}

.hero,
.page-hero {
    padding: 4.5rem 0 2rem;
}

.page-hero--compact {
    padding-bottom: 0.5rem;
}

.hero__grid,
.experience-layout,
.room-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 1.5rem;
}

.hero__content,
.hero__panel,
.panel,
.info-card,
.project-card,
.metric-card,
.doc-card,
.archive-tile,
.timeline-card,
.summary-card,
.room-card,
.calculator-card,
.empty-card {
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero__content {
    padding: 2.7rem;
}

.hero__content h1,
.page-hero h1,
.section-heading h2,
.timeline-card h2,
.panel h3,
.doc-card h3,
.project-card h3,
.room-card h3,
.calculator-card h3 {
    margin: 0;
    font-family: "Syne", sans-serif;
    letter-spacing: -0.03em;
}

.hero__content h1,
.page-hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 0.95;
}

.hero__lead {
    margin: 1rem 0 0;
    max-width: 44rem;
    font-size: 1.18rem;
    color: var(--ink);
}

.hero__copy,
.section-heading p,
.info-card p,
.project-card p,
.doc-card p,
.timeline-card p,
.room-card p,
.panel p,
.empty-card p,
.calculator-card p {
    color: var(--ink-soft);
    line-height: 1.7;
}

.hero__actions,
.split-cta__actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(23, 48, 66, 0.12);
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--steel), var(--rust));
}

.button--ghost {
    border-color: rgba(23, 48, 66, 0.14);
    background: rgba(255, 255, 255, 0.52);
}

.hero__panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.panel,
.timeline-card,
.project-card,
.doc-card,
.room-card,
.calculator-card,
.empty-card,
.info-card {
    padding: 1.45rem;
}

.panel--large {
    padding: 1.8rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--steel);
}

.eyebrow--soft {
    color: var(--sage);
}

.contact-list,
.feature-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--ink-soft);
}

.contact-list li,
.feature-list li {
    margin: 0.45rem 0;
}

.metric-grid,
.archive-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.summary-card {
    padding: 1.2rem;
}

.metric-card strong,
.summary-card strong,
.archive-tile__count {
    display: block;
    font-family: "Syne", sans-serif;
    font-size: 2rem;
    line-height: 1;
}

.metric-card span,
.summary-card span {
    display: block;
    margin-top: 0.5rem;
    color: var(--ink-soft);
}

.section {
    padding: 1.8rem 0 2.6rem;
}

.section--accent {
    background: linear-gradient(180deg, rgba(31, 88, 125, 0.05), rgba(195, 100, 61, 0.05));
    border-top: 1px solid rgba(23, 48, 66, 0.05);
    border-bottom: 1px solid rgba(23, 48, 66, 0.05);
}

.section--tight {
    padding-top: 0;
    padding-bottom: 0;
}

.section-heading {
    max-width: 52rem;
    margin-bottom: 1.4rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
}

.card-grid {
    display: grid;
    gap: 1rem;
}

.card-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card__meta,
.doc-card__meta,
.room-card__meta,
.timeline-card__header,
.room-meta {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.9rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.pill,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.95rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 88, 125, 0.15);
    background: rgba(31, 88, 125, 0.08);
    color: var(--steel);
    font-size: 0.85rem;
    font-weight: 600;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.doc-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}

.doc-card__footer a,
.text-link {
    color: var(--rust);
    font-weight: 600;
}

.archive-tile {
    padding: 1.2rem;
}

.split-cta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--paper-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline-card h3 {
    margin: 0.35rem 0 0.75rem;
    color: var(--ink-soft);
    font-size: 1rem;
}

.timeline-card__location {
    font-size: 0.92rem;
}

.sidebar-stack {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.archive-summary-grid {
    margin-top: 1.4rem;
}

.summary-card {
    text-align: center;
}

.filter-bar {
    margin-bottom: 1.4rem;
}

.filter-field,
.field {
    display: grid;
    gap: 0.5rem;
}

.filter-field span,
.field span {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.filter-field input,
.field input {
    width: 100%;
    min-height: 3rem;
    padding: 0.82rem 0.95rem;
    border: 1px solid rgba(23, 48, 66, 0.16);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
}

.collection-section {
    margin-top: 2rem;
}

.collection-section__header {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.collection-section__header h2 {
    margin: 0;
    font-family: "Syne", sans-serif;
    font-size: 2rem;
}

.empty-card {
    background: rgba(255, 255, 255, 0.6);
}

.calculator-card {
    display: grid;
    gap: 0.85rem;
}

.formula {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.calculator-result {
    min-height: 4.2rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
}

.room-card__expiry {
    margin: 0.6rem 0 1rem;
}

.notice {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(31, 88, 125, 0.12);
    background: rgba(31, 88, 125, 0.08);
    color: var(--ink);
}

.notice--warning {
    border-color: rgba(195, 100, 61, 0.18);
    background: rgba(195, 100, 61, 0.08);
}

.notice--success {
    border-color: rgba(111, 125, 86, 0.18);
    background: rgba(111, 125, 86, 0.11);
}

.access-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.4rem;
}

.footer {
    padding: 2rem 0 3rem;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(23, 48, 66, 0.12);
}

.footer h2 {
    margin: 0;
    font-family: "Syne", sans-serif;
}

.footer p {
    margin: 0.35rem 0 0;
    color: var(--ink-soft);
}

.footer__links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.is-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .hero__grid,
    .experience-layout,
    .room-layout,
    .collection-section__header,
    .split-cta,
    .footer__inner {
        grid-template-columns: 1fr;
        display: grid;
    }

    .card-grid--three,
    .card-grid--four,
    .metric-grid,
    .archive-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid--two {
        grid-template-columns: 1fr;
    }

    .split-cta__actions,
    .footer__links {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .topbar__inner,
    .nav {
        align-items: flex-start;
    }

    .topbar__inner {
        flex-direction: column;
    }

    .hero,
    .page-hero {
        padding-top: 3rem;
    }

    .hero__content,
    .panel,
    .timeline-card,
    .project-card,
    .doc-card,
    .room-card,
    .calculator-card,
    .info-card,
    .empty-card {
        padding: 1.2rem;
    }

    .card-grid--three,
    .card-grid--four,
    .metric-grid,
    .archive-summary-grid {
        grid-template-columns: 1fr;
    }

    .doc-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
