/* ============================================================================
   ATELIER — Design Tokens
   Palette: near-black ink on warm off-white, one quiet champagne accent.
   Type: Fraunces (display, editorial) + Inter (UI/body, Apple-like neutrality).
   ============================================================================ */

:root {
    /* ---- Color: base ---- */
    --bg:              #FFFFFF;
    --bg-off:          #F6F4F0;      /* warm off-white, not cream/terracotta */
    --bg-sunk:         #EFECE6;
    --ink:             #14120F;      /* near-black, slightly warm */
    --ink-soft:        #3A362F;
    --text-muted:      #83786A;
    --border:          #E4DFD6;
    --border-strong:   #CFC8BA;

    /* ---- Color: accent (used sparingly — badges, focus, price emphasis) ---- */
    --accent:          #9C7A45;      /* quiet champagne/brass */
    --accent-soft:     #EFE6D6;
    --danger:          #A3372E;
    --success:         #3F6B4C;

    /* ---- Glass surfaces ---- */
    --surface-glass:      rgba(255, 255, 255, 0.66);
    --surface-glass-dark: rgba(20, 18, 15, 0.72);
    --glass-border:        rgba(20, 18, 15, 0.08);
    --blur:                14px;

    /* ---- Shadow ---- */
    --shadow-sm: 0 1px 2px rgba(20, 18, 15, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 18, 15, 0.08);
    --shadow-lg: 0 20px 60px rgba(20, 18, 15, 0.14);

    /* ---- Radius ---- */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    /* ---- Type ---- */
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ---- Layout ---- */
    --container: 1320px;
    --nav-height: 76px;
    --transition: 220ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.section {
    padding: 88px 0;
}
.section--tight { padding: 56px 0; }
.section--sunk { background: var(--bg-off); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 6px 0 0; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); padding: 10px 16px; }
.btn-ghost:hover { background: var(--bg-sunk); }
.btn-sm { padding: 9px 18px; font-size: 11px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: #fff; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.input, select.input, textarea.input {
    width: 100%;
    padding: 13px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(20,18,15,0.08);
}
textarea.input { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--ink); }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--bg);
}
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--outline { background: transparent; border: 1px solid var(--border-strong); color: var(--ink-soft); }
.badge--muted { background: var(--bg-sunk); color: var(--text-muted); }

/* ---- Glass utility ---- */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
    border: 1px solid var(--glass-border);
}

/* ---- Flash messages ---- */
.flash-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.flash {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    box-shadow: var(--shadow-md);
    animation: flash-in 260ms ease;
}
.flash--success { background: var(--ink); color: var(--bg); }
.flash--error { background: var(--danger); color: #fff; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 640px) {
    .flash-stack { left: 16px; right: 16px; top: 16px; max-width: none; }
}

/* ---- Skeleton / empty states ---- */
.empty-state {
    text-align: center;
    padding: 100px 24px;
}
.empty-state h2 { font-size: 26px; margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ---- Utility ---- */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
