/* ================================================================
 * 1NM Website — Complete Stylesheet
 * Design System: "Architectural Tension" (editorial, high-end)
 * ================================================================ */

/* ================================================================
 * TASK 2: Design System
 * Reset, custom properties, typography base
 * ================================================================ */

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

:root {
    --white: #FAFAF8;
    --black: #0C0C0A;
    --grey-light: #E4E2DD;
    --grey-mid: #9A9590;
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Jost', 'Helvetica Neue', sans-serif;
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);
    --section-padding-x: 4rem;
    --section-padding-y: 9rem;
    --max-width: 1400px;
}

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

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-weight: 200;
    overflow-x: hidden;
    cursor: crosshair;
}

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%;
}

.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);
}

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

/* ================================================================
 * TASK 3: 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-padding-x);
    background: rgba(250, 250, 248, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 0.5px solid var(--grey-light);
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
}

.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;
    color: var(--black);
}

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

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

.nav-toggle-line {
    display: block;
    width: 20px;
    height: 0.5px;
    background: var(--black);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.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 0.4s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 0.5px;
    background: var(--black);
    transition: width 0.4s var(--ease-out);
}

.nav-links a:hover {
    color: var(--black);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ================================================================
 * TASK 4: Hero + Curtain
 * ================================================================ */

.hero-curtain {
    display: none;
}

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

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

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

.hero-mark {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(7rem, 21vw, 21rem);
    line-height: 0.85;
    letter-spacing: -0.02em;
    color: var(--white);
    opacity: 0;
    transition: opacity 4s ease, color 2s var(--ease-in-out);
}

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

.hero.is-revealed .hero-mark {
    color: var(--black);
}

.hero-mark-1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 0.78em;
}

.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: rgba(154, 149, 144, 0.6);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.hero-tagline.is-visible {
    opacity: 1;
    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.8s 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;
}

/* ================================================================
 * TASK 5: Services
 * ================================================================ */

.services {
    padding: var(--section-padding-y) var(--section-padding-x);
}

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

.service-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3rem 0;
    border-bottom: 0.5px solid var(--grey-light);
    position: relative;
}

.service-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0.5px;
    background: var(--black);
    transition: width 0.7s var(--ease-out);
}

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

.service-row-left {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    flex-shrink: 0;
}

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

.service-row--hero .service-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.8rem, 2.8vw, 3rem);
    line-height: 1.1;
    color: var(--black);
    transition: font-style 0.3s;
}

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

.service-row--hero .service-row-right {
    max-width: 50%;
    text-align: right;
}

.service-desc {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.78rem;
    line-height: 2;
    color: var(--grey-mid);
}

.service-row--secondary .service-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
    line-height: 1.1;
    color: var(--grey-mid);
    transition: color 0.4s;
}

.service-row--secondary:hover .service-title,
.service-row--secondary:focus .service-title {
    color: var(--black);
}

.service-row-expandable {
    max-width: 50%;
    text-align: right;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--ease-out), opacity 0.4s var(--ease-out);
}

.service-row--secondary:hover .service-row-expandable,
.service-row--secondary:focus .service-row-expandable {
    max-height: 200px;
    opacity: 1;
}

/* ================================================================
 * TASK 6: Ethos + Approach
 * ================================================================ */

.ethos {
    padding: 12rem var(--section-padding-x);
    text-align: center;
}

.ethos-text {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1.3;
    color: var(--black);
    max-width: 900px;
    margin: 0 auto;
    letter-spacing: -0.01em;
}

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

.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.4;
}

.approach {
    padding: var(--section-padding-y) var(--section-padding-x);
}

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

.approach-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3.5rem, 5.5vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.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: 2.1;
    color: var(--grey-mid);
    margin-bottom: 1.5rem;
}

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

.approach-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.4rem 0;
    border-bottom: 0.5px solid var(--grey-light);
    transition: padding-left 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: 300;
    font-size: 1.05rem;
    color: var(--black);
}

/* ================================================================
 * TASK 7: Contact, Footer, Animations, Reduced Motion
 * ================================================================ */

.contact {
    padding: 0 var(--section-padding-x);
    border-top: 0.5px solid var(--grey-light);
}

.contact-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
}

.contact-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
    line-height: 1.1;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-body);
    font-weight: 200;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    color: var(--black);
}

.contact-arrow {
    display: block;
    width: 40px;
    height: 0.5px;
    background: var(--black);
    position: relative;
    transition: width 0.4s var(--ease-out);
}

.contact-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3.5px;
    width: 7px;
    height: 7px;
    border-right: 0.5px solid var(--black);
    border-top: 0.5px solid var(--black);
    transform: rotate(45deg);
}

.contact-link:hover .contact-arrow {
    width: 60px;
}

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

.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);
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

.fade-in.delay-1 {
    transition-delay: 0.15s;
}

.fade-in.delay-2 {
    transition-delay: 0.3s;
}

.fade-in.delay-3 {
    transition-delay: 0.45s;
}

/* 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(--white);
    }

    .hero-mark {
        color: var(--black);
    }

    .hero-mark,
    .hero-tagline,
    .hero-scroll,
    .nav,
    .fade-in {
        opacity: 1;
        transform: none;
    }

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

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */

/* Tablet and below */
@media (max-width: 1024px) {
    :root {
        --section-padding-x: 2.5rem;
        --section-padding-y: 6rem;
    }

    .approach-grid {
        gap: 4rem;
    }
}

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

    .nav {
        padding: 1.25rem var(--section-padding-x);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        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 {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 0;
    }

    .service-row--hero .service-row-right {
        max-width: 100%;
        text-align: left;
    }

    .service-row-expandable {
        max-width: 100%;
        text-align: left;
    }

    .ethos {
        padding: 8rem var(--section-padding-x);
    }

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

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

    .contact-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 2.5rem 0;
    }

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

/* Small mobile */
@media (max-width: 400px) {
    :root {
        --section-padding-x: 1.25rem;
    }

    .hero-mark {
        font-size: clamp(3rem, 16vw, 5rem);
    }

    .ethos-text {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }
}
