/* =========================================================
   JNM Consulting - Global Styles
   Organized for maintainability:
   1. Root tokens
   2. Base resets & typography
   3. Accessibility helpers
   4. Navigation
   5. Components (cards, forms, footer)
   ========================================================= */

/* 1. Root tokens ------------------------------------------ */
:root {
    --accent: #1f477b;
    --accent-strong: #001e40;
    --wood: #8b5e3c;
    --wood-strong: #6b4423;
    --wood-soft: rgba(139, 94, 60, 0.10);
    --line: #e2dbd4;
    --line-hover: #c5bab2;
    --text: #111c2d;
    --muted: #505f76;
    --shadow-sm: 0 4px 12px rgba(17, 28, 45, 0.04);
    --shadow-md: 0 10px 24px rgba(17, 28, 45, 0.08);
    --radius-sm: 0.5rem;
    --radius-md: 0.9rem;
    --radius-lg: 1.25rem;
    --transition: 180ms ease;
}

/* Wood accent helpers (warm walnut highlight) */
.accent-wood {
    color: var(--wood);
}

.accent-wood-strong {
    color: var(--wood-strong);
}

.accent-divider {
    display: inline-block;
    width: 36px;
    height: 2px;
    background: var(--wood);
    margin-right: 0.6rem;
    vertical-align: middle;
    border-radius: 2px;
}

/* 2. Base resets & typography ----------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--text);
}

.site-brand {
    font-family: "Noto Serif", serif;
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #16223b;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

a,
button,
input,
select,
textarea {
    transition: color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

a:hover {
    opacity: 0.85;
}

button:hover {
    transform: translateY(-1px);
}

/* 3. Accessibility helpers -------------------------------- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -40px;
    background: var(--accent-strong);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    z-index: 100;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 1rem;
}

/* 4. Views (page routing) --------------------------------- */
.view {
    display: none;
    animation: fadeIn 260ms ease;
}

.view--active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Navigation ------------------------------------------- */
.site-header {
    backdrop-filter: saturate(180%) blur(6px);
}

.site-header,
#mobile-menu {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.nav-link {
    font-size: 0.76rem;
    font-weight: 600;
    color: #78829a;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--wood-strong);
    opacity: 1;
}

.nav-link--active {
    color: var(--wood-strong);
    border-bottom-color: var(--wood);
}

.nav-link:active,
.nav-link:focus-visible {
    color: var(--wood-strong);
    border-bottom-color: var(--wood);
}

.site-contact-btn {
    border-radius: 0;
    background: #0b0d12;
    color: #fff;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.site-contact-btn:hover {
    background: #1d222d;
    opacity: 1;
}

/* Home editorial styling */
.home-hero {
    background: #f5f1ed;
}

.home-hero-title {
    font-family: "Noto Serif", serif;
    font-size: clamp(3rem, 6.2vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    max-width: 20ch;
}

.home-hero-figure {
    position: relative;
    border: 1px solid #ddd6ce;
    background: #ede8e2;
    box-shadow: var(--shadow-sm);
}

.home-hero-image {
    display: block;
    width: 100%;
    height: clamp(420px, 62vh, 620px);
    object-fit: cover;
    filter: grayscale(100%) contrast(1.08);
}

.home-hero-quote {
    position: absolute;
    left: -2.2rem;
    bottom: -2rem;
    background: #faf8f6;
    border: 1px solid #e2dbd4;
    padding: 1rem 1.25rem;
    min-width: 235px;
    box-shadow: var(--shadow-sm);
}

.home-hero-quote p {
    margin: 0;
    font-family: "Noto Serif", serif;
    font-style: italic;
    color: #3a3f4c;
    font-size: 1.08rem;
}

.home-hero-quote span {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    color: #8f96a9;
    font-weight: 600;
}

/* 5. Components ------------------------------------------- */

/* Service cards */
.service-card {
    border-radius: 0.5rem;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: var(--wood);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: #1e1a17;
}

.service-card p {
    color: #5a5550;
}

/* Subtle per-card warmth variation */
.service-card:nth-child(1) h3,
.service-card:nth-child(4) h3 {
    color: #1e1a17;
}

.service-card:nth-child(2) h3,
.service-card:nth-child(5) h3 {
    color: #2e2925;
}

.service-card:nth-child(3) h3,
.service-card:nth-child(6) h3 {
    color: #3a342f;
}

/* Project cards */
.project-card {
    border-radius: 0.5rem;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

/* Process steps */
.process-step {
    border-radius: 0.5rem;
}

.lookbook-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    height: 2.25rem;
    padding: 0 0.8rem;
    border: 1px solid rgba(139, 94, 60, 0.28);
    background: linear-gradient(180deg, rgba(139, 94, 60, 0.14) 0%, rgba(139, 94, 60, 0.05) 100%);
    color: var(--wood-strong);
    border-radius: 999px;
    font-family: "Noto Serif", serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
}

.process-index-number {
    margin: 0 auto 1.4rem;
}

.project-card figure,
.project-card .aspect-video {
    border-radius: 0.5rem;
}

/* Forms */
input,
select,
textarea {
    border: 1px solid var(--line);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-hover);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 71, 123, 0.12);
}

