/* ═══════════════════════════════════════════
   F&M503 Design Studio — Common Stylesheet
   Shared across all pages. Version: 2.0
   ═══════════════════════════════════════════ */

/* ── Font Face ── */
@font-face {
    font-family: 'Hinge';
    src: url('/fonts/Hinge.woff2') format('woff2'),
         url('/fonts/Hinge.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ── CSS Custom Properties ── */
:root {
    --white: #ffffff;
    --pure: #ffffff;
    --ink: #1a1a1a;
    --ink-soft: #555;
    --ink-fine: #6a6a6a;
    --accent: #b8936e;              /* warm accent — timber tone */
    --accent-light: rgba(184,147,110,0.15);
    --border: rgba(0,0,0,0.06);
    --border-light: rgba(0,0,0,0.04);
    --font-serif: 'Hinge', 'Songti SC', 'PingFang SC', serif;
    --font-sans: 'PingFang SC', 'Inter', sans-serif;
    --r: 16px;
    --section-gap: 80px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-weight: 300;
    background: var(--pure);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ── Typography scale ── */
h1, h2, h3, h4 { font-weight: 400; }
.descriptive { font-weight: 300; color: var(--ink-soft); }
.label-text { font-weight: 400; font-size: 11px; letter-spacing: 1.5px; color: var(--ink-fine); }

a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--white); }

/* ── Subpage Nav (consistent across all content pages) ── */
.subpage-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 48px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.subpage-nav.scrolled {
    border-bottom-color: var(--border);
    background: rgba(255,255,255,0.97);
}
.subpage-nav-brand {
    font-family: 'Hinge', var(--font-sans);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--ink);
    text-decoration: none;
}
.subpage-nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}
.subpage-nav-links a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: var(--ink-soft);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}
.subpage-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.subpage-nav-links a:hover,
.subpage-nav-links a.active {
    color: var(--ink);
}
.subpage-nav-links a:hover::after,
.subpage-nav-links a.active::after {
    width: 100%;
}
.subpage-nav-cta {
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: 2px !important;
    padding: 9px 20px !important;
    border: 1px solid var(--ink);
    color: var(--ink) !important;
    transition: all 0.25s ease !important;
    text-decoration: none;
    border-radius: 2px;
}
.subpage-nav-cta:hover {
    background: var(--ink) !important;
    color: var(--pure) !important;
}
.subpage-nav-cta::after { display: none !important; }

/* Mobile nav toggle */
.subpage-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 14px;
    flex-direction: column;
    justify-content: space-between;
    z-index: 201;
    padding: 0;
}
.subpage-nav-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--ink);
    transition: all 0.3s ease;
}




/* ── Unified Footer ── */
.site-footer {
    background: #0a0a0a;
    padding: 40px 48px 36px;
}
.footer-links {
    max-width: 720px;
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.footer-links a {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    padding: 2px 0;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}
.footer-links a:hover { color: rgba(255,255,255,0.85); }
.footer-links .footer-text {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    padding: 2px 0;
}
.footer-divider {
    width: 20px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 0;
    align-self: center;
}
/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 90;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: var(--ink-fine);
    font-size: 18px;
    line-height: 1;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    border-color: var(--ink);
    color: var(--ink);
    transform: translateY(-2px);
}

/* ── Section Rhythm Helper ── */
.section-alt {
    background: #fafaf9;
}

/* ── Responsive ── */
.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }
@media (max-width: 768px) {
    :root {
        --section-gap: 48px;
    }

    .subpage-nav {
        padding: 0 24px;
        height: 56px;
    }
    .subpage-nav-brand {
        font-size: 17px;
        letter-spacing: 1.5px;
    }
    .subpage-nav-toggle {
        display: flex;
    }
    .subpage-nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 12px 24px 20px;
        border-bottom: 1px solid var(--border);
        z-index: 199;
    }
    .subpage-nav-links.open {
        display: flex;
    }
    .subpage-nav-links a {
        padding: 14px 0;
        font-size: 13px;
        letter-spacing: 2px;
        border-bottom: 1px solid var(--border-light);
    }
    .subpage-nav-links a::after { display: none; }

    .site-footer {
        padding: 32px 24px 28px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        color: rgba(255,255,255,0.45);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
.footer-version {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.5px;
    font-family: 'Hinge', serif;
}

/* ── Utility Classes ── */
.badge-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 10px; white-space: nowrap; }
.border-b-light { border-bottom: 1px solid var(--border-light); }
.color-999 { color: #999; }
.color-fade { color: rgba(255,255,255,0.4); }
.color-white { color: #fff; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-jc { flex: 1; justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.grid-full { grid-column: 1 / -1; }
.hero-content { position: relative; z-index: 1; padding: 80px 64px; text-align: center; }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px); }
.hero-overlay { position: absolute; inset: 0; background: #0a0a0a; overflow: hidden; }
.hidden { display: none !important; }
.inherit-link { color: inherit; text-decoration: none; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.label-row { color: var(--ink-fine); width: 70px; flex-shrink: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-8 { margin-top: 8px; }
.nowrap { white-space: nowrap; }
.px-8 { padding: 4px 8px; }
.py-4 { padding: 4px 0; }
.row-border { display: flex; border-bottom: 1px solid var(--border-light); padding: 4px 0; }
.shrink-0 { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-10 { font-size: 10px; }
.text-10-fine { font-size: 10px; color: var(--ink-fine); }
.text-12 { font-size: 12px; }
.text-12-999 { font-size: 12px; color: #999; }
.text-16 { font-size: 16px; }
.text-fine { color: var(--ink-fine); }
.text-right { text-align: right; }
.w-70 { width: 70px; }

/* ── Focus visible for keyboard navigation ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

