/*
Theme Name: Shivani Garg
Description: The original Shivani Garg artist portfolio, integrated with WordPress pages and enquiries.
Version: 1.1.4
Requires at least: 6.0
Requires PHP: 8.1
Text Domain: shivani-garg
*/
/* Transparent artwork edges belong on the same neutral surface as the page. */
main img[data-image-background] { background-color:transparent; }
body.admin-bar [data-site-header] { top:32px; }
@media(max-width:782px) { body.admin-bar [data-site-header] { top:46px; } }
@media(max-width:600px) { body.admin-bar #wpadminbar { position:fixed; } }
.shape-tablist{display:flex;gap:36px;margin:0 0 40px;border-bottom:1px solid #D9D3C9}.shape-tablist button{background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:14px 0;font:400 12px/1 'Jost',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:#625E58;cursor:pointer}.shape-tablist button span{letter-spacing:0;opacity:.7}.shape-tablist button[aria-selected=true]{color:#191817;border-bottom-color:#191817}.shape-tablist button:focus-visible{outline:2px solid #8B5142;outline-offset:4px}

[data-header-nav]{display:none!important}
body.home-page [data-site-header],body.home-page:not(.scrolled) [data-site-header]{position:sticky!important;inset:0 0 auto!important;background:#fff!important;color:#191817!important;border-bottom:1px solid #ece8e1!important}
body.home-page main{padding-top:0!important}
body.home-page [data-hero]{height:76vw!important;min-height:0!important;aspect-ratio:auto!important;background:#171514}
body.home-page [data-hero-video]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center}
@media(min-width:761px){
body.home-page [data-hero]{height:56vw!important}
}
@media(min-width:1024px){
[data-header-nav]{display:flex!important;align-items:center;gap:clamp(22px,2.6vw,44px);font:300 15px/1 'Jost',system-ui,sans-serif;letter-spacing:.04em}
[data-header-nav] a{position:relative;padding:8px 0;color:inherit}
[data-header-nav] a:not(.header-icon)::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .35s ease}
[data-header-nav] a:not(.header-icon):hover::after,[data-header-nav] a:focus-visible::after{transform:scaleX(1)}
[data-header-nav] .header-icon{display:inline-grid;place-items:center}
[data-menu-trigger]{display:none!important}
body.home-page [data-header-inner]{padding-block:20px!important}
body.home-page [data-hero]{height:40.8vw!important}
}

.collection-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:760px){.collection-grid[data-count="2"]{grid-template-columns:minmax(0,1fr)}}

/* Quiet gallery palette: color comes from the artwork, not its surroundings. */
:root { --gallery-paper:#fff; --gallery-ink:#292929; --gallery-muted:#666; --gallery-line:#e5e5e5; }
html, body { background:var(--gallery-paper); color:var(--gallery-ink); }
body main > section:not([data-hero]),
body main :is(#artist,#studio,#collections,#voice),
body .site-footer,
body .contact-form-card,
body .viewer,
body .enquiry-dialog { background:var(--gallery-paper) !important; color:var(--gallery-ink); }
body main .artwork-frame,
body main .image-button,
body main .collection-image,
body main img[data-image-background] { background:transparent !important; }
/* Also cover older saved image markup without data-image-background. */
body :is(.artwork-frame,.image-button,.viewer,.enquiry-artwork) img[src*="/portfolio-"] {
  background-color:var(--gallery-paper) !important;
}
body.inner-page [data-site-header],
body.scrolled [data-site-header] { background:var(--gallery-paper) !important; border-bottom-color:var(--gallery-line) !important; }
body [data-menu="panel"] { background:var(--gallery-paper) !important; color:var(--gallery-ink) !important; }
body [data-menu="item"] { border-top-color:var(--gallery-line) !important; }
body [data-menu="panel"] a[aria-current="page"],
body [data-h="menu"]:hover,
body [data-h="link"]:hover,
body [data-h="index"]:hover { color:var(--gallery-muted) !important; }
body [data-h="rule"]:hover { color:var(--gallery-ink) !important; border-bottom-color:currentColor !important; }
body :is(.button,[data-h="solid"]) { background:var(--gallery-paper); color:var(--gallery-ink); border:1px solid #aaa; }
body :is(.button,[data-h="solid"],[data-h="ghost"]):hover { background:#f2f2f2 !important; color:var(--gallery-ink) !important; border-color:var(--gallery-ink) !important; }
body :is(.contact-form-card,.gallery-section,.contact-invite,.site-footer,.collection-caption) { border-color:var(--gallery-line); }
body .contact-form-card .enquiry-form :is(input,select,textarea),
body .contact-form-card [data-work-context] { background:var(--gallery-paper); border-color:#ccc; }
body :is(.eyebrow,.collection-number,.breadcrumbs,.breadcrumbs li+li::before,.contact-page svg),
body .collection-heading .eyebrow,
body .gallery-heading .eyebrow { color:var(--gallery-muted); }
body .contact-socials > a:hover { color:var(--gallery-ink); }
body .contact-page-heading h1 { background:none; }
body #current h2 em::after,
body.home-page main > section:not(#current) :is(h1,h2[data-section-heading])::after,
body.home-page #artist blockquote::after { background:none; }
body :focus-visible,
body .shape-tablist button:focus-visible { outline:2px solid var(--gallery-muted); outline-offset:4px; }
::selection { background:#e5e5e5; color:#292929; }

/* Keep detail photographs within their real resolution instead of stretching them. */
body main .detail .image-button img,
body main .detail-extra .image-button img {
  width:min(100%,var(--artwork-native-width,100%)) !important;
  height:auto !important;
  margin-inline:auto;
}
.viewer-original { display:block; width:fit-content; margin:16px auto 0; font-size:13px; text-decoration:underline; text-underline-offset:4px; }

/* Preserve the full source photograph, including portrait studio views. */
body main img[src*="/assets/originals/"] {
  height:auto !important;
  aspect-ratio:auto !important;
  object-fit:contain !important;
  clip-path:none !important;
  border-radius:0 !important;
  transform:none !important;
}

/* Additional artwork photos follow the main image in their original sequence. */
.artwork-sequence { gap:32px; scroll-margin-top:100px; }
.artwork-sequence figure { margin:0; min-width:0; }
.artwork-sequence figcaption { margin-top:14px; font-size:14px; line-height:1.6; color:#625e58; }
body main .artwork-sequence .image-button img { height:auto!important; aspect-ratio:auto!important; object-fit:contain!important; }
@media(max-width:760px) { .detail-extra.artwork-sequence { width:100%; gap:32px; } }

/* Related works retain the gallery cards in a swipeable, keyboard-accessible row. */
.related-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px; }
.related-heading h2 { margin:0; }
.related-heading-controls { justify-content:flex-end; }
.related-controls { display:flex; gap:10px; }
.related-controls button { width:44px; height:44px; border:1px solid #ccc; background:#fff; font-size:22px; cursor:pointer; }
.related-controls button:hover:not(:disabled) { background:#f2f2f2; border-color:#666; }
.related-controls button:disabled { opacity:.35; cursor:default; }
.related .related-track[data-work-grid] { display:flex; gap:32px; overflow-x:auto; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; padding:6px 2px 12px; scrollbar-width:none; -ms-overflow-style:none; }
.related .related-track[data-work-grid]::-webkit-scrollbar { display:none; width:0; height:0; }
.related-track > [data-work-card] { flex:0 0 calc((100% - 32px)/2); scroll-snap-align:start; }
.related-track [data-work-caption] { grid-template-columns:minmax(0,1fr); gap:8px; }
.related-track [data-work-caption] > .quiet-link { justify-self:start; }
@media(max-width:980px) { .related-track > [data-work-card] { flex-basis:calc((100% - 32px)/2); } }
@media(max-width:600px) { .related .related-track[data-work-grid] { gap:20px; } .related-track > [data-work-card] { flex-basis:86%; } .related-heading { gap:12px; } }


/* Archive "Load more": centred below the grid with room to breathe, matching the gallery's outlined button. */
[data-load-more] { display:block; margin:clamp(40px,6vw,72px) auto 0; min-width:200px; padding:15px 36px; background:transparent; color:#191817; border:1px solid rgba(25,24,23,0.3); font-size:11px; letter-spacing:0.26em; text-transform:uppercase; text-align:center; transition:background 180ms,color 180ms,border-color 180ms; }
[data-load-more]:hover, [data-load-more]:focus-visible { background:#191817; color:#FBFAF8; border-color:#191817; }
[data-load-more][hidden] { display:none; }

/* Enquiry popup: clean, quiet form. Scoped to the dialog so the Contact page form is unchanged. */
.enquiry-dialog { width:min(560px,calc(100vw - 24px)); max-height:calc(100svh - 24px); padding:clamp(22px,4vw,40px); border:0; box-shadow:0 24px 70px rgba(25,24,23,.28); }
.enquiry-dialog::backdrop { background:rgba(25,24,23,.6); }
.enquiry-dialog .enquiry-dialog-heading { margin-bottom:22px; align-items:center; }
.enquiry-dialog .enquiry-dialog-heading h2 { font-weight:300; }
.enquiry-dialog .enquiry-dialog-heading button { width:40px; height:40px; border:0; border-radius:50%; font-size:24px; line-height:1; transition:background .2s; }
.enquiry-dialog .enquiry-dialog-heading button:hover { background:#EFEBE3; }
.enquiry-dialog .enquiry-artwork { gap:16px; padding:14px; margin-bottom:24px; border:0; background:#F4F1EB; }
.enquiry-dialog .enquiry-artwork img { width:72px; max-width:72px; height:72px; object-fit:contain; background:#fff; padding:4px; }
main > section .enquiry-dialog .enquiry-artwork img { width:72px!important; max-width:72px!important; height:72px!important; }
.enquiry-dialog .enquiry-artwork h3 { font-size:24px; }
.enquiry-dialog .enquiry-artwork p { margin:6px 0 0; font-size:11px; letter-spacing:.14em; text-transform:uppercase; }
.enquiry-dialog .enquiry-form { display:grid; gap:18px; }
.enquiry-dialog [data-work-context] { display:none; }
.enquiry-dialog .enquiry-form > label { display:grid; gap:8px; font-size:11px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#625E58; }
.enquiry-dialog .enquiry-form input:not([type=checkbox]),
.enquiry-dialog .enquiry-form select,
.enquiry-dialog .enquiry-form textarea { width:100%; box-sizing:border-box; padding:14px 16px; border:1px solid #D9D3C9; border-radius:0; background:#fff; color:#191817; font:400 16px/1.5 Jost,sans-serif; letter-spacing:0; text-transform:none; transition:border-color .2s, box-shadow .2s; }
.enquiry-dialog .enquiry-form select { appearance:none; -webkit-appearance:none; padding-right:44px; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23191817' stroke-width='1.4'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; }
.enquiry-dialog .enquiry-form input:not([type=checkbox]):focus,
.enquiry-dialog .enquiry-form select:focus,
.enquiry-dialog .enquiry-form textarea:focus { outline:0; border-color:#191817; box-shadow:0 0 0 3px rgba(25,24,23,.08); }
.enquiry-dialog .enquiry-form textarea { min-height:120px; resize:vertical; }
.enquiry-dialog .enquiry-form .consent { display:flex; align-items:flex-start; gap:12px; font:400 12px/1.7 Jost,sans-serif; letter-spacing:0; text-transform:none; color:#4A4640; }
.enquiry-dialog .enquiry-form .consent input { flex:0 0 auto; width:18px; height:18px; margin:2px 0 0; accent-color:#191817; }
.enquiry-dialog .enquiry-form .button { width:100%; justify-content:center; padding:17px 24px; background:#191817; color:#FBFAF8; border:1px solid #191817; font:500 12px/1 Jost,sans-serif; letter-spacing:.22em; text-transform:uppercase; cursor:pointer; transition:background .2s,color .2s; }
.enquiry-dialog .enquiry-form .button:hover:not(:disabled) { background:#fff; color:#191817; }
.enquiry-dialog .enquiry-form .button:disabled { background:#EFEBE3; border-color:#EFEBE3; color:#8A847C; cursor:not-allowed; }
.enquiry-dialog .form-status { margin:0; padding:12px 14px; background:#F4F1EB; border-left:2px solid #A8A29A; font:400 13px/1.7 Jost,sans-serif; color:#3B3733; }
.enquiry-dialog .form-status[data-error] { border-left-color:#8B5142; color:#3B3733; }
.enquiry-dialog .enquiry-alternative { margin:20px 0 0; padding-top:18px; border-top:1px solid #E6E0D6; text-align:center; font-size:13px; color:#625E58; }
@media(max-width:560px) {
  .enquiry-dialog { padding:20px 18px 24px; }
  .enquiry-dialog .enquiry-artwork img, main > section .enquiry-dialog .enquiry-artwork img { width:60px!important; max-width:60px!important; height:60px!important; }
  .enquiry-dialog .enquiry-form input:not([type=checkbox]), .enquiry-dialog .enquiry-form select, .enquiry-dialog .enquiry-form textarea { padding:14px; }
}

/* Brochure archive: same cards as the Drawings grid (white mat, thin border), artwork shown whole. */
.brochure-archive { scroll-margin-top:100px; }
.brochure-archive [data-work-card]>.artwork-frame{aspect-ratio:4/3;background:#FFFFFF;border:1px solid #D9D3C9;padding:clamp(16px,2.4vw,32px)}
.brochure-archive [data-work-grid] [data-work-card]>.artwork-frame img{inset:clamp(16px,2.4vw,32px);width:calc(100% - 2 * clamp(16px,2.4vw,32px))!important;height:calc(100% - 2 * clamp(16px,2.4vw,32px))!important}
