/* ================================================================
   WESTLAKE GOLDSMITHS — CORE DESIGN SYSTEM
   Editorial magazine DNA (inspired by INKD) applied to Westlake's
   warm stone/cream/earth palette. Shared by all pages.
   ================================================================ */

/* ── FONT FACES ──────────────────────────────────────────────── */
/* Kudryashev Display Sans is the intended wordmark face; files are
   not currently shipped in /fonts/. The `--brand` stack falls back to
   Cormorant Garamond, which is stylistically coherent. When font files
   are added to /fonts/, re-enable the @font-face block below and update
   the url() paths to match the page location (relative). */
/* Cormorant Garamond + Jost loaded via <link> in each page head */

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
    /* palette (preserved from original) */
    --stone:     #8b7355;
    --earth:     #3d3226;
    --shadow:    #5a4d3e;
    --dusk:      #a0937e;
    --cream:     #fefdfb;
    --deep:      #1a1512;
    --warm-gray: #b8a89a;

    /* semantic overlays (INKD pattern) */
    --ink:         var(--deep);   /* primary foreground / filled buttons */
    --paper:       var(--cream);  /* primary background */
    --muted:       var(--shadow); /* muted body copy */
    --muted-light: var(--warm-gray); /* eyebrows, metadata */
    --line:        rgba(61, 50, 38, 0.14);  /* hairline borders */
    --line-strong: rgba(61, 50, 38, 0.45);  /* hover/active borders */
    --selection:   var(--stone);

    /* fonts */
    --heading: 'Cormorant Garamond', Georgia, serif;
    --body:    'Jost', 'Gill Sans', sans-serif;
    --brand:   'Cinzel', 'Cormorant Garamond', Georgia, serif;

    /* rhythm */
    --band-h: 3.25rem; /* fixed header height */
}

/* ── BASE ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    font-weight: 400;
    color: var(--earth);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    font-size: 1rem;
    padding-top: var(--band-h);
}

::selection { background: var(--ink); color: var(--paper); }

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

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

/* ── TYPOGRAPHY UTILITIES ────────────────────────────────────── */
.eyebrow {
    font-family: var(--body);
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted-light);
}
.eyebrow--ink { color: var(--ink); }
.eyebrow--paper { color: var(--paper); }

.headline {
    font-family: var(--body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 0.88;
    color: var(--ink);
}
.headline--xl { font-size: clamp(2.75rem, 6.5vw, 6.25rem); }
.headline--lg { font-size: clamp(2rem, 4.5vw, 4rem); }
.headline--md { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.headline--sm { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }

.headline-italic {
    font-family: var(--heading);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
}

.pull-quote {
    font-family: var(--heading);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.5rem, 3.2vw, 2.75rem);
    line-height: 1.25;
    color: var(--earth);
    letter-spacing: 0;
}

.body-serif {
    font-family: var(--heading);
    font-style: italic;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.55;
    font-size: 1.05rem;
}

.body-sans {
    font-family: var(--body);
    font-weight: 400;
    color: var(--earth);
    line-height: 1.7;
    font-size: 0.95rem;
}

.caption-tag {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    background: var(--stone);
    color: var(--paper);
    font-family: var(--body);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    z-index: 2;
    white-space: nowrap;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.band {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
@media (min-width: 720px) {
    .band { padding: 0 2.5rem; }
}

.gutter-y { padding-top: 6rem; padding-bottom: 6rem; }
@media (min-width: 720px) {
    .gutter-y { padding-top: 8rem; padding-bottom: 8rem; }
}

.hairline { display: block; height: 1px; width: 100%; background: var(--line); }
.hairline--ink { background: var(--ink); height: 2px; width: 3rem; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--band-h);
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    z-index: 100;
    display: flex;
    align-items: center;
}
.site-header__inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
@media (min-width: 720px) {
    .site-header__inner { padding: 0 2.5rem; }
}

.site-header__mark {
    font-family: var(--brand);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.site-header__nav {
    display: none;
    gap: 1.75rem;
    align-items: center;
    list-style: none;
}
@media (min-width: 900px) {
    .site-header__nav { display: flex; }
}

.site-header__nav a,
.site-header__nav button {
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.25s;
}
.site-header__nav a:hover,
.site-header__nav button:hover { color: var(--ink); }
.site-header__nav a.is-active { color: var(--ink); }

a.site-header__cta,
.site-header__cta {
    display: inline-flex;
    align-items: center;
    background: var(--ink);
    color: var(--paper);
    padding: 0.65rem 1.1rem;
    font-family: var(--body);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    transition: background 0.25s;
}
a.site-header__cta:hover,
.site-header__cta:hover { background: var(--earth); color: var(--paper); }

.site-header__burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
@media (min-width: 900px) { .site-header__burger { display: none; } }
.site-header__burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.25s, opacity 0.25s;
}

.site-header__actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
}
@media (min-width: 900px) { .site-header__actions { display: flex; } }

.site-header__login {
    display: inline-flex;
    align-items: center;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--ink);
    padding: calc(0.65rem - 1px) 1.1rem;
    font-family: var(--body);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    transition: background 0.25s, color 0.25s;
}
.site-header__login:hover { background: var(--ink); color: var(--paper); }

