/* ============================================================
   Nightfield — Step 1 design system for christinasouch.com
   Override layer loaded AFTER style.css
   ============================================================ */

:root {
    --bg: #060608;
    --ink: #f2f0eb;
    --dim: #9b98a0;
    --line: rgba(242, 240, 235, .12);
    --gold: #e3b06b;
    --cy: #8fd4e8;

    --card-bg: #0d0d12;
    --card-radius: 18px;
    --pill-radius: 100px;

    --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------- Global base ---------- */
html { background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(227, 176, 107, .28);
    color: var(--ink);
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color .18s ease, text-decoration .18s ease;
}
a:hover { text-decoration: underline; }

/* ---------- Generic typography (dark pages) ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: .01em;
}
h1 { font-size: clamp(40px, 5.4vw, 72px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: clamp(22px, 2.2vw, 30px); }

/* ============================================================
   Navbar — must beat style.css selectors (use body .navbar)
   ============================================================ */
body .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 6, 8, .75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}

body .navbar .nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

body .navbar .logo a {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: .005em;
    text-decoration: none;
}
body .navbar .logo a:hover { text-decoration: none; }
body .navbar .logo a i {
    font-style: italic;
    color: var(--gold);
    font-weight: 400;
}

body .navbar .nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.1rem;
    margin: 0;
    padding: 0;
}
body .navbar .nav-menu > li { list-style: none; }

body .navbar .nav-menu a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--dim);
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .18s ease;
}
body .navbar .nav-menu a:hover,
body .navbar .nav-menu a.active {
    color: var(--ink);
    text-decoration: none;
}

/* Dropdown */
body .navbar .dropdown {
    position: relative;
}
body .navbar .dropdown-toggle {
    cursor: pointer;
}
body .navbar .dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 6px;
    opacity: .7;
}
body .navbar .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body .navbar .dropdown:hover .dropdown-menu,
body .navbar .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
body .navbar .dropdown-menu li { list-style: none; }
body .navbar .dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--dim);
}
body .navbar .dropdown-menu a:hover {
    color: var(--ink);
    background: rgba(242, 240, 235, .05);
    text-decoration: none;
}

/* Hamburger (hidden on desktop) */
body .navbar .nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 34px;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}
body .navbar .nav-hamburger span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}
body .navbar .nav-hamburger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
body .navbar .nav-hamburger.active span:nth-child(2) { opacity: 0; }
body .navbar .nav-hamburger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================================
   Footer
   ============================================================ */
body .footer {
    border-top: 1px solid var(--line);
    background: var(--bg);
    color: var(--dim);
    padding: 56px 0 28px;
}
body .footer .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 5vw;
    background: transparent !important;
}
body .footer .footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 36px;
}
body .footer .footer-section h4 {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gold);
    margin: 0 0 18px;
    line-height: 1.4;
}
body .footer .footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body .footer .footer-section ul#latest-posts li {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13.5px;
}
body .footer .footer-section a {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13.5px;
    color: var(--dim);
    text-decoration: none;
    transition: color .18s ease;
}
body .footer .footer-section a:hover {
    color: var(--ink);
    text-decoration: none;
}
body .footer .footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}
body .footer .footer-bottom p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13px;
    color: var(--dim);
    line-height: 1.6;
    margin: 0;
}
body .footer .footer-bottom a {
    color: var(--dim);
}
body .footer .footer-bottom a:hover { color: var(--ink); }

/* ============================================================
   Reusable components
   ============================================================ */

/* ---- Banner ---- */
.nf-banner {
    position: relative;
    padding: 74px 5vw 60px;
    overflow: hidden;
    isolation: isolate;
}
.nf-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.nf-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(6, 6, 8, .55), rgba(6, 6, 8, .72) 70%, #060608);
}
.nf-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .28em;
    color: var(--gold);
    margin: 0 0 18px;
    opacity: 0;
    transform: translateY(14px);
    animation: nf-fade-up .6s ease forwards;
    animation-delay: .05s;
    text-shadow: 0 1px 3px rgba(6,6,8,.95), 0 2px 12px rgba(6,6,8,.6);
}
.nf-banner h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 5.4vw, 72px);
    line-height: 1.08;
    color: var(--ink);
    margin: 0 0 18px;
    max-width: 16ch;
    opacity: 0;
    transform: translateY(18px);
    animation: nf-fade-up .7s ease forwards;
    animation-delay: .18s;
    text-shadow: 0 2px 4px rgba(6,6,8,.9), 0 4px 26px rgba(6,6,8,.55);
}
.nf-banner h1 em,
.nf-banner h1 i {
    font-style: italic;
    color: var(--gold);
}
.nf-banner p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.65;
    color: #cfccd4;
    margin: 0;
    max-width: 60ch;
    opacity: 0;
    transform: translateY(18px);
    animation: nf-fade-up .7s ease forwards;
    animation-delay: .34s;
    text-shadow: 0 1px 3px rgba(6,6,8,.9), 0 2px 14px rgba(6,6,8,.55);
}

