/* ============================================================
   NMS Shots — Photography Portfolio
   Design System: "Visual Silence"
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* Foundation */
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f4;
    --bg-overlay: rgba(0, 0, 0, 0.92);

    /* Text */
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --text-on-dark: #f5f5f4;

    /* Accent — intentionally same as text. No color. */
    --accent: #1a1a1a;
    --accent-hover: #444444;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.12);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-primary: 'Instrument Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --fw-normal: 400;
    --fw-semi: 600;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;

    /* Layout */
    --nav-height: 64px;
    --container-padding: clamp(1.5rem, 5vw, 4rem);
    --max-width: 1400px;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --duration-fast: 200ms;
    --duration-base: 400ms;
    --duration-slow: 800ms;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--fw-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* --- Utilities --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-label {
    font-size: 0.6875rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.text-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    transition: color var(--duration-fast) var(--ease);
    cursor: pointer;
}

.text-link:hover {
    color: var(--text-primary);
}

.text-link::after {
    content: ' \2192';
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease);
}

.fade-in.visible {
    opacity: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    background: var(--bg-primary);
    transition: border-color var(--duration-base) var(--ease);
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    border-bottom-color: var(--border-subtle);
}

.nav__logo {
    font-size: 0.875rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.nav__links {
    display: flex;
    gap: var(--space-md);
}

.nav__link {
    font-size: 0.8125rem;
    font-weight: var(--fw-normal);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color var(--duration-fast) var(--ease);
    cursor: pointer;
}

.nav__link:hover,
.nav__link.active {
    color: var(--text-primary);
}

/* Mobile nav toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 110;
}

.nav__toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease);
}

.nav__toggle.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav__toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 105;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease);
}

.nav__overlay.open {
    display: flex;
    opacity: 1;
}

.nav__overlay .nav__link {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    /* Placeholder gradient — replace with hero image */
    background: linear-gradient(145deg, #2a2a2a 0%, #3a3a3a 50%, #2e2e2e 100%);
    background-size: cover;
    background-position: center;
    animation: kenBurns 20s var(--ease) infinite alternate;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.03); }
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: var(--fw-semi);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
    margin-bottom: var(--space-sm);
}

.hero__tagline {
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero__arrow {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.3;
    animation: pulse 3s var(--ease) infinite;
}

.hero__arrow svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 1.5;
    fill: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ============================================================
   FEATURED WORK — Asymmetric Grid
   ============================================================ */
.featured {
    padding: var(--space-2xl) 0;
}

.featured__grid {
    display: grid;
    gap: var(--space-sm);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Desktop: asymmetric magazine-style layout */
.featured__grid {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(200px, auto);
}

.featured__item {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.featured__item img,
.featured__item picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.featured__item:hover img,
.featured__item:hover picture img {
    transform: scale(1.02);
}

/* Placeholder gradient for images */
.placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-gradient {
    width: 100%;
    height: 100%;
    min-height: 200px;
}

/* Asymmetric grid positions */
.featured__item:nth-child(1) { grid-column: 1 / 8; grid-row: span 2; }
.featured__item:nth-child(2) { grid-column: 8 / 13; }
.featured__item:nth-child(3) { grid-column: 8 / 13; }
.featured__item:nth-child(4) { grid-column: 1 / 5; }
.featured__item:nth-child(5) { grid-column: 5 / 9; }
.featured__item:nth-child(6) { grid-column: 9 / 13; }
.featured__item:nth-child(7) { grid-column: 1 / 7; grid-row: span 2; }
.featured__item:nth-child(8) { grid-column: 7 / 13; grid-row: span 2; }

.featured__more {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ============================================================
   MINI ABOUT TEASER
   ============================================================ */
.teaser {
    padding: var(--space-xl) 0 var(--space-2xl);
    text-align: center;
}

.teaser__text {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-md);
    line-height: 1.7;
}

/* ============================================================
   PORTFOLIO — Masonry Grid
   ============================================================ */
.portfolio {
    padding: var(--space-xl) 0 var(--space-2xl);
}

/* Filter bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-primary);
    font-size: 0.8125rem;
    font-weight: var(--fw-normal);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.filter-btn:hover {
    color: var(--text-secondary);
}

.filter-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Masonry grid */
.masonry {
    column-count: 3;
    column-gap: var(--space-sm);
    padding: 0 var(--container-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.masonry__item {
    break-inside: avoid;
    margin-bottom: var(--space-sm);
    overflow: hidden;
    cursor: pointer;
    transition: opacity var(--duration-fast) var(--ease);
}

.masonry__item.hidden {
    display: none;
}

.masonry__item img,
.masonry__item picture img {
    width: 100%;
    display: block;
    transition: transform 0.5s var(--ease);
}

.masonry__item:hover img,
.masonry__item:hover picture img {
    transform: scale(1.02);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
}

.lightbox__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    color: var(--text-on-dark);
    opacity: 0.6;
    transition: opacity var(--duration-fast) var(--ease);
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--space-xs);
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-on-dark);
    opacity: 0.5;
    transition: opacity var(--duration-fast) var(--ease);
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--space-sm);
}

.lightbox__nav:hover {
    opacity: 1;
}

.lightbox__nav svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.lightbox__prev {
    left: var(--space-md);
}

.lightbox__next {
    right: var(--space-md);
}

.lightbox__counter {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-on-dark);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.lightbox__caption {
    position: absolute;
    bottom: calc(var(--space-md) + 1.5rem);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-on-dark);
    font-size: 0.8125rem;
    opacity: 0.5;
    text-align: center;
    white-space: nowrap;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about {
    padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-2xl);
}

