/* ajlas.art splash page. Fonts: Syne (OFL, Bonjour Monde) and DM Sans (OFL), both self-hosted. */
@font-face { font-family: 'Syne'; src: url(fonts/syne-latin.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(fonts/dm-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(fonts/dm-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --wall: #eef0f1;
  --ink: #131416;
  --muted: #5a5f66;
  --line: rgb(19 20 22 / 0.16);
  --accent: #c42a4f;           /* replaced by a color taken from the painting on show */
  --shadow: rgb(20 22 26 / 0.24);
  --pad: clamp(20px, 3.6vw, 56px);
  --frame-pad: 20px;           /* space between the painting and the edge of its canvas; read by splash.js */
  --display: 'Syne', 'Arial Black', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #141517;
    --ink: #f0f0ee;
    --muted: #a3a8ae;
    --line: rgb(240 240 238 / 0.18);
    --accent: #ff6f92;
    --shadow: rgb(0 0 0 / 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.splash {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "stage" "about" "contact";
}

/* Name */
.intro { grid-area: intro; padding: var(--pad) var(--pad) 4px; container-type: inline-size; }
.signature { display: block; width: auto; height: clamp(40px, 5.2vw, 60px); margin: 0 0 clamp(18px, 3.4vh, 36px) -2px; }
.eyebrow {
  display: flex; align-items: center; gap: 0.65em;
  margin: 0 0 0.85rem;
  font: 500 0.78rem/1.2 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before {
  content: ''; width: 0.6em; height: 0.6em; border-radius: 50%;
  background: var(--accent); transition: background-color 0.9s ease;
}
.name {
  margin: 0;
  font: 700 calc(100cqi / 5.5) / 0.92 var(--display);
  letter-spacing: -0.035em;
}
.name span { display: block; }
.lede { margin: 1rem 0 0; max-width: 32ch; color: var(--muted); font-size: 1.05rem; }

/* Painting */
.stage {
  grid-area: stage;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: clamp(380px, 66svh, 760px);
  padding-top: 12px;
}
.frame { position: relative; min-height: 0; }
.frame img, .frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.frame img {
  object-fit: contain;
  padding: var(--frame-pad);
  filter: drop-shadow(0 12px 22px var(--shadow));
}
.frame canvas {
  touch-action: pan-y;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='13' fill='none' stroke='%23000' stroke-opacity='.75' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='13' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E") 16 16, crosshair;
}

.caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 10px var(--pad) 0;
}
.work { display: grid; gap: 1px; transition: opacity 0.25s ease; }
.work.swap { opacity: 0; }
.title { font: 700 1.05rem/1.25 var(--display); letter-spacing: -0.01em; }
.medium { font-size: 0.9rem; color: var(--muted); }
.controls { display: flex; gap: 6px; }
.controls button {
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.controls button:hover { border-color: var(--ink); }
.controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.controls .i-play { fill: currentColor; stroke-width: 1.2; }
#pause .i-play, #pause[aria-pressed="true"] .i-pause { display: none; }
#pause[aria-pressed="true"] .i-play { display: block; }
.hint {
  grid-column: 1 / -1;
  font-size: 0.82rem; color: var(--muted);
  transition: opacity 0.6s ease;
}
.hint.done { opacity: 0; }

/* Words and contact */
.about { grid-area: about; padding: clamp(28px, 4.5vh, 56px) var(--pad) 0; }
.quote { margin: 0; }
.quote p {
  margin: 0; max-width: 21ch;
  font: 600 clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem) / 1.25 var(--display);
  letter-spacing: -0.015em; text-wrap: balance;
}
.bio { margin: 1rem 0 0; max-width: 52ch; color: var(--muted); font-size: 0.95rem; }

.contact {
  grid-area: contact;
  display: grid; justify-items: start; gap: 8px;
  padding: clamp(28px, 4.5vh, 56px) var(--pad) max(var(--pad), env(safe-area-inset-bottom));
}
.fine { margin: 0; font-size: 0.8rem; color: var(--muted); }

/* Wide screens: words on the left, the painting fills the right and stays put */
@media (min-width: 900px) and (min-aspect-ratio: 1/1), (min-width: 1280px) {
  :root { --frame-pad: 14px; }
  .splash {
    grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "intro stage" "about stage" "contact stage";
  }
  .stage {
    grid-row: 1 / -1;
    position: sticky; top: 0;
    height: 100svh;
    padding: var(--pad) var(--pad) var(--pad) 0;
  }
  .caption { padding: 14px var(--frame-pad) 0; }
  .contact { align-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .work, .hint, .eyebrow::before { transition: none; }
}
