/* =========================================================================
   SnapsJo — Main Design System (shared across all pages)
   Warm atelier palette. Mobile-first. PageSpeed-focused.
   ========================================================================= */

:root {
    --ink: #171412;
    --charcoal: #2A211C;
    --porcelain: #FAF7F2;
    --canvas: #F3E7D3;
    --oat: #E8DCC8;
    --clay: #B87952;
    --terracotta: #D66A3D;
    --gold: #E7C873;
    --amber: #F4B860;
    --sage: #A8B9A3;
    --olive: #3F4A35;
    --rose: #D9A6A0;
    --blush: #F7D6CE;
    --mint: #DDE8D5;
    --shadow: rgba(42, 33, 28, 0.12);

    --text-900: #171412;
    --text-700: #3F362F;
    --text-600: #5C5046;
    --text-500: #85796B;
    --text-400: #A89B8B;

    --line: rgba(42, 33, 28, 0.10);
    --line-warm: rgba(184, 121, 82, 0.22);
    --line-strong: rgba(42, 33, 28, 0.16);

    --paper: rgba(255, 252, 246, 0.92);
    --vellum: rgba(250, 247, 242, 0.72);

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 22px;
    --r-xl: 28px;
    --r-pill: 9999px;

    --sh-xs: 0 1px 2px rgba(42, 33, 28, 0.06);
    --sh-sm: 0 6px 18px rgba(42, 33, 28, 0.07);
    --sh: 0 18px 50px rgba(42, 33, 28, 0.10);
    --sh-lg: 0 28px 80px rgba(42, 33, 28, 0.14);
    --sh-warm: 0 24px 70px rgba(184, 121, 82, 0.16);

    --ease: cubic-bezier(.22, 1, .36, 1);
    --t: 220ms var(--ease);

    --w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.has-site-header:not(.landing-body) {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body.has-site-header:not(.landing-body) #main {
    flex: 1 0 auto;
}
body.has-site-header:not(.landing-body) .site-footer {
    flex-shrink: 0;
}
body {
    margin: 0;
    background: var(--porcelain);
    color: var(--text-900);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: transparent; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
}
p { margin: 0; color: var(--text-600); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--w);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Use padding-block for vertical spacing on .container — never padding: X 0 Y (clears side insets). */
.legal-page {
    padding-block: 24px 60px;
}
.portrait-world-page {
    padding-block: 36px 72px;
    max-width: 760px;
}
.container--pad-lg {
    padding-block: 48px;
}
.container--pad-md {
    padding-block: 40px;
}

@media (max-width: 959px) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left, 0px));
        padding-right: max(20px, env(safe-area-inset-right, 0px));
    }
}
@media (max-width: 479px) {
    .container {
        padding-left: max(18px, env(safe-area-inset-left, 0px));
        padding-right: max(18px, env(safe-area-inset-right, 0px));
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1;
    border: 1px solid transparent;
    transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--ink); color: var(--porcelain); }
.btn--primary:hover { background: var(--charcoal); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line-warm); }
.btn--ghost:hover { border-color: var(--clay); color: var(--clay); }
.btn--gold { background: linear-gradient(135deg, var(--gold), var(--terracotta)); color: var(--ink); }
.btn--gold:hover { transform: translateY(-1px); box-shadow: var(--sh-warm); }
.btn--lg { padding: 14px 22px; font-size: 15px; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn.is-loading {
    opacity: 0.7; pointer-events: none;
}
.btn.is-loading::after {
    content: "";
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin .8s linear infinite;
    margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bubble header (marketing) ---------- */
.bubble-header {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 28px); max-width: 980px;
    z-index: 50;
    background: rgba(255, 252, 246, 0.85);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border: 1px solid var(--line-warm);
    border-radius: var(--r-pill);
    box-shadow: var(--sh-sm);
    transition: top .42s var(--ease), max-width .42s var(--ease), border-radius .42s var(--ease), background .42s var(--ease), box-shadow .42s var(--ease);
}
.bubble-header__inner { padding: 10px 12px 10px 18px; }
.bubble-header.header-scrolled {
    top: 0; max-width: 100%; border-radius: 0; background: rgba(255, 252, 246, 0.96);
    box-shadow: 0 8px 24px rgba(42, 33, 28, 0.08);
    border-left: 0; border-right: 0;
}
.bubble-header.header-scrolled .bubble-header__inner {
    max-width: var(--w); margin: 0 auto; padding: 10px 20px;
}
body.has-site-header:not(.landing-body) {
    padding-top: calc(var(--site-header-offset, 16px) + var(--site-header-height, 60px) + 12px);
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav__toggle { margin-left: auto; }
@media (min-width: 920px) {
    .nav {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
    }
    .nav__toggle { margin-left: 0; }
}
.brand {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 17px; color: var(--ink);
}
.brand--logo { gap: 0; line-height: 0; }
.brand__logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(180px, 46vw);
    object-fit: contain;
    background: transparent;
}
.brand--logo-footer {
    display: inline-flex;
    padding: 0;
    border-radius: 0;
    background: transparent;
}
.footer-brand .brand--logo-footer { margin-bottom: 4px; }
.brand__mark {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ink), var(--olive));
    color: var(--gold);
}
.brand__mark svg { width: 18px; height: 18px; }
.nav__links { display: none; justify-content: center; gap: 22px; font-size: 14px; color: var(--text-700); }
.nav__links a { padding: 6px 2px; transition: color var(--t); }
.nav__links a:hover { color: var(--clay); }
.nav__cta { display: none; }
.nav__toggle {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--paper); border: 1px solid var(--line-warm); color: var(--ink);
}
.nav__toggle svg { width: 20px; height: 20px; }
@media (min-width: 920px) {
    .nav__links { display: inline-flex; }
    .nav__cta   { display: inline-flex; }
    .nav__toggle { display: none; }
}