.site-mobile-nav {
    position: fixed;
    top: var(--band-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    z-index: 99;
    display: none;
    flex-direction: column;
    padding: 2rem 2rem;
    gap: 1.25rem;
}
.site-mobile-nav.is-open { display: flex; }
.site-mobile-nav a {
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}
.site-mobile-nav__login {
    margin-top: auto;
    color: var(--muted) !important;
    font-size: 0.8125rem !important;
    border-bottom: none !important;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 0.95rem 1.75rem;
    border: 1px solid var(--ink);
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    text-decoration: none;
    white-space: nowrap;
}
.btn--ink {
    background: var(--ink);
    color: var(--paper);
}
.btn--ink:hover { background: var(--earth); }
.btn--ghost {
    background: transparent;
    color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--paper {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}
.btn--paper:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn--paper-ghost {
    background: transparent;
    color: var(--paper);
    border-color: rgba(254, 253, 251, 0.5);
}
.btn--paper-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.btn__arrow { display: inline-block; }

/* Text-link affordance (back arrows, discards) */
.text-link {
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.25s;
}
.text-link:hover { color: var(--ink); }
.text-link::before { content: '← '; }

/* ── CARD ────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 1.5rem;
    transition: border-color 0.25s, transform 0.25s;
    display: block;
    color: inherit;
}
.card:hover { border-color: var(--line-strong); }

/* ── PHOTO TILES (grayscale → color on hover) ────────────────── */
.photo-tile {
    position: relative;
    overflow: hidden;
    background: var(--stone);
    border-radius: 10%;
}
.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.7s ease, transform 0.7s ease;
    border-radius: 10%;
}
.photo-tile:hover img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.02);
}
.photo-tile--static img { filter: none; }
.photo-tile--static:hover img { transform: scale(1.02); }

.aspect-3-4 { aspect-ratio: 3 / 4; }
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-1 { aspect-ratio: 1 / 1; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

/* ── CHIP (option buttons for request flow) ──────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-checked="true"],
.chip.is-selected {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.chip__hint {
    margin-left: 0.6em;
    font-family: var(--heading);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.7;
    font-size: 0.8rem;
}

/* ── PROGRESS BAR (request flow) ─────────────────────────────── */
.progress-rail {
    position: sticky;
    top: var(--band-h);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    z-index: 50;
    padding: 0.75rem 0;
}
.progress-rail__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.progress-bar {
    flex: 1;
    display: flex;
    gap: 4px;
}
.progress-bar__seg {
    flex: 1;
    height: 2px;
    background: var(--line);
    transition: background 0.3s;
}
.progress-bar__seg.is-filled { background: var(--ink); }
.progress-bar__seg.is-active { background: var(--stone); }
.progress-count {
    font-family: var(--body);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted-light);
    white-space: nowrap;
}

/* ── STEP CARD (composer) ────────────────────────────────────── */
.step {
    padding: 3rem 1.5rem 5rem;
    max-width: 780px;
    margin: 0 auto;
}
.step__eyebrow { margin-bottom: 0.75rem; }
.step__question {
    font-family: var(--body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    letter-spacing: -0.01em;
    line-height: 0.95;
    color: var(--ink);
    margin-bottom: 0.75rem;
}
.step__subtitle {
    font-family: var(--heading);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
}
.step__breadcrumb {
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 2rem;
}
.step__breadcrumb span + span::before {
    content: ' · ';
    margin: 0 0.2em;
    color: var(--line-strong);
}
.step__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}
.step__options--stacked {
    flex-direction: column;
    align-items: stretch;
}
.step__options--stacked .chip { width: 100%; }
@media (min-width: 640px) {
    .step__options--2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
}
.step__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

