/* Layout: Dimitra Milan's collection structure (announcement, logo + centred nav, banner title,
   coloured band, filter/count/sort, dense grid of full-bleed tiles, Sold tag) set in Melina's
   night sky: deep blue ground, sun-gold accents, coral and turquoise from her paintings.
   One deliberate dark look; every colour is a token. */
:root {
  --night: #0b1530;        /* page ground */
  --night-up: #13224a;     /* raised surfaces */
  --night-deep: #060d22;   /* header, footer, story */
  --ink: #f6eedb;          /* text */
  --ink-soft: #b9c3da;
  --line: #2a3b66;         /* hairlines */
  --field-line: #7383aa;   /* form borders, >= 3:1 on --night */
  --sun: #f2b53a;          /* gold: prices, buttons, logo */
  --sun-deep: #d8931b;
  --on-sun: #1a1203;
  --coral: #ff7a59;        /* sold tag, commissions */
  --teal: #5ad6c8;         /* links */
  --focus: var(--sun);

  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Didot LT STD", serif;
  --font-label: "Jost", "Futura", "Avenir Next", "Century Gothic", sans-serif;
  --font-text: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-logo: "Allura", "Snell Roundhand", "Apple Chancery", cursive;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.35rem;
  --step-2: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  --step-3: clamp(2.6rem, 1.2rem + 6vw, 5.6rem);
  --step-hero: clamp(2.4rem, 12.4vw, 11rem);

  --gutter: max(clamp(16px, 3.4vw, 44px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --max: 1320px;
  --header-h: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
  /* Bodoni's display cut thins hairlines to nothing at large sizes ("How" reads "Ilow"). */
  font-optical-sizing: none;
  font-variation-settings: "opsz" 6;
  font-variant-ligatures: none;
}
p, figure, ol { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-family: var(--font-label); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--sun); }
.spark { color: var(--sun); margin-inline: 0.8em; }
section[id], .work, .grid { scroll-margin-top: calc(var(--header-h) + 12px); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--sun); color: var(--on-sun); padding: 0.7rem 1rem; font-family: var(--font-label); }
.skip:focus { top: 12px; }