.mobile-menu {
    position: fixed; top: 84px; left: 14px; right: 14px;
    background: rgba(255, 252, 246, 0.98);
    border: 1px solid var(--line-warm);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 49;
}
.mobile-menu__nav,
.mobile-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-menu__actions {
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.mobile-menu a:not(.btn) {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--ink);
}
.mobile-menu a:not(.btn):hover { background: var(--canvas); color: var(--clay); }
.mobile-menu a.mobile-menu__muted {
    justify-content: center;
    font-size: 14px;
    color: var(--text-500);
}
.mobile-menu a.mobile-menu__muted:hover {
    background: transparent;
    color: var(--clay);
}
.mobile-menu a.btn {
    min-height: 48px;
    justify-content: center;
    font-weight: 600;
}
.mobile-menu a.btn--primary {
    color: var(--porcelain);
    background: var(--ink);
}
.mobile-menu a.btn--primary:hover {
    color: var(--porcelain);
    background: var(--charcoal);
}
.mobile-menu a.btn--gold { color: var(--ink); }
.mobile-menu.is-open { display: flex; }
@media (min-width: 920px) { .mobile-menu.is-open { display: none; } }

/* ---------- Footer (marketing) ---------- */
.site-footer { background: var(--ink); color: rgba(250, 247, 242, 0.72); padding: 56px 0 24px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.footer-grid h4 { color: var(--gold); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; font-family: 'Inter', sans-serif; }
.footer-grid a { display: block; padding: 7px 0; color: rgba(250, 247, 242, 0.72); font-size: 14px; transition: color var(--t); }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { color: rgba(250, 247, 242, 0.6); font-size: 14px; max-width: 36ch; margin-top: 14px; }
.footer-brand .brand { color: var(--porcelain); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(231, 200, 115, 0.12); display: flex; flex-direction: column; gap: 8px; justify-content: space-between; align-items: center; color: rgba(250, 247, 242, 0.45); font-size: 13px; }

/* Accessibility: skip-to-content link (marketing pages share main.css) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    z-index: 9999;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible {
    left: 16px;
    top: 12px;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    padding: 10px 14px;
    background: var(--ink, #171412);
    color: #faf7f2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    outline: 3px solid var(--clay, #b87952);
    outline-offset: 2px;
}

.footer-brand__contact { margin-top: 6px !important; }
.footer-brand__contact a { display: inline; padding: 0; color: var(--gold); font-weight: 600; }
.footer-trust {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-trust li {
    font-size: 12.5px;
    color: rgba(250, 247, 242, 0.65);
    font-weight: 500;
    line-height: 1.4;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 44px; }
    .footer-bottom { flex-direction: row; }
}

/* ---------- Forms ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 13.5px; font-weight: 600; color: var(--text-700); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--porcelain);
    color: var(--ink);
    font: inherit;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(184, 121, 82, 0.18); }
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row .field-help { font-size: 12.5px; color: var(--text-500); }
.form-row .field-error { font-size: 12.5px; color: #b3261e; }
.form-row.has-error input,
.form-row.has-error textarea { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.10); }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 999; pointer-events: none; }
.toast {
    pointer-events: auto;
    min-width: 220px; max-width: 360px;
    padding: 12px 14px;
    background: var(--ink); color: var(--porcelain);
    border-radius: 12px;
    box-shadow: var(--sh-lg);
    font-size: 14px; line-height: 1.45;
    border-left: 3px solid var(--gold);
    transform: translateY(6px); opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translateY(0); }
.toast--success { border-left-color: var(--sage); }
.toast--error   { border-left-color: #ff6b6b; }
.toast--info    { border-left-color: var(--gold); }

/* ---------- Eyebrow / Section heading helpers ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: var(--r-pill);
    background: var(--paper);
    border: 1px solid var(--line-warm);
    color: var(--clay);
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.italic-accent { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500; color: var(--clay); }

/* ---------- Card ---------- */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: var(--sh-sm);
}
.card--bordered { border-color: var(--line-warm); }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p  { font-size: 14.5px; }

/* ---------- Reveal animations (shared) ---------- */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 720ms var(--ease), transform 720ms var(--ease); will-change: opacity, transform; }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }
}