/* ── INPUT ───────────────────────────────────────────────────── */
.field {
    display: block;
    margin-bottom: 1.25rem;
}
.field__label {
    display: block;
    font-family: var(--body);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 0.5rem;
}
.input, .textarea, .select {
    width: 100%;
    font-family: var(--body);
    font-size: 1rem;
    padding: 0.85rem 1rem;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    transition: border-color 0.25s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--ink);
}
.textarea { min-height: 140px; resize: vertical; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 21, 18, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1.5rem;
}
.modal-overlay.is-open { display: flex; }
.modal {
    background: var(--paper);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--ink);
}
.modal__header {
    position: sticky;
    top: 0;
    background: var(--paper);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}
.modal__footer {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.modal__body { padding: 1.5rem; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
    background: var(--deep);
    color: var(--cream);
    border-top: 1px solid var(--ink);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}
.site-footer__grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 720px) {
    .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; padding: 0 2.5rem; }
}
.site-footer__mark {
    font-family: var(--brand);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cream);
    margin-bottom: 0.75rem;
}
.site-footer__tagline {
    font-family: var(--heading);
    font-style: italic;
    color: rgba(254, 253, 251, 0.7);
    font-size: 0.95rem;
    max-width: 32ch;
}
.site-footer h4 {
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(254, 253, 251, 0.55);
    margin-bottom: 1.25rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.65rem; }
.site-footer a {
    font-family: var(--body);
    font-size: 0.8125rem;
    color: rgba(254, 253, 251, 0.85);
    transition: color 0.25s;
}
.site-footer a:hover { color: var(--cream); }
.site-footer__bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid rgba(254, 253, 251, 0.14);
    display: flex;
    justify-content: space-between;
    font-family: var(--body);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(254, 253, 251, 0.4);
}
@media (min-width: 720px) {
    .site-footer__bottom { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes chipIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.chip-in { animation: chipIn 0.35s ease both; }

/* Reduced-motion honors user preference: kill non-essential animation */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .photo-tile img { transition: none !important; transform: none !important; }
    .fade-up, .chip-in { animation: none !important; }
}

/* ── LEGAL LAYOUT ────────────────────────────────────────────── */
.legal-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 1024px) {
    .legal-layout {
        grid-template-columns: 220px 1fr;
        padding: 5rem 2.5rem 8rem;
        gap: 4rem;
    }
}
.legal-nav {
    position: sticky;
    top: calc(var(--band-h) + 1.5rem);
    align-self: start;
}
.legal-nav ul { list-style: none; }
.legal-nav li { margin-bottom: 0.75rem; }
.legal-nav a {
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted-light);
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: color 0.25s, border-color 0.25s;
}
.legal-nav a:hover { color: var(--ink); }
.legal-nav a.is-active {
    color: var(--ink);
    border-left-color: var(--ink);
}

.legal-article {
    max-width: 68ch;
    font-family: var(--body);
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--earth);
}
.legal-article h1 {
    font-family: var(--body);
    font-weight: 700;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 0.9;
    color: var(--ink);
    margin-bottom: 0.75rem;
}
.legal-article .updated {
    font-family: var(--heading);
    font-style: italic;
    color: var(--muted);
    margin-bottom: 3rem;
}
.legal-article h2 {
    font-family: var(--body);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    margin-top: 3rem;
    margin-bottom: 1rem;
    scroll-margin-top: calc(var(--band-h) + 1.5rem);
}
.legal-article h3 {
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--earth);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.legal-article p { margin-bottom: 1rem; }
.legal-article ul, .legal-article ol {
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}
.legal-article li { margin-bottom: 0.5rem; }
.legal-article strong { color: var(--ink); font-weight: 600; }
.legal-article a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-article .toc {
    border: 1px solid var(--line);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0 3rem;
}
.legal-article .toc strong {
    display: block;
    font-family: var(--body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 0.75rem;
}
.legal-article .toc ul {
    list-style: none;
    padding: 0;
    column-count: 1;
    column-gap: 2rem;
}
@media (min-width: 640px) {
    .legal-article .toc ul { column-count: 2; }
}
.legal-article .toc a {
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--earth);
}
.legal-article .toc a:hover { color: var(--ink); }
.legal-article .callout {
    border-left: 2px solid var(--ink);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin: 1.5rem 0;
    font-family: var(--heading);
    font-style: italic;
    color: var(--muted);
}