/* Announcement + header */
.announce {
  background: var(--night-deep);
  color: var(--ink);
  text-align: center;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.announce .spark { margin-inline: 1.2em; }

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem 1.5rem;
  padding: 0.4rem var(--gutter);
  background: rgb(6 13 34 / 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: baseline; gap: 0.4rem; text-decoration: none; justify-self: start; min-height: 44px; }
.logo-name { font-family: var(--font-logo); font-size: 2.6rem; line-height: 1; color: var(--sun); }
.logo-art { font-family: var(--font-label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); }
.site-nav { display: flex; justify-content: center; gap: 0 2.2rem; }
.site-nav a, .site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"], .site-nav a[aria-current="location"] { color: var(--sun); border-bottom-color: var(--sun); }
.header-end { justify-self: end; display: flex; align-items: center; gap: 1.2rem; }
.header-ask { white-space: nowrap; }
.currency { font-family: var(--font-label); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ink-soft); }
.header-ask {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 1.1rem;
  border: 1px solid var(--sun); border-radius: 999px; color: var(--sun); text-decoration: none;
  font-family: var(--font-label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.header-ask:hover { background: var(--sun); color: var(--on-sun); }

@media (max-width: 860px) {
  /* On phones the header scrolls away with the page, so it never covers the paintings. */
  :root { --header-h: 0px; }
  .announce-extra, .currency { display: none; }
  .site-header { position: static; grid-template-columns: minmax(0, 1fr) auto; padding-block: 0.3rem 0; row-gap: 0; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0.4rem; }
  .site-nav a { font-size: 0.8rem; letter-spacing: 0.1em; }
  .logo-name { font-size: 2.2rem; }
  .header-end { gap: 0.3rem; }
  .header-ask { padding-inline: 0.9rem; letter-spacing: 0.1em; }
}
@media (max-height: 500px) { .site-header { position: static; } :root { --header-h: 0px; } }
@media (max-width: 380px) {
  .site-header { column-gap: 0.5rem; }
  .logo-name { font-size: 1.9rem; }
  .logo { gap: 0.2rem; }
  .logo-art { font-size: 0.65rem; letter-spacing: 0.16em; }
  .header-end { gap: 0.1rem; }
  .header-ask { padding-inline: 0.55rem; font-size: 0.72rem; letter-spacing: 0.06em; }
  .site-nav a { font-size: 0.75rem; letter-spacing: 0.03em; }
  .site-nav { gap: 0.2rem; flex-wrap: wrap; }
}

/* Banner */
.hero { position: relative; height: clamp(250px, 58vh, 620px); overflow: hidden; background: var(--night-deep); isolation: isolate; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; animation: hero-settle 2.6s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 62%, rgb(6 13 34 / 0.55), transparent 70%),
    linear-gradient(180deg, rgb(6 13 34 / 0.1) 30%, rgb(11 21 48 / 0.92));
}
.hero-text { position: absolute; inset: auto 0 0; z-index: 1; display: grid; justify-items: center; gap: 0.2rem; padding: 0 var(--gutter) clamp(1.4rem, 4vw, 3rem); text-align: center; }
.hero h1 {
  font-size: var(--step-hero);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-shadow: 0 4px 40px rgb(0 0 0 / 0.45);
  animation: hero-rise 1.3s 0.25s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.hero .eyebrow {
  font-family: var(--font-logo);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.8rem);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.6);
  animation: hero-rise 1.3s 0.1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
@media (max-width: 560px) { .hero { height: 50svh; min-height: 280px; } }
@keyframes hero-settle { from { transform: scale(1.14); opacity: 0.35; } to { transform: none; opacity: 1; } }
@keyframes hero-rise { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Band */
.band {
  background: var(--sun);
  color: var(--on-sun);
  --focus: var(--night);
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.8rem);
  padding: 0.85rem var(--gutter);
}
.band .spark { color: var(--on-sun); font-style: normal; font-size: 0.8em; }

/* Toolbar */
.toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-block: 1.4rem; }
.control { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.control-end { justify-self: end; }
.count { font-family: var(--font-label); font-size: 0.85rem; letter-spacing: 0.08em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.toolbar.no-filter { grid-template-columns: 1fr auto; }
.toolbar.no-filter .count { justify-self: start; }
select {
  font-family: var(--font-text);
  font-size: 1rem;
  min-height: 44px;
  color: var(--ink);
  background: var(--night-up);
  border: 1px solid var(--field-line);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  max-width: 100%;
}
@media (max-width: 560px) {
  .toolbar { padding-block: 0.9rem; gap: 0.6rem; grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar:not(.no-filter) .count { grid-column: 1 / -1; grid-row: 2; }
  .control { min-width: 0; }
  .control > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Grid of paintings: the first is the big one */
.grid {
  list-style: none;
  margin-block: 0 clamp(2.5rem, 5vw, 4rem);
  padding-block: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(0.75rem, 1.6vw, 1.4rem);
}
.grid:focus { outline: none; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile { min-width: 0; }
.tile a { display: flex; flex-direction: column; gap: 0.7rem; height: 100%; color: inherit; text-decoration: none; }
.tile-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--night-up);
  box-shadow: 0 18px 40px -22px var(--tint, #000);
  transition: box-shadow 0.4s, transform 0.4s;
}
.tile-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.5s; }
.tile-frame .tile-alt { opacity: 0; }
.tile a:hover .tile-frame, .tile a:focus-visible .tile-frame { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--sun), 0 28px 60px -20px var(--tint, #000); }
.tile a:hover .tile-frame img { transform: scale(1.05); }
.tile a:hover .tile-alt, .tile a:focus-visible .tile-alt { opacity: 1; }
.tile-name { font-family: var(--font-label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.86rem; text-align: center; line-height: 1.4; }
.tile-price { text-align: center; color: var(--sun); font-variant-numeric: tabular-nums; margin-top: -0.45rem; }
.badge {
  position: absolute; top: 0; right: 0; z-index: 2;
  background: var(--coral); color: var(--on-sun);
  font-family: var(--font-label); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.35rem 0.8rem;
}

.tile-featured { grid-column: span 2; grid-row: span 2; }
.tile-featured .tile-frame { aspect-ratio: auto; flex: 1; min-height: 20rem; }
.tile-featured .tile-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem); letter-spacing: 0.02em; text-transform: none; }
.tile-featured .tile-price { font-size: 1.1rem; margin-top: -0.3rem; }
@media (max-width: 900px) {
  .tile-featured { grid-row: auto; }
  .tile-featured .tile-frame { flex: none; aspect-ratio: 4 / 5; min-height: 0; }
}
@media (max-width: 560px) { .tile:not(.tile-featured) .tile-name { min-height: 2.8em; } }
.empty { padding-block: 3rem; text-align: center; color: var(--ink-soft); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0.8rem 1.8rem; max-width: 100%; text-align: center;
  font-family: var(--font-label); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  background: var(--sun); color: var(--on-sun); border: 1px solid var(--sun); border-radius: 999px; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.button:hover { background: var(--sun-deep); transform: translateY(-1px); }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--field-line); min-height: 44px; padding: 0.5rem 1.2rem; font-size: 0.78rem; }
.button-quiet:hover { background: transparent; border-color: var(--sun); color: var(--sun); }
.button-night { background: var(--night); color: var(--ink); border-color: var(--night); }
.button-night:hover { background: var(--night-deep); }
.copied { font-family: var(--font-label); font-size: 0.95rem; color: var(--teal); min-height: 1.5em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