.about__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.about__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.about__content {
    padding-top: var(--space-md);
}

.about__name {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: var(--fw-semi);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.about__bio p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about__cta {
    margin-top: var(--space-lg);
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing {
    padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-2xl);
}

.pricing__list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.pricing__card {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.pricing__card:last-child {
    border-bottom: none;
}

.pricing__card-name {
    font-size: 1.25rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-sm);
}

.pricing__card-details {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.pricing__card-details li {
    padding-left: 0;
}

.pricing__card-details li::before {
    content: '\2014\00a0';
    color: var(--text-muted);
}

.pricing__card-price {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-top: var(--space-sm);
}

.pricing__fine-print {
    max-width: 800px;
    margin: var(--space-xl) auto 0;
    padding: 0 var(--container-padding);
    text-align: center;
}

.pricing__fine-print p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: var(--space-xs);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact {
    padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-2xl);
}

.contact__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.contact__headline {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: var(--fw-semi);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
}

.contact__sub {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

/* Form */
.form__group {
    margin-bottom: var(--space-md);
}

.form__label {
    display: block;
    font-size: 0.75rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.75rem 0;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-medium);
    outline: none;
    transition: border-color var(--duration-fast) var(--ease);
    appearance: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    border-bottom-color: var(--text-primary);
}

.form__input:focus-visible,
.form__select:focus-visible,
.form__textarea:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
    border-bottom-color: transparent;
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form__select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.5rem;
}

.form__submit {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    font-family: var(--font-primary);
    font-size: 0.8125rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: white;
    background: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease);
}

.form__submit:hover {
    background: var(--accent-hover);
}

.form__submit:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.form__error {
    color: #c53030;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form__group.error .form__error {
    display: block;
}

.form__group.error .form__input,
.form__group.error .form__select,
.form__group.error .form__textarea {
    border-bottom-color: #c53030;
}

.form__success {
    display: none;
    text-align: center;
    padding: var(--space-xl) 0;
}

.form__success.show {
    display: block;
}

.form__success h3 {
    font-size: 1.25rem;
    font-weight: var(--fw-semi);
    margin-bottom: var(--space-sm);
}

.form__success p {
    color: var(--text-secondary);
}

/* Contact info */
.contact__info {
    padding-top: var(--space-md);
}

.contact__info-item {
    margin-bottom: var(--space-md);
}

.contact__info-label {
    font-size: 0.75rem;
    font-weight: var(--fw-semi);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.contact__info-value {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.contact__info-value a {
    transition: color var(--duration-fast) var(--ease);
    cursor: pointer;
}

.contact__info-value a:hover {
    color: var(--text-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-md) var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer__copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer__social a {
    color: var(--text-muted);
    transition: color var(--duration-fast) var(--ease);
    cursor: pointer;
}

.footer__social a:hover {
    color: var(--text-primary);
}

.footer__social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================================
   PAGE HEADER (for inner pages)
   ============================================================ */
.page-header {
    padding-top: calc(var(--nav-height) + var(--space-xl));
    padding-bottom: var(--space-lg);
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .featured__grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .featured__item:nth-child(1) { grid-column: 1 / 4; grid-row: span 1; }
    .featured__item:nth-child(2) { grid-column: 4 / 7; }
    .featured__item:nth-child(3) { grid-column: 1 / 4; }
    .featured__item:nth-child(4) { grid-column: 4 / 7; }
    .featured__item:nth-child(5) { grid-column: 1 / 4; }
    .featured__item:nth-child(6) { grid-column: 4 / 7; }
    .featured__item:nth-child(7) { grid-column: 1 / 4; grid-row: span 1; }
    .featured__item:nth-child(8) { grid-column: 4 / 7; grid-row: span 1; }

    .masonry {
        column-count: 2;
    }

    .about__layout {
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }

    /* Nav: show toggle, hide links */
    .nav__links {
        display: none;
    }

    .nav__toggle {
        display: flex;
    }

    /* Featured: single column */
    .featured__grid {
        grid-template-columns: 1fr;
    }

    .featured__item:nth-child(n) {
        grid-column: 1 / -1;
        grid-row: span 1;
    }

    .featured__item {
        aspect-ratio: 4 / 3;
    }

    /* Masonry: single column */
    .masonry {
        column-count: 1;
    }

    /* About: stack */
    .about__layout {
        grid-template-columns: 1fr;
    }

    .about__photo {
        aspect-ratio: 4 / 3;
    }

    /* Contact: stack */
    .contact__layout {
        grid-template-columns: 1fr;
    }

    .contact__info {
        padding-top: 0;
        order: -1;
        padding-bottom: var(--space-lg);
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: var(--space-lg);
    }

    /* Lightbox arrows smaller */
    .lightbox__nav svg {
        width: 24px;
        height: 24px;
    }

    .lightbox__prev {
        left: var(--space-sm);
    }

    .lightbox__next {
        right: var(--space-sm);
    }

    /* Filter bar scroll */
    .filter-bar {
        gap: var(--space-sm);
    }
}

@media (max-width: 375px) {
    .hero__title {
        font-size: 1.25rem;
    }

    .pricing__card-name {
        font-size: 1.125rem;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
    }

    .hero__bg {
        animation: none;
    }
}
