/* Galus. One stylesheet, no framework. Colors and sizes are tokens on :root. */

/* Geist and Geist Mono, self-hosted (SIL Open Font License, see fonts/OFL.txt) */
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --fg: #0d0e10;
  --muted: #62666d;
  --line: #e6e7ea;
  --surface: #f5f6f7;
  --accent: #0b5fe0;
  --accent-fg: #ffffff;
  /* From the logo. --btn keeps white text at 4.5:1 or more across the whole gradient. */
  --brand-1: #19a8ff;
  --brand-2: #0b4fe0;
  --btn: linear-gradient(100deg, #0a72e6, #0a4bd6 50%, #0d66ef);
  --brand-text: linear-gradient(100deg, #0b8cf5, #0a4bd6);
  --rule: linear-gradient(90deg, var(--brand-1), var(--accent));
  /* Hexagonal dot grid: a static tile without JavaScript, drawn and animated by site.js otherwise */
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='45'%3E%3Cg fill='%230d0e10' fill-opacity='.28'%3E%3Ccircle cx='6.5' cy='11.25' r='1'/%3E%3Ccircle cx='19.5' cy='33.75' r='1'/%3E%3C/g%3E%3C/svg%3E");
  --dot: rgb(13 14 16 / .32);
  /* The same tile with solid dots, used as a mask (card spotlight) */
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='45'%3E%3Ccircle cx='6.5' cy='11.25' r='1.2'/%3E%3Ccircle cx='19.5' cy='33.75' r='1.2'/%3E%3C/svg%3E");
  --dot-lit: #0b8cf5;
  --glow-opacity: .45;
  --radius: 14px;
  --wrap: 1120px;
  --gutter: 24px;
  --font: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Motion: one curve, two speeds */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: .18s;
  --slow: .6s;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0e;
    --fg: #f1f2f4;
    --muted: #9a9ea6;
    --line: #24262b;
    --surface: #141518;
    --accent: #4b8dff;
    --accent-fg: #ffffff;
    --brand-text: linear-gradient(100deg, #5cc0ff, #4b8dff);
    --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='45'%3E%3Cg fill='%23ffffff' fill-opacity='.16'%3E%3Ccircle cx='6.5' cy='11.25' r='1'/%3E%3Ccircle cx='19.5' cy='33.75' r='1'/%3E%3C/g%3E%3C/svg%3E");
    --dot: rgb(255 255 255 / .16);
    --dot-lit: #5cc0ff;
    --glow-opacity: .35;
  }
}

/* Dragon Key Studio: always dark, with the crest's gold as accent */
.dark {
  --bg: #0b0c0e;
  --fg: #f1f2f4;
  --muted: #9a9ea6;
  --line: #24262b;
  --surface: #141518;
  --accent: #d9a845;
  --accent-fg: #15110a;
  --btn: var(--accent);
  --rule: var(--accent);
  color-scheme: dark;
  background: var(--bg);
  color: var(--fg);
}

/* Colors that card spotlights fade in and out (see Cards) */
@property --spot { syntax: "<color>"; inherits: false; initial-value: transparent; }
@property --glow { syntax: "<color>"; inherits: false; initial-value: transparent; }

/* Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.lead { color: var(--muted); font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.5; max-width: 40em; }
.nowrap { white-space: nowrap; }
.grad { background: var(--brand-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--bg); padding: 8px 12px; }

/* Links in running text: a faint rule that the full underline draws over on hover */
:is(.rows dd, .facts dd, .prose p, .legal) a:not(.btn) {
  text-decoration: none; padding-bottom: 2px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat;
  transition: background-size var(--slow) var(--ease);
}
:is(.rows dd, .facts dd, .prose p, .legal) a:not(.btn):hover { background-size: 100% 1px, 100% 1px; }

/* Arrows that nudge in the direction they point */
.go::after, .section-head a::after, .crumb a::before, .feature .arrow::after, .card h3::after, .game .meta span:last-child {
  display: inline-block; transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px;
  background: var(--btn) 0 0 / 200% 100%; color: var(--accent-fg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 1px 2px rgb(0 0 0 / .1);
  font: 500 1rem var(--font); text-decoration: none; cursor: pointer;
  transition: background-position var(--slow) var(--ease), box-shadow .3s var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { background-position: 100% 0; box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; transition: border-color var(--fast), background-color var(--fast), transform var(--fast) var(--ease); }
.btn.secondary:hover { background: var(--surface); border-color: color-mix(in srgb, var(--fg) 25%, var(--line)); }
.btn.small { height: 36px; padding: 0 14px; font-size: .9375rem; }
.btn:disabled { opacity: .5; cursor: default; }
.go::after { content: "→"; margin-left: 8px; }
.go:hover::after { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 36px; }

/* Header: transparent over the hero, solid once the page scrolls (site.js adds .top) */

.header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, border-color .3s;
  view-transition-name: header;
}
.header.top { background-color: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo img { height: 28px; width: auto; }
.nav ul { display: flex; gap: 28px; margin: 0 auto 0 0; padding: 0; list-style: none; }
.nav ul a { position: relative; display: block; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: .9375rem; transition: color var(--fast); }
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 1px;
  background: currentColor; transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav ul a:hover, .nav ul a[aria-current] { color: var(--fg); }
.nav ul a:hover::after { transform: scaleX(1); }
.nav ul a[aria-current]::after { transform: scaleX(1); background: var(--btn); }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; height: auto; gap: 0; padding-top: 12px; }
  .nav .btn { margin-left: auto; }
  .nav ul { order: 3; width: 100%; margin: 0; padding: 12px 0; gap: 0; justify-content: space-between; }
}

/* Hexagonal dot grid and brand glow. On heroes and the closing call to action.
   site.js draws the dots on canvas and dims them near text; the masks here shape the
   static fallback without JavaScript. */

.grid { --grid-top: -120px; position: relative; isolation: isolate; overflow-x: clip; }
.grid::before, .grid::after, .grid > canvas { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.grid::before { -webkit-mask: var(--grid-mask); mask: var(--grid-mask); }
.grid::before { inset: var(--grid-top) 0 0; background: var(--grid) 0 0; }
.grid > canvas { top: var(--grid-top); left: 0; width: 100%; height: calc(100% - var(--grid-top)); }
.grid.live::before { content: none; }
.grid::after {
  width: min(900px, 110vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--brand-1), color-mix(in srgb, var(--brand-2) 50%, transparent) 45%, transparent);
  opacity: var(--glow-opacity);
  transition: translate 1.2s var(--ease);
  animation: drift 28s ease-in-out infinite alternate;
}
.hero.grid { --grid-mask: linear-gradient(#000 45%, transparent 95%); }
.hero.grid::after { top: -55%; right: -20%; translate: calc(var(--mx, 0) * 60px) calc(var(--my, 0) * 40px); opacity: calc(var(--glow-opacity) * .5); }
.cta.grid { --grid-top: 0px; --grid-mask: linear-gradient(transparent 5%, #000 55%); overflow: clip; }
.cta.grid::after { left: 50%; bottom: -70%; margin-left: max(-450px, -55vw); opacity: calc(var(--glow-opacity) * .4); }
@keyframes drift { to { transform: translate(-8%, 10%) scale(1.15); } }
/* Reading pages (case studies, products): a few still dots in the corner, no glow */
.grid.still { --grid-mask: radial-gradient(ellipse 45% 110% at 88% 0, #000, transparent 75%); }
.grid.still::after { content: none; }

/* Sections */

.hero { padding: clamp(72px, 12vw, 144px) 0 clamp(48px, 7vw, 80px); }
.hero h1 { font-size: clamp(2.75rem, 8.5vw, 7rem); letter-spacing: -0.045em; line-height: .98; }
.hero .lead { margin-top: 28px; }

/* Hero titles: each line rises out of a mask, then the rest of the hero fades up */
.ln { display: block; overflow: hidden; padding: 0 .06em .22em; margin: 0 -.06em -.22em; }
.ln > span { display: block; animation: rise .9s var(--ease) both; }
.ln + .ln > span { animation-delay: .08s; }
.ln.sub { color: var(--muted); letter-spacing: -0.045em; } /* relative to its own size when fitted */
.hero :is(.lead, .actions, .rating, .facts, .intro, .rows, .form) { animation: fade-up .8s var(--ease) .3s both; }
.hero :is(.actions, .facts, .form) { animation-delay: .4s; }
.hero :is(.crumb, .crest) { animation: fade-up .6s var(--ease) both; }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

.rating { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--muted); font-size: .9375rem; text-decoration: none; transition: color var(--fast); }
.rating:hover { color: var(--fg); }
.rating span { color: #f5a524; letter-spacing: 1px; }
.rating i { display: inline-block; font-style: normal; animation: star .5s var(--ease) both; }
.rating i:nth-child(1) { animation-delay: .6s; }
.rating i:nth-child(2) { animation-delay: .67s; }
.rating i:nth-child(3) { animation-delay: .74s; }
.rating i:nth-child(4) { animation-delay: .81s; }
.rating i:nth-child(5) { animation-delay: .88s; }
@keyframes star { from { opacity: 0; transform: scale(.3) rotate(-30deg); } }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.tight { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-head a { color: var(--muted); text-decoration: none; white-space: nowrap; transition: color var(--fast); }
.section-head a::after { content: "→"; margin-left: 6px; }
.section-head a:hover { color: var(--fg); }
.section-head a:hover::after { transform: translateX(3px); }
.split { display: grid; grid-template-columns: 1fr 2fr; gap: 32px 48px; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Scroll reveals: site.js adds .reveal to content below the fold, then .in as it scrolls into view */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Cards: tinted with each client's color; a spotlight follows the pointer (site.js sets --x and --y) */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card { --tint: var(--accent); display: block; text-decoration: none; }
.card[href$="/garrio"] { --tint: #2f6bff; }
.card[href$="/lifevibe"] { --tint: #f08a24; }
.card .media, .feature {
  --fill: color-mix(in srgb, var(--tint) 7%, var(--surface));
  border: 1px solid transparent; border-radius: var(--radius);
  background:
    radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), var(--glow), transparent 70%) padding-box,
    linear-gradient(var(--fill), var(--fill)) padding-box,
    radial-gradient(240px circle at var(--x, 50%) var(--y, 50%), var(--spot), transparent 70%) border-box,
    linear-gradient(var(--line), var(--line)) border-box;
  transition: --spot .4s var(--ease), --glow .4s var(--ease);
}
.card:hover .media, .feature:hover {
  --spot: color-mix(in srgb, var(--tint) 80%, transparent);
  --glow: color-mix(in srgb, var(--tint) 16%, transparent);
}
.card .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card .media img {
  position: absolute; z-index: 1; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px);
  object-fit: contain; transition: transform .5s var(--ease);
}
.card:hover .media img { transform: translateY(-6px) scale(1.015); }
/* The spotlight also reveals the dot grid, in the card's color */
.card .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--tint); opacity: 0; transition: opacity .4s var(--ease);
  mask: var(--dots), radial-gradient(200px circle at var(--x, 50%) var(--y, 50%), #000, transparent 70%);
  mask-composite: intersect;
}
.card:hover .media::after { opacity: .6; }
.card h3 { margin-top: 20px; }
.card h3::after { content: "→"; margin-left: 8px; opacity: 0; transform: translateX(-6px); color: var(--muted); }
.card:hover h3::after { opacity: 1; transform: none; }
.card p { margin-top: 6px; color: var(--muted); }

.feature {
  --tint: var(--accent);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 12px; padding: clamp(28px, 5vw, 56px);
  text-decoration: none;
}
/* A small network grows across the card's dot grid (site.js) */
.feature > canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.feature h3 { font-size: clamp(2.75rem, 8vw, 5.5rem); letter-spacing: -0.045em; line-height: 1; }
.feature p { color: var(--muted); font-size: clamp(1.125rem, 2vw, 1.3125rem); max-width: 34em; }
.feature .arrow { margin-top: 12px; color: var(--accent); }
.feature .arrow::after { content: "→"; margin-left: 6px; }
.feature:hover .arrow::after { transform: translateX(4px); }

/* Definition rows: capabilities, process, facts. The rule above each row draws in on reveal. */

.rows { margin: 0; }
.rows > div { position: relative; display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 8px 32px; padding: 18px 0; }
.rows > div::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line);
  transform-origin: left; transition: transform 1s var(--ease); transition-delay: inherit;
}
.rows > div.reveal { transform: none; }
.rows > div.reveal:not(.in)::before { transform: scaleX(0); }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows dt { font-weight: 500; }
.rows dd { margin: 0; color: var(--muted); transition: color .3s var(--ease); }
/* Hover: a line in the brand gradient draws over the row's rule and the description darkens.
   Not on .plain lists (contact and company details). */
.rows > div::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--rule);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
@media (hover: hover) {
  .rows:not(.plain) > div:hover::after { transform: none; }
  .rows:not(.plain) > div:hover dd { color: var(--fg); }
}
.rows dd a { color: var(--fg); }
@media (max-width: 560px) { .rows > div { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px 32px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font: 400 .75rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin: 6px 0 0; }

/* Process timeline: a line draws across the steps as they reveal; vertical on small screens */

.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps::before, .steps::after { content: ""; position: absolute; top: 3px; left: 0; right: 0; height: 1px; background: var(--line); }
.steps::after { background: var(--rule); transform-origin: left; transition: transform 1.4s var(--ease); }
.steps li { position: relative; padding-top: 36px; counter-increment: step; transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--btn); box-shadow: 0 0 0 4px var(--bg); transition: transform .4s var(--ease); transition-delay: inherit; }
.steps li:nth-child(2) { transition-delay: .3s; }
.steps li:nth-child(3) { transition-delay: .6s; }
.steps li:nth-child(4) { transition-delay: .9s; }
.steps h3::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 10px; color: var(--muted); font: 400 .8125rem var(--mono); letter-spacing: .02em; }
.steps p { margin-top: 8px; color: var(--muted); }
.steps.reveal { opacity: 1; transform: none; }
.steps.reveal:not(.in)::after { transform: scaleX(0); }
.steps.reveal:not(.in) li { opacity: 0; transform: translateY(16px); }
.steps.reveal:not(.in) li::before { transform: scale(0); }
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before, .steps::after { top: 4px; bottom: 0; left: 3px; right: auto; width: 1px; height: auto; }
  .steps::after { background: linear-gradient(var(--brand-1), var(--accent)); transform-origin: top; }
  .steps.reveal:not(.in)::after { transform: scaleY(0); }
  .steps li { padding: 0 0 0 32px; }
  .steps li::before { top: 4px; }
}

/* Reading progress on case studies and product pages: a gradient line under the header */

@supports (animation-timeline: scroll()) {
  body:has(main > article) .header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--btn); transform-origin: left;
    animation: progress linear both; animation-timeline: scroll(root);
  }
}
@keyframes progress { from { transform: scaleX(0); } }