form button,
a.bg-primary,
a.border,
a.bg-white,
.hidden.md\:inline-flex.bg-primary {
    border-radius: var(--radius-md);
}

.bg-white.p-10.border {
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

#form-message {
    color: #166534;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #f5f1ed 0%, #ede8e2 100%);
}

.footer-link {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: #4a5f80;
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--accent-strong);
}

.footer-link--strong {
    color: var(--accent-strong);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .site-brand {
        font-size: 1.45rem;
    }

    .home-hero-title {
        font-size: clamp(2.4rem, 8vw, 3.8rem);
    }

    .home-hero-quote {
        left: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        background: #ede8e2;
    }

    .px-margin-page {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #main-content {
        margin-top: 74px;
    }

    .site-header .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    #mobile-menu {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-header,
    #mobile-menu,
    .site-footer {
        border-color: #d8cfc6 !important;
    }

    .home-hero {
        padding-top: 4.5rem;
        padding-bottom: 3rem;
    }

    .home-hero-title {
        font-size: clamp(2.15rem, 11vw, 2.9rem);
        line-height: 1.03;
        letter-spacing: -0.01em;
        margin-top: 0.4rem;
    }

    .home-hero .font-body-lg {
        font-size: 1rem;
        line-height: 1.65;
    }

    .home-hero .flex.flex-wrap.gap-gutter {
        gap: 0.75rem;
    }

    .home-hero .flex.flex-wrap.gap-gutter a {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1rem;
    }

    .home-hero-image {
        height: 340px;
    }

    .home-hero-quote {
        position: static;
        left: auto;
        bottom: auto;
        margin: 0.75rem 0 0;
        min-width: 0;
    }

    .service-card,
    .process-step {
        padding: 1.25rem !important;
    }

    /* Tighten section rhythm for phone screens */
    section.py-stack-lg {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
    }

    .mb-stack-md {
        margin-bottom: 1.5rem !important;
    }

    .gap-stack-lg {
        gap: 1.25rem !important;
    }

    .gap-stack-md {
        gap: 1rem !important;
    }

    /* Portfolio / lookbook cards feel heavy on mobile */
    .project-card {
        box-shadow: 0 3px 10px rgba(17, 28, 45, 0.05);
    }

    .project-card figcaption {
        padding: 0 0.2rem 0.2rem;
    }

    /* Keep long headings from dominating vertical space */
    .font-h2.text-h2 {
        font-size: 1.9rem !important;
        line-height: 1.15 !important;
    }

    .font-h3.text-h3 {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }

    /* Contact block and highlight card tighter */
    .max-w-2xl.mx-auto .not-italic {
        padding: 1.25rem !important;
    }

    .rounded-xl {
        border-radius: 0.5rem !important;
    }

    .lookbook-step-number {
        min-width: 2.7rem;
        height: 2.1rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .site-brand {
        font-size: 1.28rem;
    }

    .home-hero-title {
        font-size: clamp(1.95rem, 11vw, 2.35rem);
    }

    .home-hero-image {
        height: 280px;
    }

    section.py-stack-lg {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }

    .font-h2.text-h2 {
        font-size: 1.68rem !important;
    }

    .font-h3.text-h3 {
        font-size: 1.2rem !important;
    }
}