/* Hover-reactive banner layers — see static/js/hero-lights.js */
.nf-lights {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.nf-light {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .45s ease-out;
    will-change: opacity;
    mix-blend-mode: screen;
    background: radial-gradient(circle, rgba(255,232,190,.95) 0%, rgba(240,190,110,.45) 32%, rgba(227,176,107,0) 68%);
}
.nf-light.cy {
    background: radial-gradient(circle, rgba(225,246,252,.95) 0%, rgba(143,212,232,.42) 32%, rgba(143,212,232,0) 68%);
}
.nf-light.big {
    background: radial-gradient(circle, rgba(255,244,225,.55) 0%, rgba(255,238,205,.9) 30%, rgba(245,200,125,.6) 48%, rgba(227,176,107,0) 72%);
}
.nf-torch {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .5s ease-out;
    -webkit-mask-image: radial-gradient(circle 240px at var(--tx, -999px) var(--ty, -999px), rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle 240px at var(--tx, -999px) var(--ty, -999px), rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,0) 72%);
}
.nf-torch.is-on {
    opacity: 1;
}
.nf-ripple {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s ease-out;
}
.nf-ripple.is-on {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .nf-light,
    .nf-torch {
        transition: none;
    }
}

@keyframes nf-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Card ---- */
.nf-card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    padding: 26px;
    color: var(--ink);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nf-card:hover {
    transform: translateY(-6px);
    border-color: rgba(227, 176, 107, .45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

/* ---- Chip ---- */
.nf-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--pill-radius);
    background: transparent;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .18em;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.nf-chip:hover {
    color: var(--ink);
    border-color: rgba(242, 240, 235, .28);
}
.nf-chip.on {
    color: var(--bg);
    background: var(--gold);
    border-color: var(--gold);
}

/* ---- Button (pill) ---- */
.nf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--pill-radius);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: .01em;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.nf-btn:hover { text-decoration: none; transform: translateY(-2px); }

.nf-btn--primary {
    background: var(--ink);
    color: var(--bg);
}
.nf-btn--primary:hover { background: #fff; }

.nf-btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.nf-btn--ghost:hover {
    border-color: rgba(227, 176, 107, .45);
    color: var(--ink);
}

/* ---- Search row ---- */
.nf-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--pill-radius);
    padding: 6px 6px 6px 20px;
    max-width: 540px;
}
.nf-search input[type="text"],
.nf-search input[type="search"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    padding: 10px 0;
}
.nf-search input::placeholder { color: var(--dim); }
.nf-search .nf-btn,
.nf-search button {
    border-radius: var(--pill-radius);
    white-space: nowrap;
}

/* ============================================================
   Responsive — under 1100px
   ============================================================ */
@media (max-width: 1100px) {
    body .navbar .nav-hamburger {
        display: flex;
    }
    body .navbar .nav-menu {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 14px 5vw 24px;
        background: rgba(6, 6, 8, .97);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height .28s ease, opacity .22s ease, visibility .22s;
    }
    body .navbar .nav-menu.open {
        max-height: 80vh;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
    }
    body .navbar .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--line);
    }
    body .navbar .nav-menu > li:last-child { border-bottom: none; }
    body .navbar .nav-menu a {
        display: block;
        padding: 14px 0;
        width: 100%;
    }
    body .navbar .dropdown-toggle::after { float: right; }
    body .navbar .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0 0 8px 14px;
        border-radius: 0;
        gap: 0;
    }
    body .navbar .dropdown-menu a {
        padding: 10px 0;
        font-size: 13.5px;
    }

    /* Banner keeps working on mobile */
    .nf-banner {
        padding: 52px 5vw 44px;
    }
    .nf-banner h1 { font-size: clamp(34px, 9vw, 54px); }
    .nf-banner p { font-size: 16px; }

    /* Footer stacks */
    body .footer .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
