/* Nikoloz Tchumburidze — portfolio
   Palette: near black, magnolia, one red. Display: Bodoni Moda. Interface: Figtree. */

:root {
  --ink: #0a0a0a;
  --paper: #faf7f0;
  --red: #fc3030;
  --red-deep: #b81818;
  --wall: #15110e;
  --mute: rgba(250, 247, 240, 0.58);
  --line: rgba(250, 247, 240, 0.16);
  --display: "Bodoni Moda", "Bodoni 72", Didot, serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --pad: clamp(14px, 2.4vw, 26px);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: #070606;
  color: var(--paper);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* The room behind everything: a lit back wall, a floor that runs away from you,
   red embers in two corners and a few soft lights floating in between.
   The three groups slide by different amounts as the pointer moves, which is what reads as depth. */
#backdrop {
  --glow: 250, 247, 240;
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: linear-gradient(#1a1511 0%, #100d0b 44%, #070606 62%, #040404 100%);
}
#backdrop > div { position: absolute; inset: -6%; will-change: transform; }
.bd-wall {
  background:
    radial-gradient(46% 44% at 50% 36%, rgba(var(--glow), 0.17), rgba(var(--glow), 0.05) 55%, transparent 78%),
    radial-gradient(34% 30% at 4% 98%, rgba(184, 24, 24, 0.34), transparent 72%),
    radial-gradient(30% 26% at 99% 6%, rgba(184, 24, 24, 0.18), transparent 72%);
}
.bd-floor::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 61%; bottom: 0;
  border-top: 1px solid rgba(250, 247, 240, 0.075);
  background:
    radial-gradient(46% 62% at 50% 0%, rgba(var(--glow), 0.13), transparent 72%),
    linear-gradient(rgba(250, 247, 240, 0.045), transparent 50%);
}
/* floor boards that meet at a vanishing point just above the horizon */
.bd-floor::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 61%; bottom: 0;
  background: repeating-conic-gradient(from 90deg at 50% -4%, transparent 0 5.55deg, rgba(250, 247, 240, 0.05) 5.55deg 6deg);
  -webkit-mask-image: linear-gradient(transparent 2%, #000 34%, transparent 96%);
  mask-image: linear-gradient(transparent 2%, #000 34%, transparent 96%);
}
.bd-orbs i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--glow), 0.1), rgba(var(--glow), 0.03) 60%, transparent);
  animation: drift 28s ease-in-out infinite alternate;
}
.bd-orbs i:nth-child(1) { left: 9%; top: 16%; width: 30vmax; height: 30vmax; }
.bd-orbs i:nth-child(2) { right: 4%; top: 40%; width: 22vmax; height: 22vmax; animation-duration: 36s; animation-delay: -12s; }
.bd-orbs i:nth-child(3) {
  left: 36%; bottom: 2%; width: 16vmax; height: 16vmax; animation-duration: 22s; animation-delay: -6s;
  background: radial-gradient(closest-side, rgba(252, 48, 48, 0.12), transparent);
}
@keyframes drift { from { transform: translate3d(-2.5vmax, 1.5vmax, 0); } to { transform: translate3d(2.5vmax, -2vmax, 0); } }
/* dark corners pull the eye to the middle */
#backdrop::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(115% 95% at 50% 42%, transparent 46%, rgba(0, 0, 0, 0.66) 100%);
}
/* The AI wing swaps the warm light for a red one. */
body[data-wing="ai"] #backdrop { --glow: 252, 60, 60; }
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  /* Plain blending on purpose: mix-blend-mode over the whole screen made every frame of the spiral expensive. */
  opacity: 0.04;
  pointer-events: none;
  z-index: 60;
}