/* Page transitions: pages crossfade; a card's image and title glide into the page they open
   and back (site.js names them). Arriving this way, the hero skips its entrance. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }
.vt .hero, .vt .hero * { animation: none !important; }

/* Case studies and long text */

.case h1 { margin-top: 12px; }
.crumb a { color: var(--muted); text-decoration: none; transition: color var(--fast); }
.crumb a::before { content: "←"; margin-right: 6px; }
.crumb a:hover { color: var(--fg); }
.crumb a:hover::before { transform: translateX(-3px); }
.shot {
  display: grid; place-items: center; padding: clamp(16px, 4vw, 48px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: clip-path 1.1s var(--ease);
}
.shot img { max-height: 720px; width: auto; transition: transform 1.1s var(--ease); }
.shot.reveal { opacity: 1; transform: none; clip-path: inset(0 round var(--radius)); }
.shot.reveal:not(.in) { clip-path: inset(6% 4% round var(--radius)); }
.shot.reveal:not(.in) img { transform: scale(.94); }
.prose { padding-bottom: clamp(56px, 8vw, 96px); }
.prose > * { max-width: 46rem; }
.prose .block { margin-top: clamp(48px, 7vw, 80px); }
.prose h2 { margin-bottom: 24px; }
.prose p + p { margin-top: 16px; }
.prose p { color: var(--muted); }
.prose .rows > div { grid-template-columns: 1fr 2fr; }
.intro { margin-top: 32px; padding: 0; font-size: clamp(1.125rem, 2vw, 1.3125rem); }
.legal h2 { font-size: 1.25rem; margin: 40px 0 12px; }
.legal ul { color: var(--muted); padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal strong { color: var(--fg); font-weight: 500; }

.quote { margin: clamp(48px, 7vw, 80px) 0 0; }
.quote blockquote { margin: 0; }
.quote p { color: var(--fg); font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.35; letter-spacing: -0.015em; }
.quote figcaption { margin-top: 16px; color: var(--muted); }

/* Game cards: Steam capsules (460×215) */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; max-width: 460px; } }
.game { display: flex; flex-direction: column; text-decoration: none; }
.game .frame {
  display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.game img { width: 100%; aspect-ratio: 460 / 215; transition: transform .6s var(--ease); }
.game:hover .frame { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 12px 40px -16px color-mix(in srgb, var(--accent) 60%, transparent); }
.game:hover img { transform: scale(1.05); }
.game h3 { margin-top: 16px; transition: color var(--fast); }
.game:hover h3 { color: var(--accent); }
.game p { margin-top: 6px; color: var(--muted); }
.game .meta { display: flex; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 14px; font: 400 .8125rem var(--mono); letter-spacing: .02em; }
.game .meta span:first-child { color: var(--accent); }
.game:hover .meta span:last-child { transform: translate(2px, -2px); }

/* Team */

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.team img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.team h3 { margin-top: 16px; font-size: 1.125rem; }
.team p { color: var(--muted); }
.team .bio { margin-top: 8px; font-size: .9375rem; }
.team h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.social { display: inline-flex; padding: 4px; margin: -4px; color: var(--muted); transition: color var(--fast); }
.social:hover { color: var(--fg); }
@media (max-width: 720px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .team { grid-template-columns: 1fr; } }

/* Dragon Key Studio */

/* On the homepage: a rounded dark stage with a gold glow behind the crest. It opens to full
   width as it scrolls into view; without scroll-driven animations it stays rounded. */
.studio.dark {
  --bg: #060607;
  background:
    radial-gradient(640px circle at max(124px, 50% - 436px) 200px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
  clip-path: inset(0 max(12px, (100% - var(--wrap)) / 2) round 28px);
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .studio.dark { animation: open linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
  }
}
@keyframes open { to { clip-path: inset(0 0 round 0); } }


.studio-intro { display: grid; grid-template-columns: 200px 1fr; gap: 32px 56px; align-items: center; margin-bottom: 56px; }
.studio .lead { margin-top: 16px; }
.studio .btn { margin-top: 32px; }
.crest { width: 100%; max-width: 200px; border-radius: var(--radius); }
@media (max-width: 800px) { .studio-intro { grid-template-columns: 1fr; } .crest { max-width: 160px; } }
.studio-hero .crest { max-width: 160px; margin-bottom: 40px; }

/* Contact */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 80px; align-items: start; }
.hero .contact h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.035em; margin-bottom: 40px; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 20px; }
.form label { display: grid; gap: 8px; font-size: .9375rem; font-weight: 500; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--fg); font: 400 1rem/1.5 var(--font);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.form input:hover, .form select:hover, .form textarea:hover { border-color: color-mix(in srgb, var(--fg) 20%, var(--line)); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.form textarea { resize: vertical; }
.form .actions { margin-top: 4px; }
.form .actions a { color: var(--muted); font-size: .9375rem; }
.form .hp { position: absolute; left: -9999px; }
/* Send button: a spinner while sending, a check once sent (contact.js) */
.form button { position: relative; min-width: 96px; }
.form button.busy, .form button.done { color: transparent; opacity: 1; }
.form button.busy::after, .form button.done::after { content: ""; position: absolute; inset: 0; margin: auto; }
.form button.busy::after { width: 18px; height: 18px; border: 2px solid var(--accent-fg); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.form button.done::after { content: "✓"; display: grid; place-items: center; color: var(--accent-fg); animation: fade-up .3s var(--ease) both; }
@keyframes spin { to { transform: rotate(1turn); } }
.status { display: none; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.status:target { display: block; animation: fade-up .4s var(--ease) both; }
.status.error { border-color: #d93025; }

/* Call to action and footer */

.cta { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.cta h2 { font-size: clamp(2.5rem, 7vw, 5.5rem); letter-spacing: -0.045em; line-height: 1; text-wrap: balance; }
.cta .btn { margin-top: 36px; }
.footer { border-top: 1px solid var(--line); padding: 48px 0 64px; color: var(--muted); font-size: .9375rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer p + p { margin-top: 4px; }
.footer strong { color: var(--fg); font-weight: 500; }
.footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.footer a { text-decoration: none; transition: color var(--fast); }
.footer a:hover { color: var(--fg); }

/* Reduced motion: everything lands in its final state at once */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
