/* ============================================================
   Mario Drolet Portfolio — main.css
   Fonts: Cormorant Garamond (display) + Inter (UI)
   ============================================================ */

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

:root {
    --blue:         #0f4c81;
    --blue-dark:    #093f6d;
    --blue-hover:   #09396d;
    --navy:         #435165;
    --overlay:      rgba(5, 68, 102, .92);
    --dark:         #0a0e14;
    --dark-mid:     #0d1520;
    --white:        #ffffff;
    --muted:        rgba(255, 255, 255, .55);
    --muted-light:  rgba(255, 255, 255, .75);
    --border:       rgba(255, 255, 255, .12);
    --border-hover: rgba(255, 255, 255, .28);
    --shadow:       rgba(0, 0, 0, .3);
    --error:        #d8000c;
    --success:      #4f8a10;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui:      'Inter', system-ui, sans-serif;

    --gap:          3px;
    --pad:          2.5rem;
    --radius:       2px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--dark);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ------------------------------------------------------------
   Typography helpers
   ------------------------------------------------------------ */
.eyebrow {
    font-size: .65rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--blue);
    font-family: var(--font-ui);
}

.display {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    line-height: 1.1;
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem var(--pad);
    transition: all .35s ease;
}

/* Transparent state — over hero */
.nav-bar.nav-hero {
    background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
}

/* Scrolled state — corner pill */
.nav-bar.nav-scrolled {
    top: auto; bottom: 1.5rem;
    left: auto; right: 1.5rem;
    width: auto;
    padding: .75rem 1.25rem;
    background: var(--overlay);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-bar.nav-scrolled .nav-logo { display: none; }

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: .08em;
    color: var(--white);
    opacity: .9;
    transition: opacity .2s;
}
.nav-logo:hover { opacity: 1; }

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-bar.nav-scrolled .nav-links { gap: 1.5rem; }

.nav-links a {
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .2s;
    padding: .2rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--white);
    transition: width .25s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

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

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5rem var(--pad) 4rem;
    overflow: hidden;
    background-color: var(--dark-mid);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/assets/images/header-image-dark.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 8s ease;
}

.hero.loaded .hero-bg { transform: scale(1); }

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.25) 0%,
        rgba(0,0,0,.1)  40%,
        rgba(0,0,0,.55) 75%,
        rgba(0,0,0,.75) 100%
    );
}

.hero-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -52%);
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 14rem);
    font-weight: 300;
    color: rgba(255,255,255,.04);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.hero-content .eyebrow { margin-bottom: .75rem; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.05;
    margin-bottom: .6rem;
}

.hero-sub {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-block;
    padding: .65rem 1.75rem;
    font-family: var(--font-ui);
    font-size: .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s ease;
    border: 1px solid transparent;
    line-height: 1;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-ghost {
    background: transparent;
    color: var(--muted-light);
    border-color: var(--border);
}
.btn-ghost:hover { color: var(--white); border-color: var(--border-hover); }

/* ------------------------------------------------------------
   Section wrapper
   ------------------------------------------------------------ */
.section {
    padding: 3.5rem var(--pad);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.section-header .eyebrow { white-space: nowrap; }

.section-rule {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ------------------------------------------------------------
   Featured grid (homepage)
   ------------------------------------------------------------ */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: var(--gap);
}

.featured-grid .grid-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--navy);
    display: block;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    aspect-ratio: 4/3;
}

.grid-item:first-child img { aspect-ratio: unset; min-height: 320px; }

.grid-item:hover img { transform: scale(1.05); }

.grid-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem .85rem .75rem;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.grid-item:hover .grid-overlay { opacity: 1; }

.grid-overlay span {
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
}

/* ------------------------------------------------------------
   Galleries page grid
   ------------------------------------------------------------ */
.galleries-hero {
    padding: 7rem var(--pad) 2.5rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    font-style: italic;
    margin-bottom: .6rem;
}

.page-desc {
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.75;
    max-width: 520px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    padding: var(--gap);
}

.gallery-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--navy);
    display: block;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-card:hover img { transform: scale(1.06); }

.gallery-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem 1.1rem .9rem;
    background: linear-gradient(to top, rgba(0,0,0,.78) 60%, transparent);
    transition: background .3s;
}

.gallery-card:hover .gallery-card-info {
    background: linear-gradient(to top, rgba(0,0,0,.88) 60%, transparent);
}

.gallery-card-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: .2rem;
}

.gallery-card-count {
    font-size: .63rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .2s;
}

.gallery-card:hover .gallery-card-count { color: var(--muted-light); }

/* ------------------------------------------------------------
   Gallery detail — masonry
   ------------------------------------------------------------ */
.gallery-detail-header {
    padding: 7rem var(--pad) 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.gallery-detail-header .page-count {
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
}

.masonry-grid {
    columns: 3;
    column-gap: var(--gap);
    padding: var(--gap);
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
    background: var(--navy);
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform .45s ease;
}

.masonry-item:hover img { transform: scale(1.04); }

.masonry-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem .75rem .65rem;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    opacity: 0;
    transition: opacity .25s ease;
    font-size: .7rem;
    color: rgba(255,255,255,.9);
    line-height: 1.4;
}

.masonry-item:hover .masonry-caption { opacity: 1; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: 2.5rem var(--pad);
}

.page-btn {
    padding: .5rem .9rem;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    transition: all .2s;
}

.page-btn:hover   { color: var(--white); border-color: var(--border-hover); }
.page-btn.current { background: var(--blue); border-color: var(--blue); color: var(--white); }
.page-btn:disabled{ opacity: .3; cursor: default; }

