/* Dragon Magic Studio — ember & obsidian design system */

:root {
  --site-bg: #0b0908;
  --site-fg: #f4ebdf;
  --site-accent: #ff8c2b;
  --site-on-accent: #201002;
  --site-surface: #17110d;
  --site-muted: #b4a493;
  --site-border: #32261c;
  --site-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --site-radius: 14px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --gold: #e8b04b;
  --ember-soft: #ffd9a0;
  --bg-deep: #060404;
  --surface-2: #201812;
  --dur: calc(180ms * var(--site-motion, 1));
  --dur-slow: calc(650ms * var(--site-motion, 1));
  --gap: calc(24px * var(--site-space, 1));
  --nav-h: 76px;
  --site-max-width: 1600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  background: #000;
}

body {
  background: transparent;
  max-width: var(--site-max-width);
  margin-inline: auto;
  color: var(--site-fg);
  font-family: var(--site-font);
  font-size: calc(16.5px * var(--site-type, 1));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient forge glow + grain over the whole page */
body::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: var(--site-max-width);
  transform: translateX(-50%);
  z-index: -2;
  background:
    radial-gradient(52rem 30rem at 85% -6%, rgba(255, 140, 43, 0.09), transparent 65%),
    radial-gradient(40rem 26rem at -10% 42%, rgba(232, 176, 75, 0.05), transparent 60%),
    radial-gradient(46rem 30rem at 70% 108%, rgba(194, 65, 12, 0.08), transparent 65%),
    var(--site-bg);
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: var(--site-max-width);
  transform: translateX(-50%);
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--site-accent); color: var(--site-on-accent); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), #c2410c);
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--site-accent); }
html { scrollbar-color: #c2410c var(--bg-deep); scrollbar-width: thin; }

img { max-width: 100%; display: block; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: min(1160px, 92vw); margin-inline: auto; }
.container-narrow { width: min(860px, 92vw); }

.skip-link {
  position: fixed;
  top: -60px;
  left: max(16px, calc(50% - var(--site-max-width) / 2 + 16px));
  z-index: 100;
  padding: 10px 18px;
  background: var(--site-accent);
  color: var(--site-on-accent);
  border-radius: var(--site-radius);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur) ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- type ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 700; }

h2 { font-size: calc(clamp(2rem, 4.2vw, 3.1rem) * var(--site-type, 1)); letter-spacing: 0.01em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: calc(12.5px * var(--site-type, 1));
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin-bottom: calc(14px * var(--site-space, 1));
}
.eyebrow .rune { width: 15px; height: 15px; flex: none; }
.eyebrow-center { justify-content: center; }

.section-lede { color: var(--site-muted); margin-top: calc(12px * var(--site-space, 1)); font-size: calc(17.5px * var(--site-type, 1)); }

.muted-note { color: var(--site-muted); font-size: calc(14px * var(--site-type, 1)); }

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(14px * var(--site-space, 1)) calc(26px * var(--site-space, 1));
  border-radius: var(--site-radius);
  border: 1px solid transparent;
  font-family: var(--site-font);
  font-size: calc(15px * var(--site-type, 1));
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease, border-color var(--dur) ease, background-color var(--dur) ease;
}
.btn-icon { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: linear-gradient(180deg, #ffa04d, var(--site-accent) 60%, #e06a10);
  color: var(--site-on-accent);
  box-shadow: 0 0 0 1px rgba(255, 140, 43, 0.35), 0 8px 28px -10px rgba(255, 140, 43, 0.55);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform calc(600ms * var(--site-motion, 1)) ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 140, 43, 0.6), 0 14px 36px -10px rgba(255, 140, 43, 0.75); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  border-color: var(--site-border);
  color: var(--site-fg);
  background: rgba(23, 17, 13, 0.5);
}
.btn-ghost:hover { border-color: var(--site-accent); background: var(--site-surface); transform: translateY(-2px); }

.btn-sm { padding: calc(9px * var(--site-space, 1)) calc(18px * var(--site-space, 1)); font-size: calc(13.5px * var(--site-type, 1)); }
.btn-lg { padding: calc(17px * var(--site-space, 1)) calc(30px * var(--site-space, 1)); font-size: calc(16.5px * var(--site-type, 1)); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--site-radius);
  border: 1px solid var(--site-border);
  background: var(--site-surface);
  color: var(--site-muted);
  cursor: pointer;
  transition: color var(--dur) ease, border-color var(--dur) ease, transform var(--dur) ease;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--site-accent); border-color: var(--site-accent); transform: translateY(-2px); }

