/* ================================================================
 * 1NM Website v2 — Exaggerated Minimalism
 * Design: Bolder typography, tighter spacing, mixed animations
 * Fonts: Bodoni Moda (display) + Jost (body)
 * ================================================================ */

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

/* ── Design Tokens ── */
:root {
    /* Palette — Light */
    --bg: #FAFAF8;
    --fg: #0C0C0A;
    --grey-light: #E4E2DD;
    --grey-mid: #9A9590;
    --accent: #0C0C0A;

    /* Typography */
    --font-display: 'Cormorant', 'Georgia', serif;
    --font-body: 'Jost', 'Helvetica Neue', sans-serif;

    /* Motion */
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-mid: 300ms;
    --duration-slow: 600ms;

    /* Layout */
    --section-px: 4rem;
    --section-py: 10rem;
    --max-width: 1400px;
    --text-measure: 38rem;

    /* Transition for theme switch */
    --theme-transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
    --bg: #0C0C0A;
    --fg: #FAFAF8;
    --grey-light: #2A2926;
    --grey-mid: #706B66;
    --accent: #FAFAF8;
}

/* ── Base ── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-weight: 200;
    overflow-x: hidden;
    cursor: crosshair;
    transition: var(--theme-transition);
}

a, button { cursor: crosshair; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; font: inherit; }
ul { list-style: none; }
blockquote { margin: 0; }
img, svg { display: block; max-width: 100%; }

/* ── Shared ── */
.section-label {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.section-label::after {
    content: '';
    display: block;
    flex: 0 0 50px;
    height: 0.5px;
    background: var(--grey-light);
    transition: var(--theme-transition);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ================================================================
 * Navigation
 * ================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem var(--section-px);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 0.5px solid var(--grey-light);
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease-out), var(--theme-transition);
}

.nav.is-visible {
    opacity: 1;
}

.nav-logo {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
}

.nav-logo-1 { font-size: 0.75em; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.theme-toggle {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-mid);
    transition: color var(--duration-fast);
}

.theme-toggle:hover { color: var(--fg); }

.theme-icon { position: absolute; transition: opacity var(--duration-mid), transform var(--duration-mid); }
.theme-icon--dark { opacity: 0; transform: rotate(-90deg); }

[data-theme="dark"] .theme-icon--light { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-icon--dark { opacity: 1; transform: rotate(0deg); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle-line {
    display: block;
    width: 20px;
    height: 0.5px;
    background: var(--fg);
    transition: transform var(--duration-mid) var(--ease-out), opacity var(--duration-mid), var(--theme-transition);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--grey-mid);
    transition: color var(--duration-mid);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 0.5px;
    background: var(--fg);
    transition: width var(--duration-mid) var(--ease-out), var(--theme-transition);
}

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

/* ================================================================
 * Hero
 * ================================================================ */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: var(--fg);
    transition: background-color 1.8s var(--ease-in-out);
}

.hero.is-revealed {
    background: var(--bg);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-mark {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(7rem, 21vw, 22rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
    color: var(--bg);
    opacity: 0;
    transition: opacity 3s ease, color 1.8s var(--ease-in-out);
}

.hero-mark.is-visible { opacity: 1; }
.hero.is-revealed .hero-mark { color: var(--fg); }

.hero-mark-1 {
    font-weight: 400;
    font-size: 0.82em;
}

.hero-rule {
    width: 0;
    height: 0.5px;
    background: var(--grey-mid);
    margin: 2.5rem auto;
    transition: width 0.8s var(--ease-out);
}

.hero-rule.is-expanded { width: 100px; }

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.65rem;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: var(--grey-mid);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.hero-tagline.is-visible {
    opacity: 0.6;
    transform: translateY(0);
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
}

.hero-scroll.is-visible { opacity: 1; }

.hero-scroll span {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.55rem;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--grey-mid);
}

.scroll-line {
    width: 0.5px;
    height: 36px;
    background: var(--grey-mid);
    opacity: 0.4;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.9); }
    50% { opacity: 0.8; transform: scaleY(1.15); }
}

.hero-scroll.is-visible .scroll-line {
    animation: scrollPulse 2.5s ease-in-out infinite;
}

/* ================================================================
 * Ethos — manifesto position
 * ================================================================ */

.ethos {
    padding: var(--section-py) var(--section-px);
    text-align: center;
    border-bottom: 0.5px solid var(--grey-light);
    transition: var(--theme-transition);
}

.ethos-text {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2.8rem, 6vw, 6rem);
    line-height: 1.2;
    color: var(--fg);
    max-width: 900px;
    margin: 0 auto;
    letter-spacing: -0.02em;
}

.ethos-rule {
    width: 60px;
    height: 0.5px;
    background: var(--grey-light);
    margin: 3rem auto;
    transition: var(--theme-transition);
}

.ethos-attr {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--grey-mid);
    opacity: 0.5;
}

/* ================================================================
 * Services — always-visible descriptions
 * ================================================================ */

.services {
    padding: var(--section-py) var(--section-px);
}

.services-stack {
    border-top: 0.5px solid var(--grey-light);
    transition: var(--theme-transition);
}

.service-row {
    padding: 3.5rem 0;
    border-bottom: 0.5px solid var(--grey-light);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    transition: border-color 0.4s var(--ease-out);
}