button, a { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { text-decoration: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ---------- pills ---------- */

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pill:hover { background: #fff; }
.pill:active { transform: scale(0.955); }
.pill-ghost { background: rgba(10, 10, 10, 0.55); color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.pill-ghost:hover { background: rgba(250, 247, 240, 0.1); }
.pill-ghost[aria-pressed="true"] { background: var(--red); color: var(--ink); box-shadow: none; }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill-ink:hover { background: #222; }
.pill-small { padding: 10px 15px; font-size: 14px; }

/* ---------- mascot ---------- */

.mascot { display: block; }
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot-big { width: clamp(130px, 19vw, 180px); aspect-ratio: 128 / 120; }
.mascot-btn { width: 70px; aspect-ratio: 128 / 120; transition: transform 0.25s var(--ease); }
.mascot-btn:hover { transform: scale(1.06); }
.mascot-btn:active { transform: scale(0.92); }

/* --ex and --ey are set from the pointer: the face slides over the disc as if the head turned,
   and the eyes travel a little further behind the lenses. Everything moves slowly: it is a calm, heavy character. */
.m-ball { animation: breathe 7s ease-in-out infinite; transform-box: view-box; transform-origin: 64px 112px; }
.m-face { transform: translate(calc(var(--ex, 0px) * 1.1), calc(var(--ey, 0px) * 1.1)); transition: transform 0.3s ease-out; }
.m-eye { transform: translate(calc(var(--ex, 0px) * 0.9), calc(var(--ey, 0px) * 0.8)); transition: transform 0.22s ease-out; }
.m-pupil { transform-box: fill-box; transform-origin: center; transition: transform 0.22s var(--ease), opacity 0.12s, fill 0.3s; }
.m-arc { opacity: 0; transition: opacity 0.12s; }
.m-brush { transform-box: view-box; transform-origin: 104px 80px; transform: rotate(12deg); transition: transform 0.35s var(--ease); }
.mascot.is-wave .m-brush { animation: wave 0.7s var(--ease); }

/* cool is the resting face: two upright pill eyes. The other moods only change the eyes. */
.mascot[data-mood="happy"] .m-pupil { opacity: 0; }
.mascot[data-mood="happy"] .m-arc { opacity: 1; }
.mascot[data-mood="happy"] .m-brush { transform: rotate(2deg); }

.mascot[data-mood="wow"] .m-pupil { transform: scale(1.14, 1.12); }

.mascot[data-mood="sus"] .m-pupil { transform: scaleY(0.42); }

.mascot[data-mood="wink"] .m-pupil-l { transform: scaleY(0.13); }

.mascot[data-mood="cheeky"] .m-pupil { transform: rotate(16deg); }
.mascot[data-mood="cheeky"] .m-brush { transform: rotate(24deg); }

.mascot.is-blink .m-pupil { transform: scaleY(0.1) !important; transition-duration: 0.07s; }

@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.01, 0.99); } }
@keyframes wave {
  0% { transform: rotate(12deg); } 30% { transform: rotate(-16deg); }
  60% { transform: rotate(24deg); } 100% { transform: rotate(12deg); }
}

/* ---------- entrance ---------- */

#gate {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 24px; text-align: center;
  transition: opacity 0.35s;
}
.gate-inner { display: grid; justify-items: center; gap: 18px; }
.gate-name {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(36px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.012em;
  margin-top: 8px;
}
.gate-role { color: var(--mute); }
.gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }

body.is-in #gate { opacity: 0; pointer-events: none; }

/* The site opens through a growing circle. */
#app {
  position: fixed; inset: 0;
  visibility: hidden;
  clip-path: circle(0% at 50% 42%);
  transition: clip-path 1.2s var(--ease);
}
body.is-in #app { visibility: visible; clip-path: circle(150% at 50% 42%); }
body.is-open #app { clip-path: none; }

/* ---------- top bar ---------- */

.bar {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--pad);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }

.wings {
  position: absolute; left: 50%; top: calc(var(--pad) + 12px); transform: translateX(-50%);
  display: flex; gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.6);
  box-shadow: inset 0 0 0 1px var(--line);
}
.wings button {
  padding: 9px 15px; border-radius: 999px;
  font-size: 15px; font-weight: 500; line-height: 1;
  color: var(--mute);
  transition: color 0.2s, background-color 0.2s, transform 0.12s var(--ease);
}
.wings button:hover { color: var(--paper); }
.wings button:active { transform: scale(0.95); }
.wings button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.wings button[data-wing="ai"][aria-pressed="true"] { background: var(--red); }

/* ---------- spiral ---------- */

.stage {
  position: absolute; inset: 0;
  perspective: 1500px; perspective-origin: 50% 44%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.stage.is-dragging { cursor: grabbing; }
.stage::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(transparent, rgba(6, 5, 5, 0.86) 80%);
  pointer-events: none;
}

.tilt {
  position: absolute; left: 50%; top: 41%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  transform: rotateX(-5deg) rotateZ(-5deg);
}
.helix { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform; transition: opacity 0.25s; }
.helix.is-swapping { opacity: 0; }

