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

:root {
    --bg: #fafaf8;
    --ink: #1a1a1a;
    --muted: #6b6b6b;
    --dim: #9b9b9b;
    --border: #e5e5e0;
    --white: #ffffff;
    --nav-h: 68px;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Preloader ── */
#preloader {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: var(--bg);
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.spinner {
    width: 38px; height: 38px;
    border: 2px solid var(--border);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}
.loading-text {
    margin-top: 18px;
    font-size: 0.72rem; letter-spacing: 3px;
    font-weight: 300; text-transform: uppercase;
    color: var(--ink);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fade-in ── */
.container { opacity: 0; transition: opacity 1s ease; }
body.loaded .container { opacity: 1; }

/* ════════════════════════════
    NAV
════════════════════════════ */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200;
    height: var(--nav-h);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.site-nav.scrolled { border-bottom-color: var(--border); }

.nav-logo {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem; font-weight: 700;
    color: var(--ink); text-decoration: none;
    transition: opacity 0.2s; flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.55; }

/* Desktop links */
.nav-links {
    display: flex; gap: 32px; list-style: none;
}
.nav-links a {
    font-size: 0.78rem; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--muted);
    text-decoration: none; font-weight: 400;
    transition: color 0.2s; position: relative;
    white-space: nowrap;
}
.nav-links a::after {
    content: ''; position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: var(--ink); transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ── Hamburger button ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: none; border: none;
    cursor: pointer; padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.nav-hamburger:hover { background: rgba(0,0,0,0.05); }
.nav-hamburger span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.25s ease, width 0.25s ease;
}
/* X state */
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile drawer ── */
.nav-drawer {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    z-index: 199;
    background: rgba(250, 250, 248, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 0px solid var(--border);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}
.nav-drawer.open { max-height: 260px; }

.nav-drawer ul {
    list-style: none;
    padding: 8px 0 16px;
}
.nav-drawer ul li a {
    display: flex; align-items: center;
    min-height: 52px;
    padding: 0 24px;
    font-size: 0.88rem; letter-spacing: 1.2px;
    text-transform: uppercase; font-weight: 400;
    color: var(--muted); text-decoration: none;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.nav-drawer ul li a:hover,
.nav-drawer ul li a.active {
    color: var(--ink);
    background: rgba(0,0,0,0.03);
}
.nav-drawer ul li a.active {
    font-weight: 500;
}

/* ════════════════════════════
    WIP SECTION
════════════════════════════ */
.wip-section {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 40px) 24px 40px;
    text-align: center;
}

.wip-content {
    display: flex; flex-direction: column;
    align-items: center; gap: 18px;
    max-width: 420px; width: 100%;
}

.wip-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.4rem, 11vw, 4rem);
    font-weight: 700; color: var(--ink); line-height: 1;
}

.wip-desc {
    font-size: 0.92rem; color: var(--muted);
    font-weight: 300; line-height: 1.75;
    padding: 0 8px;
}

.wip-back {
    margin-top: 8px;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px;        /* accessible tap target */
    font-size: 0.78rem; letter-spacing: 1px;
    text-transform: uppercase; color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.wip-back:hover { opacity: 0.45; }

/* ── Footer ── */
footer {
    padding: 28px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem; font-weight: 300;
    border-top: 1px solid var(--border);
}
.footer-quote {
    font-style: italic; margin-top: 6px;
    color: #4a4a4a; font-weight: 400;
}

/* ── Accessibility ── */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    }
}

/* ════════════════════════════
    RESPONSIVE
════════════════════════════ */
@media (max-width: 768px) {
    .site-nav { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-drawer { display: block; }
    footer { padding: 24px 20px; }
}

@media (max-width: 390px) {
    .wip-icon { font-size: 2.2rem; }
}

/* Notch / safe area */
@supports (padding: max(0px)) {
    .site-nav {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    }
    footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}