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

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

/* ── CSS Custom Properties ── */
:root {
    --white: #f5f3f0;
    --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;
}

/* ── Common Footer ── */
.site-footer {
    background: #0a0a0a;
    padding: 40px 48px 36px;
}
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 32px;
}
.footer-col-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.footer-col a,
.footer-col .footer-text {
    display: block;
    font-size: 13px;
    font-weight: 300;
    color: rgba(255,255,255,0.45);
    padding: 4px 0;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}
.footer-col a:hover {
    color: rgba(255,255,255,0.85);
}
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    font-weight: 300;
    color: rgba(255,255,255,0.3);
}
.footer-bottom a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-bottom a:hover {
    color: rgba(255,255,255,0.75);
}

/* ── 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 ── */
@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;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
