/*
Theme Name: Irina Lapin Art
Theme URI: https://irinalapinart.com/
Author: Jedi Web Services
Author URI: https://jediwebservices.com/
Description: Gallery theme for Irina Lapin Art. Display style #8: no mat or frame, one soft taupe shadow, every painting in a row the same height, gentle lift on hover. Sold work stays in its gallery, marked SOLD.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: irina-lapin
*/

:root {
	--wall: #f7f5f1;
	--ink: #231f20;
	--ink-soft: #3d3836;
	--muted: #6f6a66;
	--accent: #9c3f2a;
	--line: #e4dfd8;
	--shadow: -7px 7px 4px -1px #bdb2a4;        /* option #8: one taupe shadow, down-left, soft edges */
	--shadow-hover: -10px 11px 6px -1px #c3b9ac;
	--row-h: 300px;                              /* every painting in a gallery row gets this height */
	--gutter: clamp(20px, 4vw, 52px);
	--serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--sans: Karla, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wall); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, .il-serif { font-family: var(--serif); font-weight: 600; line-height: 1.1; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { position: static !important; width: auto; height: auto; clip: auto; padding: 8px 12px; background: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.il-wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }

/* ── Header ── */
.il-header { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; align-items: baseline; padding-block: 28px; }
.il-brand { font: 600 32px/1 var(--serif); letter-spacing: .02em; text-decoration: none; }
.il-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding: 0; }
.il-nav a { text-decoration: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.il-nav a:hover, .il-nav .current-menu-item > a, .il-nav a[aria-current="page"] { color: var(--accent); }

/* ── Buttons ── */
.il-btn { display: inline-block; border: 1px solid var(--ink); color: var(--ink); background: none; text-decoration: none; padding: 12px 24px; font: 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.il-btn:hover { background: var(--ink); color: var(--wall); }
.il-btn--solid { background: var(--ink); color: var(--wall); }
.il-btn--solid:hover { background: var(--accent); border-color: var(--accent); }

/* ── The art object (option #8) ── */
.il-art { position: relative; display: block; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s cubic-bezier(.2,.7,.2,1); }
.il-art img { width: 100%; height: 100%; object-fit: cover; }
a:hover > .il-art, a:focus-visible > .il-art, .il-art:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
@media (prefers-reduced-motion: reduce) { .il-art { transition: none; } a:hover > .il-art, .il-art:hover { transform: none; } }
.il-sold { position: absolute; top: 12px; right: 12px; background: var(--wall); color: var(--accent); font: 600 11px/1 var(--sans); letter-spacing: .16em; padding: 7px 10px; }

/* ── Homepage ── */
.il-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; padding-block: 24px 72px; }
.il-hero .il-art { max-width: 460px; justify-self: end; }
.il-eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.il-hero h1 { font-size: clamp(46px, 6vw, 70px); margin: 0 0 18px; }
.il-hero p { margin: 0 0 28px; max-width: 38ch; color: var(--ink-soft); }

.il-galleries { border-top: 1px solid var(--line); padding-block: 44px 80px; }
.il-galleries > h2 { font-size: 36px; margin: 0 0 34px; }
.il-tiles { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 24px; align-items: flex-end; }
.il-tile { text-decoration: none; display: block; }
.il-tile .il-art { height: var(--tile-h, 340px); width: calc(var(--tile-h, 340px) * var(--r)); }
.il-tile h3 { font-size: 28px; margin: 22px 0 2px; }
.il-tile p { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Gallery pages: every painting in a row the same height; width follows its shape ── */
.il-gallery-head { padding-block: 8px 12px; max-width: 70ch; }
.il-gallery-head h1 { font-size: clamp(38px, 5vw, 54px); margin: 0 0 12px; }
.il-gallery-head .il-intro { color: var(--ink-soft); }
.il-set { padding-block: 34px 18px; }
.il-set + .il-set { border-top: 1px solid var(--line); }
.il-set h2 { font: italic 500 24px/1.2 var(--serif); color: var(--muted); margin: 0 0 26px; }
.il-row { display: flex; flex-wrap: wrap; gap: 48px 40px; align-items: flex-end; }
.il-card { margin: 0; width: calc(var(--row-h) * var(--r)); } /* caption never wider than its painting */
.il-card a { text-decoration: none; display: block; }
.il-card .il-art { height: var(--row-h); width: calc(var(--row-h) * var(--r)); }
.il-card figcaption { padding-top: 18px; font-size: 13px; color: var(--muted); }
.il-card .il-title { display: block; font: 600 21px/1.25 var(--serif); color: var(--ink); }
.il-card .il-price { color: var(--accent); font-weight: 600; }

/* ── Detail panel (opens over the gallery) ── */
.il-panel { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr) min(380px, 100%); background: rgba(247,245,241,.98); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.il-panel.is-open { opacity: 1; visibility: visible; }
.il-panel__stage { display: grid; place-items: center; padding: 40px; min-height: 0; }
.il-panel__stage img { max-height: calc(100vh - 80px); max-width: 100%; width: auto; height: auto; box-shadow: var(--shadow); }
.il-panel__info { background: #fff; padding: 64px 34px 34px; overflow-y: auto; border-left: 1px solid var(--line); }
.il-panel__info h2 { font-size: 34px; margin: 0 0 10px; }
.il-panel__info dl { margin: 18px 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.il-panel__info dt { color: var(--muted); }
.il-panel__info dd { margin: 0; }
.il-panel__price { font: 600 26px/1 var(--serif); color: var(--accent); margin: 0 0 24px; }
.il-panel__close { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--wall); font: 26px/1 var(--sans); cursor: pointer; }
.il-panel__nav { display: flex; gap: 10px; margin-top: 24px; }
.il-panel__nav button { flex: 1; }
.il-panel__note { font-size: 13px; color: var(--muted); margin-top: 22px; }

/* ── Single artwork page (also the no-JavaScript fallback) ── */
.il-single { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; padding-block: 24px 80px; }
.il-single .il-art { justify-self: center; }
.il-single .il-art img { max-height: 78vh; width: auto; }
.il-single h1 { font-size: clamp(36px, 5vw, 52px); margin: 0 0 12px; }

/* ── Pages & blog ── */
.il-page { max-width: 760px; padding-block: 16px 80px; }
.il-page h1 { font-size: clamp(38px, 5vw, 54px); margin: 0 0 24px; }
.il-page h2 { font-size: 30px; margin: 40px 0 12px; }
.il-page table { width: 100%; border-collapse: collapse; font-size: 15px; }
.il-page th, .il-page td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.il-posts { list-style: none; padding: 0; margin: 0; }
.il-posts li { padding-block: 24px; border-bottom: 1px solid var(--line); }
.il-posts h2 { font-size: 28px; margin: 0 0 6px; }
.il-posts a { text-decoration: none; }
.il-meta { font-size: 13px; color: var(--muted); }

/* ── Footer ── */
.il-footer { border-top: 1px solid var(--line); padding-block: 40px 56px; font-size: 14px; color: var(--muted); }
.il-footer__grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.il-footer .il-brand { font-size: 24px; color: var(--ink); }
.il-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.il-footer a { text-decoration: none; }
.il-footer a:hover { color: var(--accent); }

/* ── Small screens ── */
@media (max-width: 900px) {
	:root { --row-h: 220px; }
	.il-hero, .il-single { grid-template-columns: minmax(0, 1fr); }
	.il-hero .il-art { justify-self: start; max-width: 100%; }
	.il-tiles { --tile-h: 260px; justify-content: flex-start; }
	.il-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.il-panel__stage { padding: 56px 20px 16px; }
	.il-panel__stage img { max-height: 52vh; }
	.il-panel__info { border-left: 0; border-top: 1px solid var(--line); padding: 22px 22px 28px; max-height: 46vh; }
}
@media (max-width: 560px) {
	:root { --row-h: 170px; }
	.il-row { gap: 34px 22px; }
	.il-tiles { --tile-h: 200px; }
}
