/* Wallpaper Maker (wmaker.waifucave.com): the maker's workshop at dusk.
   Loaded after /family/family.css. One memorable thing: a wallpaper taken apart into its layers. */

:root {
  --line: color-mix(in oklab, var(--accent) 62%, transparent);   /* the drafting lines of the workshop */
  --line-soft: color-mix(in oklab, var(--accent) 30%, transparent);
}

/* Hero: the workbench */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: clamp(2.5rem, 1rem + 5vw, 5rem) clamp(3rem, 1.5rem + 5vw, 5.5rem);
}
.hero::before { /* dusk light falling on the bench, strongest behind the stack */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 78% 52%, rgba(122, 46, 140, .34), transparent 70%),
    radial-gradient(40% 45% at 70% 70%, rgba(217, 84, 142, .16), transparent 70%),
    radial-gradient(30% 40% at 86% 30%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%);
}
.hero::after { /* the dots fade into the cave below */
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: center; }
.hero-copy .pill { margin: 0 0 1.4rem; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4rem); max-width: 13ch; margin-bottom: 1.4rem; }
.hero .lede { margin-bottom: 2rem; }
.stack { margin: 0; container-type: inline-size; } /* before the layouts below, which give it its bleed */

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 1.5rem; }
  .hero-copy { padding-bottom: 2rem; }
  /* the bench runs on into the page margin */
  .stack { margin-right: calc(-1 * clamp(0px, (100vw - var(--maxw)) / 2, 110px)); }
}
@media (max-width: 959.98px) {
  .stack { margin-inline: calc(-1 * var(--gutter)); }
  .stack figcaption { padding-inline: var(--gutter); }
}

/* The stack: the layers of one wallpaper, exploded. Everything inside scales with the figure (cqw). */
/* Geometry: rig 58cqw wide at (10, 28), layers 14cqw apart, rotateX(52) rotateZ(-26), perspective 320cqw from (42%, 30%).
   Projected, the stack spans x 3-75 and y 6-67 cqw; each label's dot sits on its layer's right edge, 60% down. */
.stage { position: relative; aspect-ratio: 100 / 72; perspective: 320cqw; perspective-origin: 42% 30%; }
.rig {
  position: absolute; left: 10cqw; top: 28cqw; width: 58cqw; aspect-ratio: 16 / 10;
  transform-style: preserve-3d; transform: rotateX(52deg) rotateZ(-26deg);
}
.layer { position: absolute; inset: 0; border-radius: 1.3cqw; transform: translateZ(calc(var(--i) * 14cqw)); transform-style: preserve-3d; }
.layer img { width: 100%; height: 100%; border-radius: inherit; }
.layer-scene img { box-shadow: 0 0 0 1px rgba(244, 241, 251, .16); }
.layer-scene::after { /* its shadow on the bench */
  content: ""; position: absolute; inset: 6% 4% -4% 6%; z-index: -1; border-radius: inherit;
  background: rgba(4, 2, 10, .6); filter: blur(2.4cqw); transform: translateZ(-3cqw);
}
.layer-pane {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
}
.layer-pane::before { /* crop marks at the corners, like a sheet on a drafting table */
  content: ""; position: absolute; inset: -1.4cqw; border-radius: 0; pointer-events: none;
  --m: 2.2cqw; --w: 1px;
  background:
    linear-gradient(var(--line-soft), var(--line-soft)) 0 0 / var(--m) var(--w) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 0 0 / var(--w) var(--m) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 100% 0 / var(--m) var(--w) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 100% 0 / var(--w) var(--m) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 0 100% / var(--m) var(--w) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 0 100% / var(--w) var(--m) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 100% 100% / var(--m) var(--w) no-repeat,
    linear-gradient(var(--line-soft), var(--line-soft)) 100% 100% / var(--w) var(--m) no-repeat;
}
.layer .ring { position: absolute; width: 34%; height: auto; left: 62%; top: 49%; translate: -50% -50%; border-radius: 0; }