.card {
  position: absolute;
  width: var(--cw); height: var(--ch);
  left: calc(var(--cw) / -2); top: calc(var(--ch) / -2);
  border-radius: 10px;
  overflow: hidden;
  background: #171717;
  /* No soft shadow: 29 of them cost about two thirds of the frame rate and could not be seen on the dark room. */
  cursor: pointer;
}
.card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.card.is-back { background: linear-gradient(160deg, #2e2a27, #1c1a18); }
.card.is-back > * { visibility: hidden; }
.card.is-front { box-shadow: 0 0 0 2px var(--paper); }

/* Who made it: outlined for design, magnolia for hand, red for AI. */
.tag {
  position: absolute; left: 9px; top: 9px;
  padding: 5px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1;
  background: rgba(10, 10, 10, 0.78); color: var(--paper);
}
.tag-painting { background: var(--paper); color: var(--ink); }
.tag-ai { background: var(--red); color: var(--ink); }

/* Empty slots, clearly labelled. */
.ph {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  padding: 14px; text-align: center;
  background: #1b1b1b; color: var(--paper);
}
.ph b { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 22px; line-height: 1.1; }
.ph i { font-style: normal; font-size: 12.5px; opacity: 0.62; }
.ph-painting { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 9px #0b0b0b, inset 0 0 0 10px #4a4136; }
.ph-ai { background: radial-gradient(120% 95% at 18% 8%, rgba(252, 48, 48, 0.6), transparent 62%), #150808; }

.caption {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(74px, 11vh, 110px);
  display: grid; justify-items: center; gap: 6px;
  padding: 0 clamp(120px, 20vw, 220px);
  text-align: center;
  pointer-events: none;
}
.cap-tag { font-size: 14px; font-weight: 600; color: var(--red); }
.cap-tag[data-wing="design"] { color: var(--mute); }
.cap-tag[data-wing="painting"] { color: var(--paper); }
.cap-title {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(38px, 6.2vw, 84px); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
/* Long titles drop a size so the caption never climbs into the front card. */
.cap-title.is-long { font-size: clamp(30px, 4.3vw, 58px); line-height: 1.02; }
.cap-meta { color: var(--mute); min-height: 1.45em; }
.cap-open { pointer-events: auto; margin-top: 8px; }

.wing-note {
  position: absolute; z-index: 4; left: 50%; top: calc(var(--pad) + 74px); transform: translateX(-50%);
  width: min(460px, 86vw);
  text-align: center; font-size: 14px; color: var(--mute);
  pointer-events: none;
}
.wing-note:empty { display: none; }

/* The AI wing looks different on purpose: a faint red grid instead of a spotlight. */
body[data-wing="ai"] .stage {
  background:
    linear-gradient(rgba(252, 48, 48, 0.07) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(252, 48, 48, 0.07) 1px, transparent 1px) 0 0 / 44px 44px;
}

/* ---------- list ---------- */

#list { position: absolute; inset: 0; overflow-y: auto; padding: 132px var(--pad) 150px; }
.rows { list-style: none; padding: 0; max-width: 900px; margin: 0 auto; }
.row {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 18px;
  width: 100%; padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.row-thumb { position: relative; width: 76px; height: 58px; border-radius: 6px; overflow: hidden; background: #171717; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-thumb .ph b, .row-thumb .ph i { display: none; }
.row-thumb .ph-painting { box-shadow: inset 0 0 0 4px #0b0b0b; }
.row-title {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(26px, 4.2vw, 46px); line-height: 1.05;
  transition: transform 0.25s var(--ease);
}
.row:hover .row-title { transform: translateX(8px); }
.row-meta { font-size: 14px; color: var(--mute); text-align: right; }

/* ---------- paintings room ---------- */

#museum {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 80% at 50% 34%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(#231b15 0%, #17120e 58%, #0f0c0a 100%);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
#museum::-webkit-scrollbar { display: none; }

.wall {
  position: relative;
  display: flex; align-items: center;
  gap: clamp(90px, 15vw, 230px);
  width: max-content; height: 100%;
  padding: 0 clamp(60px, 28vw, 420px) 6vh;
}
.wall::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 15%;
  background:
    linear-gradient(rgba(255, 232, 196, 0.07), transparent 46%),
    linear-gradient(#120e0b, #050404);
  border-top: 1px solid rgba(250, 247, 240, 0.1);
}

.room-text { flex: none; width: min(360px, 70vw); position: relative; z-index: 1; }
.room-text h2 {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(40px, 6vw, 72px); line-height: 1; margin-bottom: 14px;
}
.room-text p { color: var(--mute); max-width: 34ch; }
.room-text p + p { margin-top: 10px; }

.piece { position: relative; z-index: 1; flex: none; display: flex; align-items: flex-end; gap: 22px; }
.piece::before {
  content: "";
  position: absolute; left: 50%; top: -45vh; z-index: -1;
  width: 190%; height: calc(100% + 70vh);
  transform: translateX(-50%);
  background: radial-gradient(ellipse 46% 56% at 50% 46%, rgba(255, 232, 196, 0.2), transparent 72%);
  opacity: 0.18;
  transition: opacity 0.9s;
  pointer-events: none;
}
.piece.is-lit::before { opacity: 1; }

.frame {
  display: block;
  padding: 12px;
  background: #0b0b0b;
  box-shadow: 0 0 0 1px #2c2620, 0 26px 50px -14px rgba(0, 0, 0, 0.95);
  filter: brightness(0.5);
  transition: filter 0.9s;
}
.piece.is-lit .frame { filter: brightness(1); }
.frame-canvas { position: relative; display: block; height: min(48vh, 440px); background: var(--paper); overflow: hidden; }
.frame-canvas img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frame-canvas .ph { background: var(--paper); color: var(--ink); box-shadow: none; }
button.frame { cursor: zoom-in; }

.plaque {
  width: 178px; padding: 11px 12px 12px;
  background: var(--paper); color: var(--ink);
  font-size: 12.5px; line-height: 1.4;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.8);
  opacity: 0.55; transition: opacity 0.9s;
}
.piece.is-lit .plaque { opacity: 1; }
.plaque b { display: block; font-family: var(--display); font-style: italic; font-weight: 600; font-size: 18px; line-height: 1.15; margin-bottom: 4px; }
.plaque span { display: block; }
.plaque .by-hand { margin-top: 6px; font-weight: 600; }

/* ---------- reels tile and corner ---------- */

.reels-tile {
  position: absolute; z-index: 6; left: calc(var(--pad) - 4px); bottom: calc(var(--pad) - 4px);
  width: 122px; height: 122px;
  display: grid; place-items: center;
  transition: transform 0.25s var(--ease);
}
.reels-tile:hover { transform: scale(1.05); }
.reels-tile:active { transform: scale(0.95); }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.ring text { fill: var(--paper); font-family: var(--ui); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.reels-core {
  width: 66px; height: 66px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--red) center / cover no-repeat;
  box-shadow: 0 12px 30px -10px rgba(252, 48, 48, 0.7);
}
.reels-core svg { width: 26px; height: 26px; fill: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.corner { position: absolute; z-index: 6; right: var(--pad); bottom: var(--pad); display: flex; gap: 8px; }

/* ---------- overlays ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 30;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(250, 247, 240, 0.055), transparent 70%),
    rgba(9, 8, 8, 0.975);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
  overflow-y: auto;
}
.sheet.is-on { opacity: 1; transform: none; }
.sheet-close { position: absolute; z-index: 2; top: var(--pad); right: var(--pad); }
/* A project page is long: the Close button stays in the corner while the pictures scroll. */
#detail .sheet-close, #reels .sheet-close { position: fixed; background: rgba(10, 10, 10, 0.82); }
#detail .sheet-close:hover, #reels .sheet-close:hover { background: #2a2a2a; }

/* A project page: the words stay put on the left, the pictures scroll on the right. */
.detail-grid {
  display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.5fr);
  align-items: start; gap: clamp(24px, 4.5vw, 64px);
  min-height: 100%;
  padding: 92px clamp(18px, 5vw, 72px) 60px;
}
.detail-text { position: sticky; top: 92px; display: grid; justify-items: start; gap: 12px; }
.detail-title {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(38px, 4.8vw, 72px); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
.detail-sub { color: var(--mute); max-width: 36ch; }
.detail-body { max-width: 40ch; margin: 6px 0 12px; }
.detail-media { display: grid; gap: 14px; min-width: 0; }
.detail-media img { display: block; width: 100%; height: auto; border-radius: 8px; background: #151515; }
.detail-media .ph { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; }
.detail-media.is-video { justify-items: center; }
.detail-media video {
  display: block; height: min(80vh, 760px); max-width: 100%; aspect-ratio: 9 / 16;
  border-radius: 18px; background: #000; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px #000;
}
.detail-media.is-wide video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; }

/* About */
.about-mascot { width: 96px; aspect-ratio: 128 / 120; margin-bottom: 14px; }
/* The brush handle is magnolia, which vanishes on the light drawer. */
.about-mascot .m-brush [fill="#faf7f0"] { fill: #0a0a0a; }
.about-body { margin: 18px 0 26px; display: grid; gap: 12px; font-size: 17px; line-height: 1.5; max-width: 34ch; }
.facts { display: grid; margin-top: 10px; }
.facts div { padding: 13px 0; border-top: 1px solid rgba(10, 10, 10, 0.14); }
.facts div:last-child { border-bottom: 1px solid rgba(10, 10, 10, 0.14); }
.facts dt { font-size: 13px; color: rgba(10, 10, 10, 0.58); }
.facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
/* Links to the plain pages (the ones search engines read), kept quiet under the button. */
.about-pages { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 30px; font-size: 14px; color: rgba(10, 10, 10, 0.62); }
.about-pages p { width: 100%; }
.about-pages a, .nojs a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(10, 10, 10, 0.3); text-underline-offset: 3px; }
.about-pages a:hover { text-decoration-color: var(--red); }
/* Shown only when JavaScript is off. */
.nojs { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: 14px var(--pad); background: var(--paper); color: var(--ink); font-size: 15px; }

.bar-right { display: flex; gap: 8px; }

/* In the AI wing the mascot's eyes light up. */
body[data-wing="ai"] #home .m-pupil { fill: #faf7f0; }
body[data-wing="ai"] #home .m-arc { stroke: #faf7f0; }
body[data-wing="ai"] #home .m-lens { fill-opacity: 0.08; }

.reels-wrap {
  display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 34px);
  min-height: 100%; padding: 70px 16px 60px;
}
.reel-phone {
  position: relative; flex: none;
  height: min(78vh, 720px); aspect-ratio: 9 / 16;
  border-radius: 22px; overflow: hidden;
  background: #151515;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px #000;
}
.reel-phone video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.reel-phone.is-wide { height: auto; width: min(66vw, 1040px); aspect-ratio: 16 / 9; border-radius: 16px; }
.reel-count { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 14px; color: var(--mute); }

.drawer-scrim { position: fixed; inset: 0; z-index: 34; background: rgba(10, 10, 10, 0.6); opacity: 0; transition: opacity 0.3s; }
.drawer-scrim.is-on { opacity: 1; }
.drawer {
  position: fixed; z-index: 35; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  padding: 84px 28px 28px;
  background: var(--paper); color: var(--ink);
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform 0.45s var(--ease);
}
.drawer.is-on { transform: none; }
.drawer-title { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(48px, 9vw, 68px); line-height: 0.95; }
.drawer-lead { margin: 12px 0 26px; color: rgba(10, 10, 10, 0.62); max-width: 30ch; }

.contact-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px;
  padding: 15px 0;
  border-top: 1px solid rgba(10, 10, 10, 0.14);
}
.contact-row:last-child { border-bottom: 1px solid rgba(10, 10, 10, 0.14); }
.contact-label { grid-column: 1 / -1; font-size: 13px; color: rgba(10, 10, 10, 0.58); }
.contact-value { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
a.contact-value:hover { color: var(--red-deep); }
.contact-act { font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.25); transition: transform 0.12s var(--ease), background-color 0.2s; }
.contact-act:hover { background: rgba(10, 10, 10, 0.07); }
.contact-act:active { transform: scale(0.95); }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .wings { top: calc(var(--pad) + 70px); }
  .wing-note { top: calc(var(--pad) + 128px); }
  .caption { padding: 0 18px; bottom: 150px; }
  .tilt { top: 44%; }
  .reels-tile { width: 96px; height: 96px; }
  .reels-core { width: 50px; height: 50px; border-radius: 14px; }
  .detail-grid { grid-template-columns: 1fr; padding-top: 80px; }
  .detail-text { position: static; }
  .detail-media video { height: min(68vh, 600px); }
  .bar-right .pill { padding: 11px 15px; }
  .row { grid-template-columns: 56px 1fr; }
  .row-thumb { width: 56px; height: 44px; }
  .row-meta { grid-column: 2; text-align: left; }
  .piece { flex-direction: column; align-items: flex-start; gap: 14px; }
  .frame-canvas { height: min(40vh, 340px); }
  #list { padding-top: 170px; }
  .reels-wrap { flex-wrap: wrap; }
  .reel-phone { height: min(64vh, 560px); order: -1; flex-basis: auto; }
  .reel-phone.is-wide { width: 100%; height: auto; }
  .detail-media.is-wide video { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #app { transition: none; }
  .ring, .m-ball, .bd-orbs i { animation: none; }
  .sheet, .drawer, .piece::before, .frame, .plaque { transition-duration: 0.01s; }
}