.service-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0.5px;
    background: var(--fg);
    transition: width var(--duration-mid) var(--ease-out), var(--theme-transition);
}

.service-row:hover::after { width: 100%; }

.service-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
}

.service-number {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    color: var(--grey-mid);
}

.service-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    line-height: 1.1;
    color: var(--fg);
    transition: font-style var(--duration-mid);
}

.service-row:hover .service-title { font-style: italic; }

.service-desc {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--grey-mid);
    max-width: var(--text-measure);
}

/* ================================================================
 * Approach
 * ================================================================ */

.approach {
    padding: var(--section-py) var(--section-px);
}

.approach-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 8rem;
    align-items: start;
}

.approach-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.5rem, 6vw, 6.5rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.approach-heading em {
    font-style: italic;
    color: var(--grey-mid);
}

.approach-para {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--grey-mid);
    margin-bottom: 1.5rem;
    max-width: var(--text-measure);
}

.approach-list {
    margin-top: 3rem;
    border-top: 0.5px solid var(--grey-light);
    transition: var(--theme-transition);
}

.approach-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.4rem 0;
    border-bottom: 0.5px solid var(--grey-light);
    transition: padding-left var(--duration-mid) var(--ease-out), border-color 0.4s var(--ease-out);
}

.approach-row:hover { padding-left: 0.5rem; }

.approach-dash {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.6rem;
    color: var(--grey-mid);
    flex-shrink: 0;
}

.approach-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--fg);
}

/* ================================================================
 * Contact
 * ================================================================ */

.contact {
    padding: var(--section-py) var(--section-px);
    border-top: 0.5px solid var(--grey-light);
    transition: var(--theme-transition);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.contact-qualifier {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--grey-mid);
    margin-top: 1.5rem;
    max-width: 26rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-email {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.contact-arrow {
    display: flex;
    align-items: center;
    color: var(--fg);
    transition: transform var(--duration-mid) var(--ease-out);
}

.contact-link:hover .contact-arrow {
    transform: translateX(6px);
}

.contact-availability {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.availability-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4a9e6e;
    position: relative;
}

.availability-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 0.5px solid #4a9e6e;
    opacity: 0.3;
    animation: availPulse 3s ease-in-out infinite;
}

@keyframes availPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.6); }
}

.availability-text {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--grey-mid);
}

/* ================================================================
 * Footer
 * ================================================================ */

.footer {
    padding: 1.75rem var(--section-px);
    border-top: 0.5px solid var(--grey-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--theme-transition);
}

.footer-mark {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.58rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--grey-mid);
}

.footer-mark-1 { font-size: 0.85em; }

.footer-copy {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.58rem;
    letter-spacing: 0.15em;
    color: var(--grey-mid);
}

/* ================================================================
 * Reveal Animations
 * ================================================================ */

/* Fade up (default) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Clip up — text reveals upward from clip mask */
.reveal[data-reveal="clip-up"] {
    transform: none;
    clip-path: inset(100% 0 0 0);
    transition: opacity var(--duration-slow) var(--ease-out), clip-path 0.8s var(--ease-in-out);
}

.reveal[data-reveal="clip-up"].is-visible {
    clip-path: inset(0 0 0 0);
}

/* Simple fade */
.reveal[data-reveal="fade"] {
    transform: none;
    transition: opacity var(--duration-slow) var(--ease-out);
}

/* Stagger delays */
.reveal.stagger-1 { transition-delay: 0.1s; }
.reveal.stagger-2 { transition-delay: 0.2s; }
.reveal.stagger-3 { transition-delay: 0.3s; }

/* ================================================================
 * Reduced Motion
 * ================================================================ */

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

    .hero { background: var(--bg); }
    .hero-mark { color: var(--fg); }

    .hero-mark,
    .hero-tagline,
    .hero-scroll,
    .nav,
    .reveal {
        opacity: 1;
        transform: none;
        clip-path: none;
    }

    .hero-rule { width: 100px; }
}

/* ================================================================
 * Responsive
 * ================================================================ */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-px: 2.5rem;
        --section-py: 7rem;
    }

    .approach-grid { gap: 4rem; }
    .contact-inner { gap: 3rem; }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-px: 1.5rem;
        --section-py: 5rem;
    }

    .nav { padding: 1.25rem var(--section-px); }
    .nav-right { gap: 1.5rem; }

    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out), var(--theme-transition);
        border-left: 0.5px solid var(--grey-light);
        z-index: 101;
    }

    .nav-links.is-open { transform: translateX(0); }
    .nav-links a { font-size: 0.75rem; letter-spacing: 0.4em; }

    .hero-mark { font-size: clamp(4rem, 18vw, 8rem); }

    .service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2.5rem 0;
    }

    .ethos { padding: 6rem var(--section-px); }

    .ethos-text {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .approach-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .approach-heading { font-size: clamp(2.5rem, 10vw, 3.5rem); }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer { padding: 1.5rem var(--section-px); }
}

/* Small mobile */
@media (max-width: 400px) {
    :root { --section-px: 1.25rem; }
    .hero-mark { font-size: clamp(3rem, 16vw, 5rem); }
    .ethos-text { font-size: clamp(1.6rem, 7vw, 2.4rem); }
}