/* Labels with leader lines, flat on the page */
.tags { list-style: none; margin: 0; padding: 0; }
.tag {
  position: absolute; left: var(--x); top: calc(var(--y) - .62em); display: grid; gap: .1rem;
  --end: 79cqw; /* where the leader lines end and the labels begin */
  padding-left: calc(var(--end) - var(--x) + 1.6cqw); font-size: clamp(.8rem, .6rem + 1cqw, .95rem); line-height: 1.25; white-space: nowrap;
}
.tag::before { /* the leader: a dot on the layer, a line to the label */
  content: ""; position: absolute; left: 0; top: .62em; width: calc(var(--end) - var(--x)); height: 1px;
  background: linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 9px, var(--line) 9px) 0 0 / 100% 1px no-repeat;
}
.tag::after {
  content: ""; position: absolute; left: -3px; top: calc(.62em - 3px); width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.tag strong { font-weight: 600; color: var(--fg); }
.tag span { color: var(--muted); }
.tag-ring { --x: 67.4cqw; --y: 18.1cqw; }
.tag-aurora { --x: 66.7cqw; --y: 29.3cqw; }
.tag-scene { --x: 66.1cqw; --y: 39.9cqw; }
@container (max-width: 600px) { /* narrow: names only, the caption says the rest */
  .tag { --end: 76.5cqw; font-size: .78rem; }
  .tag span { display: none; }
}
@container (max-width: 360px) { .tag { --end: 74cqw; font-size: .72rem; } }
@media (max-width: 759.98px) { .tag span { display: none; } }  /* the stack bleeds to the screen edge here */
.stack figcaption { margin-top: .25rem; max-width: 46ch; }

/* One orchestrated moment: the wallpaper comes apart on load. The resting state is the default. */
@media (prefers-reduced-motion: no-preference) {
  .layer { animation: wm-explode 1s var(--ease-out) .1s backwards; }
  .tag { animation: wm-tag .35s var(--ease-out) backwards; animation-delay: calc(.55s + (2 - var(--t)) * .07s); }
  @keyframes wm-explode { from { transform: translateZ(0); } }
  @keyframes wm-tag { from { opacity: 0; translate: -1.2cqw 0; } }
}

/* Wallpaper Studio: the one arch on the page */
.studio { padding-top: clamp(2rem, 1rem + 4vw, 4rem); }
.studio-grid { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: center; }
.studio-art { margin: 0; width: 100%; max-width: min(400px, 82vw); justify-self: center; }
.studio-art .arch {
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(244, 241, 251, .14), 0 50px 120px -40px rgba(122, 46, 140, .8), 0 0 0 10px rgba(14, 11, 26, 1), 0 0 0 11px var(--line-soft);
}
.studio-art figcaption { text-align: center; }
.studio h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); max-width: 14ch; margin-bottom: 1.25rem; }
.studio-copy p { max-width: 54ch; color: var(--muted); }
.studio-copy p:first-of-type { color: var(--fg); font-size: var(--step-1); line-height: 1.5; }
.studio-badge { margin: .5rem 0 1.75rem; }
.studio-badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--wc-lilac); flex: none; }

@media (min-width: 860px) {
  .studio-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); }
  .studio-art { justify-self: end; }
}

/* Contact */
.contact { padding-top: var(--section); }
.contact-panel { padding: clamp(1.75rem, 1rem + 3vw, 3rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.contact-panel h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); margin: 0; }

.fam-footer { margin-top: clamp(3.5rem, 2rem + 5vw, 6rem); }

/* 404 */
.lost { padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) 0; }
.lost-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.lost h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.25rem); max-width: 12ch; }
.lost p { color: var(--muted); max-width: 40ch; margin-bottom: 2rem; }
.lost-arch { /* an empty window at dusk: nothing made here yet */
  width: min(100%, 320px); justify-self: center; position: relative;
  border: 1.5px dashed var(--line); display: grid; place-items: center;
  background-color: rgba(23, 18, 37, .6);
  background-image:
    radial-gradient(circle, rgba(244, 241, 251, .085) 1px, transparent 1.5px),
    radial-gradient(70% 40% at 50% 104%, rgba(240, 120, 120, .45), rgba(122, 46, 140, .25) 55%, transparent 100%);
  background-size: 22px 22px, 100% 100%;
}
@media (max-width: 859.98px) { .lost-arch { width: min(62%, 240px); } }
.lost-arch span { font: 600 clamp(3.5rem, 2rem + 6vw, 5.5rem)/1 var(--font-display); letter-spacing: -.03em; color: color-mix(in oklab, var(--accent) 70%, var(--fg)); }
@media (min-width: 860px) {
  .lost-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
