/* ══════════════════════════════════════════════════════
   SyncBy!App — shared "deck" design system (light)
   Used by: index, enterprise, about, privacy
   ══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* warm paper light theme */
    --paper: #fdfbf7;
    --paper-2: #f7f3ea;
    --ink: #211a12;
    --ink-soft: #5c5245;
    --ink-faint: #8a7f70;
    --line: #e7e0d2;
    --amber: #b45309;      /* WCAG-safe on paper */
    --amber-bright: #f59e0b;
    --amber-wash: #fef3e2;
    --green: #15803d;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
    --display: 'Space Grotesk', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;
    --max: 72rem;
    --gap: clamp(1.5rem, 5vw, 3rem);
    --radius: 14px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}
/* subtle paper grain */
body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none; z-index: 1;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber-bright); color: #fff; }

/* ── deck chrome: progress bar + slide counter ────── */
.deck-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--amber-bright), var(--amber));
    z-index: 300;
    transition: width 0.1s linear;
}
.deck-counter {
    position: fixed; right: 1.1rem; bottom: 1.1rem;
    z-index: 300;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    background: rgba(253, 251, 247, 0.9);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    backdrop-filter: blur(8px);
    user-select: none;
}
.deck-counter b { color: var(--amber); font-weight: 600; }
@media (max-width: 680px) { .deck-counter { display: none; } }

/* ── nav ─────────────────────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200;
    background: rgba(253, 251, 247, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gap);
    height: 3.6rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo {
    font-family: var(--display);
    font-weight: 700; font-size: 1.12rem; letter-spacing: -0.03em;
    display: inline-flex; align-items: center;
}
.nav-logo .mark {
    color: var(--amber-bright);
    display: inline-block;
    animation: bang-breathe 4s ease-in-out infinite;
}
@keyframes bang-breathe {
    0%, 100% { opacity: 1;   filter: brightness(1);   }
    50%      { opacity: 0.6; filter: brightness(1.4); }
}
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
    font-size: 0.82rem; font-weight: 500; color: var(--ink-soft);
    padding: 0.4rem 0.75rem; border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link[aria-current="page"] { color: var(--amber); font-weight: 600; }
.nav-cta {
    font-size: 0.82rem; font-weight: 600;
    background: var(--ink); color: var(--paper);
    padding: 0.45rem 1.05rem; border-radius: 999px;
    transition: transform .15s, box-shadow .15s, background .15s;
    white-space: nowrap;
}
.nav-cta:hover { background: #000; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(33,26,18,.18); }
/* ── mobile nav: hamburger + drawer ──────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 2.2rem; height: 2.2rem;
    padding: 0.4rem 0.35rem;
    background: none; border: none; cursor: pointer;
    color: var(--ink);
    border-radius: 8px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--paper-2); }
.nav-hamburger span {
    display: block; width: 20px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.nav-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-drawer {
    position: fixed;
    top: 3.6rem; left: 0; right: 0;
    z-index: 199;
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem var(--gap) 1.2rem;
    display: flex; flex-direction: column;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    box-shadow: 0 16px 40px rgba(33, 26, 18, 0.12);
}
.nav-drawer.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-drawer a {
    font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    transition: color 0.15s;
}
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover { color: var(--ink); }
.nav-drawer a[aria-current="page"] { color: var(--amber); font-weight: 600; }

@media (max-width: 760px) {
    .nav-links .nav-link { display: none; }
    .nav-hamburger { display: flex; }
}

/* ── slides (sections) ───────────────────────────── */
.slide {
    position: relative; z-index: 2;
    padding: clamp(4rem, 9vw, 6.5rem) var(--gap);
    scroll-margin-top: 3.6rem;
}
.wrap { max-width: var(--max); margin: 0 auto; }
.slide-tag {
    font-family: var(--mono);
    font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--amber);
    display: flex; align-items: center; gap: 0.7rem;
    margin-bottom: 1.1rem;
}
.slide-tag::before {
    content: attr(data-num);
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    padding: 0.18rem 0.5rem;
    color: var(--ink-faint);
}
h2 {
    font-family: var(--display);
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.12;
    max-width: 34ch;
}
.lead { color: var(--ink-soft); font-size: clamp(0.95rem, 1.6vw, 1.08rem); max-width: 58ch; margin-top: 0.9rem; }

/* ── buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-weight: 600; font-size: 0.95rem;
    padding: 0.85rem 1.7rem; border-radius: 999px;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 10px 28px rgba(33,26,18,.22); }
.btn-primary:hover { background: #000; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(33,26,18,.28); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-faint); transform: translateY(-2px); }

/* ── accordions ──────────────────────────────────── */
details {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 0; overflow: hidden;
}
details[open] { border-color: var(--amber-bright); }
summary {
    list-style: none; cursor: pointer;
    font-weight: 600; font-size: 0.92rem;
    padding: 1rem 1.2rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: '+';
    font-family: var(--mono); font-size: 1.1rem; color: var(--amber);
    transition: transform .2s;
    flex-shrink: 0;
}
details[open] summary::after { transform: rotate(45deg); }
details .answer { padding: 0 1.2rem 1.1rem; font-size: 0.86rem; color: var(--ink-soft); }

/* ── subpage hero (compact) ──────────────────────── */
.page-hero {
    padding-top: clamp(7rem, 13vw, 9.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    position: relative;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(ellipse 70% 45% at 50% -5%, var(--amber-wash) 0%, transparent 70%);
}
.page-hero h1 {
    font-family: var(--display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700; letter-spacing: -0.04em; line-height: 1.06;
    max-width: 24ch;
}
.page-hero h1 .accent { color: var(--amber); }

/* ── prose (long-form text on subpages) ──────────── */
.prose { max-width: 46rem; }
.prose p { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.9rem; }
.prose p b, .prose p strong { color: var(--ink); }
.prose a { color: var(--amber); font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.prose ul { margin: 0.9rem 0 0 1.2rem; color: var(--ink-soft); font-size: 0.95rem; }
.prose li { margin-top: 0.35rem; }
.prose h3 {
    font-family: var(--display);
    font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em;
    margin-top: 1.8rem;
}

/* ── footer ──────────────────────────────────────── */
footer {
    border-top: 1px solid var(--line);
    padding: 2.4rem var(--gap) 3rem;
    position: relative; z-index: 2;
}
.foot-inner {
    max-width: var(--max); margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    font-size: 0.8rem; color: var(--ink-faint);
}
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }
.foot-deck { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