/* ------------------------------------------------------------
   Lightbox modal
   ------------------------------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,.93);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
}

.lightbox-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-wrap img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Prev / next arrows */
.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.45);
    border: 1px solid var(--border);
    color: var(--muted-light);
    width: 2.5rem; height: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: all .2s;
    font-family: var(--font-ui);
}
.lb-arrow:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.lb-arrow.prev  { left: .75rem; }
.lb-arrow.next  { right: .75rem; }

/* Info panel */
.lightbox-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    padding-right: .25rem;
}

.lb-close {
    position: fixed;
    top: 1.25rem; right: 1.5rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-ui);
    display: flex; align-items: center; gap: .4rem;
    transition: color .2s;
}
.lb-close:hover { color: var(--white); }

.lb-caption {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    color: rgba(255,255,255,.92);
}

.lb-meta {
    font-size: .65rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
}

.lb-divider {
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
}

.lb-section-label {
    font-size: .62rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: .6rem;
}

/* Stock links */
.stock-links {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.stock-btn {
    display: block;
    width: 100%;
    padding: .55rem 1rem;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: var(--muted-light);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: var(--radius);
    text-align: center;
    transition: all .2s;
    font-family: var(--font-ui);
    text-decoration: none;
}
.stock-btn:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--border-hover);
    color: var(--white);
}

/* Print CTA */
.print-btn {
    display: block;
    width: 100%;
    padding: .7rem 1rem;
    background: var(--blue);
    color: var(--white);
    font-size: .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    text-align: center;
    transition: background .2s;
    font-family: var(--font-ui);
}
.print-btn:hover { background: var(--blue-dark); }

/* Keywords */
.lb-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.kw-tag {
    font-size: .62rem;
    padding: .22rem .6rem;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

/* ------------------------------------------------------------
   Print inquiry modal
   ------------------------------------------------------------ */
.inquiry-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.inquiry-modal.open {
    opacity: 1;
    pointer-events: all;
}

.inquiry-card {
    background: rgba(5, 68, 102, .12);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.inquiry-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 300;
    font-style: italic;
    margin-bottom: .3rem;
}

.inquiry-sub {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.inquiry-image-ref {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.inquiry-image-ref img {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 1px;
    flex-shrink: 0;
}

.inquiry-image-ref span {
    font-size: .78rem;
    color: rgba(255,255,255,.8);
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .85rem;
}

.form-field label {
    font-size: .63rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    color: var(--white);
    padding: .65rem .9rem;
    font-size: .83rem;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    outline: none;
    transition: border-color .2s;
    width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--blue); }

.form-field select { appearance: none; cursor: pointer; }
.form-field select option { background: #0d1f2d; }
.form-field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }

/* Honeypot — visually hidden, accessible */
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-top: 1.25rem;
}

.form-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: .65rem 1.25rem;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    transition: all .2s;
    flex-shrink: 0;
}
.form-cancel:hover { color: var(--white); border-color: var(--border-hover); }

.form-message {
    font-size: .8rem;
    padding: .65rem .9rem;
    border-radius: var(--radius);
    margin-bottom: .85rem;
    display: none;
}
.form-message.error   { background: rgba(216,0,12,.12); border: 1px solid rgba(216,0,12,.35); color: #ff6b6b; display: block; }
.form-message.success { background: rgba(79,138,16,.12); border: 1px solid rgba(79,138,16,.35); color: #8bc34a; display: block; }

/* ------------------------------------------------------------
   About page
   ------------------------------------------------------------ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px);
}

.about-image {
    position: relative;
    overflow: hidden;
    background: var(--dark-mid);
    min-height: 560px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(10,14,20,.6));
}

.about-content {
    padding: 7rem var(--pad) 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-body {
    font-size: .88rem;
    color: rgba(255,255,255,.7);
    line-height: 1.9;
}

.about-body p { margin-bottom: 1rem; }

.about-gear {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.gear-label {
    font-size: .62rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: .85rem;
}

.gear-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.gear-tag {
    font-size: .68rem;
    padding: .28rem .75rem;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: var(--radius);
    transition: all .2s;
}
.gear-tag:hover { border-color: var(--border-hover); color: var(--muted-light); }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
    padding: 1.75rem var(--pad);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-name {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 300;
    color: var(--muted);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    font-size: .65rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .2s;
}
.footer-social a:hover { color: var(--white); }

/* ------------------------------------------------------------
   Loading skeleton
   ------------------------------------------------------------ */
.skeleton {
    background: linear-gradient(90deg, var(--navy) 25%, #4d5d72 50%, var(--navy) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    :root { --pad: 1.5rem; }

    .featured-grid       { grid-template-columns: repeat(2,1fr); }
    .featured-grid .grid-item:first-child { grid-column: span 2; }
    .gallery-grid        { grid-template-columns: repeat(2,1fr); }
    .masonry-grid        { columns: 2; }
    .lightbox-inner      { grid-template-columns: 1fr; }
    .lightbox-info       { max-height: 40vh; }
    .about-layout        { grid-template-columns: 1fr; }
    .about-image         { min-height: 320px; }
    .about-content       { padding-top: 2.5rem; }
}

@media (max-width: 600px) {
    .featured-grid       { grid-template-columns: 1fr; }
    .featured-grid .grid-item:first-child { grid-column: span 1; }
    .gallery-grid        { grid-template-columns: 1fr; }
    .masonry-grid        { columns: 1; }
    .form-row            { grid-template-columns: 1fr; }
    .hero-title          { font-size: 2.4rem; }
    .nav-bar.nav-scrolled{ bottom: 1rem; right: 1rem; }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .hero-bg { transform: none !important; }
}
