/* =========================================================
   Motion layer: elayadesign/ai-design-skills · design-to-motion (website context)
   1. Hero: living night scene + intro choreography
   2. Graffiti: minimal sprayed tags behind the sections
   ========================================================= */
:root {
  --m-e: cubic-bezier(.16, 1, .3, 1);     /* transforms on entrance */
  --m-e2: cubic-bezier(.33, 1, .68, 1);   /* opacity and blur */
  --m-io: cubic-bezier(.65, 0, .35, 1);   /* wipes and sweeps */
}

/* ---------- 1. Hero scene ---------- */
.hero__scene { position: absolute; inset: 0 0 -10% 0; transform: translate3d(0, var(--hero-shift, 0), 0); animation: scene-push 48s var(--m-io) infinite alternate; }
.hero__scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; transform: none; animation: none; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; opacity: 0; }
@keyframes scene-push { from { scale: 1.02; } to { scale: 1.09; } }
.hero__shade { background: rgba(19,18,9,.3); }
.hero__title[data-split] { background: none; color: inherit; }

/* Intro (B2): the photo resolves from blur, copy rises in reading order, the server card lands */
.hero.has-intro .hero__scene img { opacity: 0; filter: blur(14px) saturate(.6); scale: 1.06; transition: opacity .8s var(--m-e2), filter 1.4s var(--m-e2), scale 2.2s var(--m-e); }
.hero.has-intro.is-in .hero__scene img { opacity: 1; filter: none; scale: 1; }

.hero.has-intro .hero__word { display: inline-block; opacity: 0; transform: translateY(16px); transition: opacity .8s var(--m-e2) var(--d, 0s), transform 1.05s var(--m-e) var(--d, 0s); }
.hero.has-intro.is-in .hero__word { opacity: 1; transform: none; }
/* each word carries the heading gradient across the full line */
.hero__title .hero__word { background-image: linear-gradient(90deg, #FFFFFF, #9B9B9B); -webkit-background-clip: text; background-clip: text; color: transparent; }

.has-observer .hero .reveal { filter: blur(4px); transform: translateY(10px); transition: opacity .8s var(--m-e2) var(--d, 0s), transform 1.05s var(--m-e) var(--d, 0s), filter .8s var(--m-e2) var(--d, 0s); }
.has-observer .hero .reveal.is-visible { filter: none; transform: none; }
.hero .pill.reveal { --d: .15s; }
.hero .hero__lead.reveal { --d: .75s; }
.hero .hero__actions.reveal { --d: .9s; }
.has-observer .hero .hero__servers.reveal { --d: .6s; transform: translateY(24px) scale(.985); filter: blur(6px); transition: opacity .6s var(--m-e2) var(--d), transform .9s var(--m-e) var(--d), filter .8s var(--m-e2) var(--d); }
.has-observer .hero .hero__servers.reveal.is-visible { transform: none; filter: none; }
.hero .hero-server { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--m-e2), transform 1.05s var(--m-e), background-color .3s var(--ease); }
.hero .hero__servers.is-visible .hero-server { opacity: 1; transform: none; }
.hero .hero__servers.is-visible .hero-server:nth-of-type(1) { transition-delay: .85s, .85s, 0s; }
.hero .hero__servers.is-visible .hero-server:nth-of-type(2) { transition-delay: .95s, .95s, 0s; }

/* The flare lights the glass panel too */


/* Live status: pulse ring (accent) */
[data-server-id]:not(.is-loading):not(.is-offline) .status-dot { position: relative; }
[data-server-id]:not(.is-loading):not(.is-offline) .status-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping-ring 2s var(--m-e2) infinite; }
@keyframes ping-ring { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }

.effects-paused .hero__scene { animation: none; }
.effects-paused .hero__canvas { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero__scene { animation: none; }
  .hero__canvas { display: none; }
  .hero.has-intro .hero__scene img, .hero.has-intro .hero__word, .hero .hero-server { opacity: 1; filter: none; transform: none; scale: 1; }
}

