/* =====================================================================
   site.css — shared design system for anagha-mahajan.com
   ("Galerie" — museum-editorial, warm paper, Fraunces + Inter, pink accent)
   Ported from drafts/a-galerie/index.html. Page-specific styles live in
   index.css / paintings.css / exhibitions.css.
   ===================================================================== */

/* ---------- reset / tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --paper: #faf9f7;
    --ink: #1c1b1a;
    --muted: #6f6b66;
    --rule: #e5e2dd;
    --pink: rgb(255, 44, 90);
    --maxw: 1200px;
    --pad: clamp(20px, 5vw, 48px);
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }

/* ---------- shared type ---------- */
.eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}
.section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 300;
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: lowercase;
    margin: 10px 0 0;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.accent-rule { display: block; width: 56px; height: 2px; background: var(--pink); border: 0; }

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 249, 247, 0.82);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--rule);
}
.site-header .inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 16px var(--pad);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
#nav { display: flex; gap: clamp(16px, 3vw, 34px); }
#nav a {
    position: relative;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: var(--ink);
    padding: 4px 0;
    transition: color 0.3s ease;
}
#nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--pink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.32s ease;
}
#nav a:hover::after, #nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- generic section ---------- */
/* vertical only — the same element carries .wrap, whose side padding must survive */
section.block { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.section-head { margin: 0 0 clamp(32px, 5vw, 56px); }

/* ---------- quiet button (hero + shared) ---------- */
.btn-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 11px 24px;
    min-height: 44px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.btn-quiet:hover, .btn-quiet:focus-visible {
    border-color: var(--pink);
    color: var(--pink);
    outline: none;
}

/* quiet inline text link (underlined, subtle) */
.link-quiet {
    position: relative;
    display: inline-block;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    padding: 6px 0;
}
.link-quiet::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--pink);
    opacity: 0.35;
    transition: opacity 0.3s ease;
}
.link-quiet:hover::after, .link-quiet:focus-visible::after { opacity: 1; }

/* ---------- masonry gallery (featured + full gallery) ---------- */
.group { margin-top: clamp(40px, 6vw, 72px); }
.group:first-of-type { margin-top: 0; }
.group[hidden] { display: none; }
.running-head {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    font-variant: small-caps;
    text-transform: lowercase;
    color: var(--muted);
    margin: 0 0 26px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
}
.grid { columns: 1; column-gap: clamp(20px, 3vw, 30px); }
@media (min-width: 700px) { .grid { columns: 2; } }
@media (min-width: 1100px) { .grid { columns: 3; } }
.item {
    break-inside: avoid;
    margin: 0 0 clamp(20px, 3vw, 30px);
    page-break-inside: avoid;
}
.item img {
    width: 100%;
    cursor: zoom-in;
    background: #efece7;
}
.caption {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}
.cap-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-variant: small-caps;
    color: var(--ink);
}
.sold-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--pink);
    display: inline-block;
    align-self: center;
}
.sold-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pink);
}

/* ---------- exhibitions grid (index preview) ---------- */
.exhibits { display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 30px); }
@media (min-width: 560px) { .exhibits { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .exhibits { grid-template-columns: repeat(3, 1fr); } }
.exhibit { margin: 0; }
.exhibit-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    background: #efece7;
}
.exhibit figcaption {
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    font-variant: small-caps;
    text-transform: lowercase;
    color: var(--muted);
}

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: clamp(40px, 6vw, 64px) var(--pad);
    text-align: center;
}
.site-footer p {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    color: var(--muted);
}

/* ---------- reveal (progressive enhancement, armed by gallery.js) ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal-on .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- lightbox ---------- */
html.lb-open, html.lb-open body { overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(28, 27, 26, 0.94);
    padding: clamp(16px, 4vw, 56px);
}
.lightbox.is-open { display: flex; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lb-img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.lb-img.is-loaded { opacity: 1; }
.lb-caption {
    display: none;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #faf9f7;
    text-align: center;
}
.lb-caption.is-shown { display: flex; }
.lb-title { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 1.05rem; font-style: italic; }
.lb-meta { font-size: 0.8rem; letter-spacing: 0.08em; color: rgba(250, 249, 247, 0.72); }
.lb-sold {
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--pink);
    color: #fff;
    padding: 4px 11px;
    border-radius: 999px;
}
.lb-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #faf9f7;
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.25s ease, color 0.25s ease;
}
.lb-btn:hover, .lb-btn:focus-visible { opacity: 1; color: var(--pink); outline: none; }
.lb-close { top: clamp(10px, 2vw, 22px); right: clamp(10px, 2vw, 22px); font-size: 26px; }
.lb-prev { left: clamp(6px, 2vw, 20px); top: 50%; transform: translateY(-50%); font-size: 44px; }
.lb-next { right: clamp(6px, 2vw, 20px); top: 50%; transform: translateY(-50%); font-size: 44px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .reveal-on .reveal { opacity: 1 !important; transform: none !important; }
    .link-quiet::after { opacity: 1; }
}