/* ---------- scroll progress + nav ---------- */

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 90;
  background: linear-gradient(90deg, #c2410c, var(--site-accent), var(--gold));
  box-shadow: 0 0 12px rgba(255, 140, 43, 0.8);
}

.nav {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: var(--site-max-width);
  transform: translateX(-50%);
  z-index: 80;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) ease, border-color var(--dur) ease, backdrop-filter var(--dur) ease;
}
.nav.scrolled {
  background: rgba(11, 9, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--site-border);
}
.nav-inner {
  width: min(1240px, 94vw);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--site-fg); }
.brand-mark { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 140, 43, 0.45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: calc(17px * var(--site-type, 1)); letter-spacing: 0.06em; }
.brand-sub { font-size: calc(10px * var(--site-type, 1)); letter-spacing: 0.42em; text-transform: uppercase; color: var(--site-accent); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: calc(30px * var(--site-space, 1)); }
.nav-links > a:not(.btn) {
  position: relative;
  color: var(--site-muted);
  text-decoration: none;
  font-size: calc(14.5px * var(--site-type, 1));
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 2px;
  transition: color var(--dur) ease;
}
.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--site-accent), var(--gold));
  transition: right var(--dur) ease;
}
.nav-links > a:not(.btn):hover, .nav-links > a:not(.btn).active { color: var(--site-fg); }
.nav-links > a:not(.btn):hover::after, .nav-links > a:not(.btn).active::after { right: 0; }
.nav-cta { margin-left: calc(6px * var(--site-space, 1)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) * 0.7);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--site-fg); border-radius: 2px; transition: transform var(--dur) ease, opacity var(--dur) ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 calc(90px * var(--site-space, 1));
}
.hero-media { position: absolute; inset: -6% 0; z-index: 0; will-change: transform; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}
.hero-dragon {
  position: absolute;
  inset: -3%;
  will-change: transform;
  animation: dragon-body calc(12s * var(--site-motion, 1)) linear infinite paused;
}
@keyframes dragon-body {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  25% { transform: translate3d(0.5%, -0.8%, 0) scale(1.02) rotate(0.5deg); }
  50% { transform: translate3d(0, 0.4%, 0) scale(1.05) rotate(0deg); }
  75% { transform: translate3d(-0.5%, -0.3%, 0) scale(1.02) rotate(-0.5deg); }
}
.hero-fx { position: absolute; pointer-events: none; mix-blend-mode: screen; }
.fx-glow {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, 0.95) 0%, rgba(255, 170, 60, 0.6) 35%, rgba(255, 110, 20, 0.25) 60%, transparent 75%);
  filter: blur(1.5px);
  animation: fx-pulse calc(3.2s * var(--site-motion, 1)) ease-in-out infinite;
}
.fx-eye { width: 2%; aspect-ratio: 1; }
.fx-eye-l { left: 68.95%; top: 19.45%; }
.fx-eye-r { left: 72.45%; top: 19.25%; }
.fx-neck {
  left: 66.8%; top: 30%; width: 3.4%; height: 15%;
  background: radial-gradient(ellipse at center, rgba(255, 200, 120, 0.75) 0%, rgba(255, 140, 43, 0.4) 45%, transparent 75%);
  animation: fx-breathe calc(4.6s * var(--site-motion, 1)) ease-in-out infinite;
}
.fx-chest {
  background: radial-gradient(ellipse at center, rgba(255, 190, 110, 0.7) 0%, rgba(255, 130, 40, 0.35) 45%, transparent 75%);
  animation: fx-breathe calc(5.4s * var(--site-motion, 1)) ease-in-out infinite;
}
.fx-chest-a { left: 66.9%; top: 42%; width: 4.2%; height: 13%; }
.fx-chest-b { left: 68.6%; top: 50.5%; width: 4.6%; height: 11%; animation-delay: calc(-2.2s * var(--site-motion, 1)); }
@keyframes fx-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes fx-breathe {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.08); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 9, 8, 0.94) 0%, rgba(11, 9, 8, 0.72) 34%, rgba(11, 9, 8, 0.18) 68%, rgba(11, 9, 8, 0.05) 100%),
    linear-gradient(0deg, var(--site-bg) 2%, rgba(11, 9, 8, 0.25) 30%, transparent 60%),
    linear-gradient(180deg, rgba(6, 4, 4, 0.75) 0%, transparent 26%);
}
.hero-embers { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

.hero-content { position: relative; z-index: 3; }

.hero-eyebrow { animation: rise calc(800ms * var(--site-motion, 1)) cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(100ms * var(--site-motion, 1)); }

.hero-title {
  font-size: calc(clamp(2.9rem, 7.4vw, 6.2rem) * var(--site-type, 1));
  font-weight: 900;
  letter-spacing: 0.015em;
  text-transform: none;
  margin-bottom: calc(22px * var(--site-space, 1));
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.65);
}
.hero-title .line { display: block; animation: rise calc(900ms * var(--site-motion, 1)) cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-title .line:nth-child(1) { animation-delay: calc(220ms * var(--site-motion, 1)); }
.hero-title .line-sub {
  animation-delay: calc(340ms * var(--site-motion, 1));
  font-size: 0.42em;
  font-weight: 700;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin-top: calc(8px * var(--site-space, 1));
}
.hero-title em { font-style: normal; color: inherit; }

.hero-lede {
  max-width: 34rem;
  font-size: calc(18.5px * var(--site-type, 1));
  color: #d9cdc0;
  margin-bottom: calc(34px * var(--site-space, 1));
  animation: rise calc(900ms * var(--site-motion, 1)) cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(460ms * var(--site-motion, 1));
}
.hero-actions { display: flex; flex-wrap: wrap; gap: calc(16px * var(--site-space, 1)); animation: rise calc(900ms * var(--site-motion, 1)) cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(580ms * var(--site-motion, 1)); }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--site-muted);
  text-decoration: none;
  font-size: calc(11px * var(--site-type, 1));
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color var(--dur) ease;
}
.scroll-cue:hover { color: var(--site-accent); }
.cue-line { position: relative; width: 1px; height: 44px; background: var(--site-border); overflow: hidden; }
.cue-line::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--site-accent));
  animation: cue-drop calc(2s * var(--site-motion, 1)) ease-in-out infinite;
}
@keyframes cue-drop {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}