/* ---------- 2. Graffiti ---------- */
@font-face { font-family: "Dorado Wet"; font-display: swap; src: url("fonts/graffiti-wet-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F; }
@font-face { font-family: "Dorado Wet"; font-display: swap; src: url("fonts/graffiti-wet-latin.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "Dorado Spray"; font-display: swap; src: url("fonts/graffiti-spray-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F; }
@font-face { font-family: "Dorado Spray"; font-display: swap; src: url("fonts/graffiti-spray-latin.woff2") format("woff2"); unicode-range: U+0000-00FF; }

.has-graffiti { position: relative; isolation: isolate; overflow-x: clip; }
html { overflow-x: clip; }
.graffiti { position: absolute; z-index: -1; display: block; margin: 0; color: #e9e3d3; opacity: .07; font: 400 var(--gs, 96px)/1 "Dorado Wet", var(--font-body); letter-spacing: 0; white-space: nowrap; pointer-events: none; -webkit-user-select: none; user-select: none; transform: rotate(var(--gr, -4deg)); transform-origin: 0 50%; }
.graffiti--spray { font-family: "Dorado Spray", var(--font-body); opacity: .09; }
.graffiti--accent { color: var(--accent); opacity: .12; }
.graffiti svg { display: block; width: var(--gw, 220px); height: auto; overflow: visible; }
.graffiti svg path { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; filter: url(#spray-edge); }
.graffiti small { display: block; margin-top: 8px; font: 400 30px/1 "Dorado Spray", var(--font-body); }

/* Sprayed on when the section enters the viewport: a left to right wipe, slightly misty at first */
.js-graffiti .graffiti { clip-path: inset(-30% 100% -60% -6%); filter: blur(3px); transition: clip-path 1.1s var(--m-io) var(--gd, .1s), filter 1.4s var(--m-e2) var(--gd, .1s); }
.js-graffiti .graffiti.is-sprayed { clip-path: inset(-30% -6% -60% -6%); filter: none; }
.js-graffiti .graffiti svg path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--m-io) calc(var(--gd, .1s) + var(--pd, 0s)); }
.js-graffiti .graffiti.is-sprayed svg path { stroke-dashoffset: 0; }

/* Placement */
.g-about   { --gs: 96px;  --gr: -6deg; right: -3%; top: 22%; }
.g-servers { --gs: 48px;  --gr: 3deg;  left: 34%; top: 40px; }
.g-scenes  { --gs: 60px;  --gr: -3deg; right: 3%; top: 12px; }
.g-start   { --gr: -2deg; --gw: 230px; right: 4%; top: 24px; }
.g-rules   { --gs: 72px;  --gr: 4deg;  left: 32%; top: 24px; }
.g-faq     { --gr: -5deg; --gw: 190px; left: 0; bottom: 48px; }
.g-final   { --gs: 128px; --gr: -3deg; left: 50%; top: 38%; transform: translate(-50%, -50%) rotate(var(--gr)); transform-origin: 50% 50%; opacity: .045; }
.g-shop    { --gs: 72px;  --gr: -4deg; right: 2%; top: 16px; }
.page-hero .graffiti { z-index: 0; }
.g-rulebook{ --gs: 72px;  --gr: -5deg; right: 4%; bottom: 24px; opacity: .14; }

@media (max-width: 900px) {
  .g-about { --gs: 72px; right: auto; left: 0; top: auto; bottom: 30%; }
  .g-servers { left: auto; right: 0; top: 24px; --gs: 30px; }
  .g-scenes { --gs: 36px; top: 0; }
  .g-rules { --gs: 60px; }
  .g-final { --gs: 60px; }
  .g-start { --gw: 150px; top: 8px; }
  .g-start small, .g-faq small { font-size: 20px; }
  .g-faq { bottom: -24px; --gw: 130px; }
  .g-shop, .g-rulebook { --gs: 36px; }
}
@media (max-width: 700px) {
  /* on phones tags live in the gaps between sections, never behind headings */
  .g-servers, .g-scenes, .g-rules { --gs: 36px; top: auto; bottom: 12px; left: auto; right: 0; }
  .g-scenes { bottom: 0; }
  .g-start { top: auto; bottom: 0; right: 0; --gw: 120px; }
  .g-about { --gs: 48px; bottom: -8px; left: auto; right: 0; }
  .g-servers, .g-start, .g-faq { display: none; }
  .g-final { --gs: 36px; top: 20%; }
  .g-scenes { --gs: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .js-graffiti .graffiti { clip-path: none; filter: none; transition: none; }
  .js-graffiti .graffiti svg path { stroke-dashoffset: 0; transition: none; }
}

/* Copy follows the title in reading order, driven by the hero's own intro class */
.hero.has-intro :is(.pill, .hero__lead, .hero__actions).reveal { opacity: 0; transform: translateY(10px); filter: blur(4px); transition: none; }
.hero.has-intro.is-in :is(.pill, .hero__lead, .hero__actions).reveal { opacity: 1; transform: none; filter: none; transition: opacity .8s var(--m-e2) var(--d), transform 1.05s var(--m-e) var(--d), filter .8s var(--m-e2) var(--d); }
.hero.has-intro .pill.reveal { --d: .2s; }
.hero.has-intro .hero__lead.reveal { --d: .85s; }
.hero.has-intro .hero__actions.reveal { --d: 1s; }
@media (prefers-reduced-motion: reduce) { .hero.has-intro :is(.pill, .hero__lead, .hero__actions).reveal { opacity: 1; transform: none; filter: none; } }
.hero.has-intro .hero__servers.reveal { opacity: 0; transform: translateY(24px) scale(.985); filter: blur(6px); transition: none; }
.hero.has-intro.is-in .hero__servers.reveal { opacity: 1; transform: none; filter: none; transition: opacity .6s var(--m-e2) .6s, transform .9s var(--m-e) .6s, filter .8s var(--m-e2) .6s, box-shadow .3s var(--ease); }
.hero.has-intro.is-in .hero__servers .hero-server { opacity: 1; transform: none; }
.hero.has-intro.is-in .hero__servers .hero-server:nth-of-type(1) { transition-delay: .85s, .85s, 0s; }
.hero.has-intro.is-in .hero__servers .hero-server:nth-of-type(2) { transition-delay: .95s, .95s, 0s; }
@media (prefers-reduced-motion: reduce) { .hero.has-intro .hero__servers.reveal { opacity: 1; transform: none; filter: none; } }

/* Phones: the launch countdown chip sits above the quick connect dock instead of on top of it */
@media (max-width: 700px) {
  body:has(.dock.is-visible) .ln-pill { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