/* ---------- sections ---------- */

.section { position: relative; padding: calc(104px * var(--site-space, 1)) 0; }
.section-head { margin-bottom: calc(52px * var(--site-space, 1)); }

.section-games { background: linear-gradient(180deg, transparent, rgba(23, 17, 13, 0.55) 18%, rgba(23, 17, 13, 0.55) 82%, transparent); }
.section-studio { border-top: 1px solid var(--site-border); border-bottom: 1px solid var(--site-border); background: radial-gradient(60rem 30rem at 110% 20%, rgba(255, 140, 43, 0.06), transparent 60%); }
.section-contact { background: radial-gradient(46rem 26rem at 50% 0%, rgba(255, 140, 43, 0.09), transparent 70%); }

/* reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) ease, transform var(--dur-slow) cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ---------- games ---------- */

.games-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(24px * var(--site-space, 1));
}

.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) * 1.4);
  background: var(--site-surface);
  overflow: hidden;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 140, 43, 0.45);
  border-color: color-mix(in srgb, var(--game-accent, #ff8c2b) 55%, transparent);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.95), 0 0 34px -12px color-mix(in srgb, var(--game-accent, #ff8c2b) 45%, transparent);
}
.game-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-deep); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform calc(900ms * var(--site-motion, 1)) ease; }
.game-card:hover .game-cover img { transform: scale(1.05); }
.game-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 4, 4, 0.55), transparent 45%); pointer-events: none; }
.game-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(6, 4, 4, 0.78);
  border: 1px solid currentColor;
  backdrop-filter: blur(6px);
  font-size: calc(11px * var(--site-type, 1));
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tone-amber { color: var(--ember-soft); }
.tone-blue { color: #7dd6ff; }
.tone-green { color: #b8ef62; }
.tone-mute { color: var(--site-muted); }
.game-body { display: flex; flex-direction: column; gap: calc(10px * var(--site-space, 1)); flex: 1; padding: calc(22px * var(--site-space, 1)); }
.game-name { font-family: var(--font-display); font-weight: 700; font-size: calc(22px * var(--site-type, 1)); letter-spacing: 0.02em; }
.game-tagline { color: #d9cdc0; font-size: calc(14.5px * var(--site-type, 1)); }
.game-platforms { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.game-platforms li {
  padding: 3px 10px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  color: var(--site-muted);
  font-size: calc(10.5px * var(--site-type, 1));
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.game-notes { margin-bottom: 0; }
.game-notes .chip { padding: 5px 12px; font-size: calc(11.5px * var(--site-type, 1)); }
.game-foot {
  margin-top: auto;
  padding-top: calc(14px * var(--site-space, 1));
  border-top: 1px solid var(--site-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.game-count { color: var(--site-muted); font-size: calc(12.5px * var(--site-type, 1)); letter-spacing: 0.06em; }
.game-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--game-accent, var(--site-accent));
  font: 600 calc(13px * var(--site-type, 1)) var(--site-font);
  letter-spacing: 0.08em;
}
.game-link svg { width: 16px; height: 16px; transition: transform var(--dur) ease; }
.game-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.game-link:hover svg { transform: translateX(4px); }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-bottom: calc(24px * var(--site-space, 1)); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: var(--site-surface);
  color: var(--site-muted);
  font-size: calc(12.5px * var(--site-type, 1));
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---------- studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: calc(60px * var(--site-space, 1));
  align-items: center;
}
.studio-copy h2 { margin-bottom: calc(20px * var(--site-space, 1)); }
.studio-copy > p { color: #d9cdc0; margin-bottom: calc(14px * var(--site-space, 1)); max-width: 36rem; }

.principles { list-style: none; margin-top: calc(34px * var(--site-space, 1)); }
.principles li {
  display: flex;
  gap: calc(20px * var(--site-space, 1));
  padding: calc(20px * var(--site-space, 1)) 0;
  border-top: 1px solid var(--site-border);
}
.principles li:last-child { border-bottom: 1px solid var(--site-border); }
.principle-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(20px * var(--site-type, 1));
  color: var(--gold);
  line-height: 1.4;
  flex: none;
}
.principles h4 { font-size: calc(17.5px * var(--site-type, 1)); letter-spacing: 0.03em; margin-bottom: 4px; }
.principles p { color: var(--site-muted); font-size: calc(15px * var(--site-type, 1)); }

.studio-emblem { display: grid; place-items: center; }
.studio-seal {
  width: min(420px, 100%);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 34px rgba(255, 140, 43, 0.35));
}

/* ---------- devlog ---------- */

.feed {
  margin-top: calc(76px * var(--site-space, 1));
  padding-top: calc(48px * var(--site-space, 1));
  border-top: 1px solid var(--site-border);
}
.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: calc(20px * var(--site-space, 1));
}
.feed-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(clamp(1.3rem, 2.2vw, 1.7rem) * var(--site-type, 1));
  letter-spacing: 0.02em;
}
.feed-head .rune { width: 18px; height: 18px; color: var(--site-accent); }
.feed-count { color: var(--site-muted); font-size: calc(13px * var(--site-type, 1)); letter-spacing: 0.06em; }
.feed-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: calc(24px * var(--site-space, 1)); }
.feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: var(--site-surface);
  color: var(--site-muted);
  font: 500 calc(12.5px * var(--site-type, 1)) var(--site-font);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color var(--dur) ease, color var(--dur) ease, background var(--dur) ease, transform var(--dur) ease;
}
.feed-chip:hover { transform: translateY(-1px); color: #d9cdc0; border-color: color-mix(in srgb, var(--chip-accent, #ff8c2b) 45%, transparent); }
.feed-chip.is-active {
  color: var(--chip-accent, var(--site-accent));
  border-color: color-mix(in srgb, var(--chip-accent, #ff8c2b) 65%, transparent);
  background: color-mix(in srgb, var(--chip-accent, #ff8c2b) 12%, var(--site-surface));
}
.chip-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--chip-accent, var(--site-accent)); box-shadow: 0 0 8px color-mix(in srgb, var(--chip-accent, #ff8c2b) 70%, transparent); }
.chip-count { font-size: calc(11px * var(--site-type, 1)); opacity: 0.75; }
.entry-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--entry-accent, var(--site-accent));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: calc(10.5px * var(--site-type, 1));
}
.source-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.feed-empty {
  padding: calc(28px * var(--site-space, 1));
  border: 1px dashed var(--site-border);
  border-radius: var(--site-radius);
  color: var(--site-muted);
  font-size: calc(14.5px * var(--site-type, 1));
  text-align: center;
}

.entries { display: flex; flex-direction: column; gap: calc(16px * var(--site-space, 1)); }

.entry {
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  overflow: hidden;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) ease;
}
.entry:hover { border-color: rgba(255, 140, 43, 0.4); border-color: color-mix(in srgb, var(--entry-accent, #ff8c2b) 45%, transparent); transform: translateY(-2px); box-shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.9); }
.entry.is-open { border-color: rgba(255, 140, 43, 0.5); border-color: color-mix(in srgb, var(--entry-accent, #ff8c2b) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--entry-accent, #ff8c2b) 15%, transparent), 0 20px 50px -28px color-mix(in srgb, var(--entry-accent, #ff8c2b) 25%, transparent); }

.entry-heading { font-family: var(--site-font); font-weight: 400; }
.entry-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: calc(20px * var(--site-space, 1));
  width: 100%;
  padding: calc(22px * var(--site-space, 1)) calc(24px * var(--site-space, 1));
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.entry-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(22px * var(--site-type, 1));
  color: var(--entry-accent, var(--site-border));
  transition: color var(--dur) ease;
}
.entry-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; row-gap: 6px; font-size: calc(12px * var(--site-type, 1)); color: var(--site-muted); letter-spacing: 0.08em; }
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(232, 176, 75, 0.4);
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: calc(10.5px * var(--site-type, 1));
}
.entry-title { font-family: var(--font-display); font-weight: 700; font-size: calc(20px * var(--site-type, 1)); letter-spacing: 0.02em; }
.entry-excerpt { color: var(--site-muted); font-size: calc(14.5px * var(--site-type, 1)); }
.entry-chevron { width: 20px; height: 20px; color: var(--site-muted); transition: transform var(--dur) ease, color var(--dur) ease; }
.entry.is-open .entry-chevron { transform: rotate(180deg); color: var(--entry-accent, var(--site-accent)); }

.entry-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows calc(420ms * var(--site-motion, 1)) cubic-bezier(0.2, 0.7, 0.2, 1);
}
.entry.is-open .entry-panel { grid-template-rows: 1fr; }
.entry-body { overflow: hidden; }
.entry-body p {
  padding: 0 calc(24px * var(--site-space, 1)) calc(16px * var(--site-space, 1)) calc(66px * var(--site-space, 1));
  color: #d9cdc0;
  font-size: calc(15.5px * var(--site-type, 1));
}
.entry-body p:first-child { padding-top: calc(4px * var(--site-space, 1)); border-top: 1px solid var(--site-border); margin: 0 calc(24px * var(--site-space, 1)); padding-left: calc(42px * var(--site-space, 1)); padding-right: 0; }
.entry-body p:last-child { padding-bottom: calc(24px * var(--site-space, 1)); }

/* ---------- contact ---------- */

.contact-inner { text-align: center; }
.contact-seal {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto calc(20px * var(--site-space, 1));
  filter: drop-shadow(0 0 22px rgba(255, 140, 43, 0.4));
  animation: seal-breathe calc(4.5s * var(--site-motion, 1)) ease-in-out infinite;
}
@keyframes seal-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.contact-inner h2 { margin-bottom: calc(12px * var(--site-space, 1)); }
.contact-inner .section-lede { margin-inline: auto; max-width: 34rem; }

.email-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(12px * var(--site-space, 1));
  flex-wrap: wrap;
  margin-top: calc(34px * var(--site-space, 1));
}
.copy-feedback { min-height: 1.4em; margin-top: 10px; color: var(--gold); font-size: calc(13.5px * var(--site-type, 1)); }

#copyEmail .icon-check { display: none; }
#copyEmail.copied { color: var(--gold); border-color: var(--gold); }
#copyEmail.copied .icon-copy { display: none; }
#copyEmail.copied .icon-check { display: block; }

.socials {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(16px * var(--site-space, 1));
  margin: calc(40px * var(--site-space, 1)) auto calc(18px * var(--site-space, 1));
  max-width: 620px;
}
.social-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: calc(24px * var(--site-space, 1)) 16px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  transition: border-color var(--dur) ease, transform var(--dur) ease;
}
.social-tile.online:hover { border-color: rgba(255, 140, 43, 0.4); transform: translateY(-3px); }
.social-icon { width: 24px; height: 24px; color: var(--site-fg); }
.social-tile:not(.online) .social-icon { color: var(--site-muted); }
.social-name { font-weight: 600; font-size: calc(14.5px * var(--site-type, 1)); }
.social-status {
  font-size: calc(10.5px * var(--site-type, 1));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-muted);
  border: 1px solid var(--site-border);
  border-radius: 999px;
  padding: 3px 10px;
}
.social-tile.online { border-color: rgba(255, 140, 43, 0.45); }
.social-tile.online .social-icon { color: var(--site-accent); }
.social-tile.online .social-status { color: var(--site-accent); border-color: rgba(255, 140, 43, 0.45); }
.social-link { position: absolute; inset: 0; border-radius: inherit; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--site-border); padding: calc(30px * var(--site-space, 1)) 0; background: var(--bg-deep); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; }
.brand-footer .brand-mark { width: 28px; height: 28px; }
.brand-footer .brand-name { font-size: calc(15px * var(--site-type, 1)); }
.footer-note { color: var(--site-muted); font-size: calc(13px * var(--site-type, 1)); }
.to-top { width: 44px; height: 44px; }

/* ---------- animated graphics ---------- */

/* forge dividers with a traveling ember spark */
.forge-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, 92vw);
  height: 9px;
  background: linear-gradient(90deg, transparent, var(--site-border) 20%, var(--site-border) 80%, transparent) center / 100% 1px no-repeat;
  overflow: hidden;
  pointer-events: none;
}
.forge-spark {
  position: absolute;
  top: 2px;
  left: -6%;
  width: 90px;
  height: 5px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 200, 120, 0.95), rgba(255, 140, 43, 0.5) 45%, transparent 75%);
  filter: blur(0.5px);
  animation: spark-travel calc(7s * var(--site-motion, 1)) linear infinite;
}
.section-contact .forge-spark { animation-delay: calc(-4.6s * var(--site-motion, 1)); }
@keyframes spark-travel {
  0% { left: -6%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}

/* breathing ember glow on the open devlog entry */
.entry.is-open { animation: entry-glow calc(4.5s * var(--site-motion, 1)) ease-in-out infinite; }
@keyframes entry-glow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--entry-accent, #ff8c2b) 15%, transparent), 0 20px 50px -28px color-mix(in srgb, var(--entry-accent, #ff8c2b) 25%, transparent); }
  50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--entry-accent, #ff8c2b) 30%, transparent), 0 20px 60px -24px color-mix(in srgb, var(--entry-accent, #ff8c2b) 45%, transparent), inset 0 1px 0 rgba(180, 200, 255, 0.12); }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .studio-grid { grid-template-columns: 1fr; gap: calc(40px * var(--site-space, 1)); }
  .studio-emblem { order: -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 4vw 22px;
    background: rgba(11, 9, 8, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--site-border);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity var(--dur) ease, transform var(--dur) ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links > a:not(.btn) { padding: 14px 6px; font-size: calc(16px * var(--site-type, 1)); border-bottom: 1px solid var(--site-border); }
  .nav-links > a:not(.btn)::after { display: none; }
  .nav-cta { margin: 16px 0 0; }
}

@media (max-width: 620px) {
  .section { padding: calc(72px * var(--site-space, 1)) 0; }
  .hero { padding-bottom: calc(110px * var(--site-space, 1)); }
  .hero-media img { object-position: 62% center; }
  .contact-seal { width: 72px; height: 72px; }
  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(11, 9, 8, 0.88), rgba(11, 9, 8, 0.55)),
      linear-gradient(0deg, var(--site-bg) 2%, rgba(11, 9, 8, 0.35) 34%, transparent 65%),
      linear-gradient(180deg, rgba(6, 4, 4, 0.8) 0%, transparent 30%);
  }
  .socials { grid-template-columns: 1fr; max-width: 340px; }
  .social-tile { flex-direction: row; justify-content: flex-start; padding: 16px 18px; }
  .social-tile .social-status { margin-left: auto; }
  .entry-toggle { grid-template-columns: 1fr auto; padding: calc(18px * var(--site-space, 1)); }
  .entry-index { display: none; }
  .entry-body p { padding-left: calc(18px * var(--site-space, 1)); padding-right: calc(18px * var(--site-space, 1)); }
  .entry-body p:first-child { margin: 0 calc(18px * var(--site-space, 1)); padding-left: 0; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-embers { display: none; }
  .forge-spark { display: none; }
}