/* ==========================================================================
   Nandola Studio — stylesheet
   Palette from the logo: cream #FFF1D9, red #9A0F06, deep red #6B0B04.
   Display type: Conthrax (self-hosted). Body: system sans.
   ========================================================================== */

@font-face {
  font-family: "Conthrax";
  src: url("/assets/fonts/Conthrax-SemiBold.woff2") format("woff2"),
       url("/assets/fonts/Conthrax-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0f12;
  --bg-2: #14161a;
  --bg-3: #1b1e24;
  --line: rgba(255, 241, 217, 0.09);
  --line-strong: rgba(255, 241, 217, 0.2);
  --cream: #fff1d9;
  --cream-70: rgba(255, 241, 217, 0.72);
  --cream-50: rgba(255, 241, 217, 0.5);
  /* brand red: logo, primary button, small marks only */
  --red: #9a0f06;
  --red-bright: #b8140a;
  --red-deep: #6b0b04;
  /* playful accents (Spark-style neon mint as the main highlight) */
  --mint: #2ee6a6;
  --mint-soft: rgba(46, 230, 166, 0.16);
  --amber: #ffb454;
  --sky: #6ea8ff;
  --violet: #c084fc;
  --font-display: "Conthrax", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.15rem; line-height: 1.25; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--cream-70); max-width: 34ch; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--red); color: var(--cream);
  padding: 8px 14px; z-index: 100; border-radius: var(--radius);
}
.skip:focus { left: 8px; }
::selection { background: var(--mint); color: var(--bg); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* ---------- Custom cursor (user-requested): small square dot + large transparent square ring ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button, body.has-cursor label, body.has-cursor summary,
  body.has-cursor input, body.has-cursor select, body.has-cursor textarea { cursor: none; }
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
  .cursor__dot, .cursor__ring {
    position: absolute; top: 0; left: 0; will-change: transform;
    transform: translate(-100px, -100px);
  }
  .cursor__dot {
    width: 6px; height: 6px; background: var(--cream);
    margin: -3px 0 0 -3px;
  }
  .cursor__ring {
    width: 26px; height: 26px; margin: -13px 0 0 -13px;
    border: 1.5px solid var(--cream); background: transparent; opacity: 0.8;
    transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease),
                background-color 0.25s var(--ease), border-color 0.25s var(--ease), opacity 0.2s;
  }
  body.cursor-hover .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    background: var(--mint-soft); border-color: var(--mint);
  }
  body.cursor-hover .cursor__dot { background: var(--mint); }
  body.cursor-down .cursor__ring { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
  body.cursor-text .cursor__ring { width: 3px; height: 22px; margin: -11px 0 0 -1.5px; border-width: 0; background: var(--cream); }
  body.cursor-text .cursor__dot { opacity: 0; }
  body.cursor-out .cursor__dot, body.cursor-out .cursor__ring { opacity: 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; transition: transform 0.4s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__word { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.08em; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { color: var(--cream-70); font-size: 0.95rem; position: relative; padding: 4px 0; transition: color 0.2s; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--mint); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn {
  display: none; width: 44px; height: 44px; background: none; border: 0; padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 7px;
}
.menu-btn span { display: block; height: 2px; background: var(--cream); transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.mobile-nav { display: none; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav {
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px var(--gutter) 24px; border-top: 1px solid var(--line);
    background: var(--bg);
  }
  .mobile-nav a:not(.btn) { padding: 14px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .mobile-nav .btn { margin-top: 12px; align-self: flex-start; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  border: 1.5px solid transparent; line-height: 1; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--red); color: var(--cream); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; background: var(--red-bright);
  transform: translateY(101%); transition: transform 0.35s var(--ease); z-index: -1;
}
.btn--primary:hover::before { transform: translateY(0); }
.btn--ghost { border-color: var(--line-strong); color: var(--cream); background: transparent; }
.btn--ghost:hover { border-color: var(--cream); background: rgba(255, 241, 217, 0.06); }
.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn--lg { padding: 18px 34px; font-size: 1.02rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn-row--center { justify-content: center; }

/* ---------- Sections ---------- */
section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--cream-70); font-size: 1.1rem; }
.section-foot { margin-top: 48px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 50% at 78% 45%, rgba(46, 230, 166, 0.14), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(110, 168, 255, 0.14), transparent 70%),
    radial-gradient(30% 30% at 30% 10%, rgba(255, 180, 84, 0.08), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.3rem); margin-bottom: 0.4em; }
.hero__art { position: relative; }
.hero__frame {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 40px 80px -30px rgba(46, 230, 166, 0.25);
}
.hero__mark {
  position: absolute; width: clamp(64px, 7vw, 96px); left: -5%; bottom: -6%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
  will-change: transform;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__mark { display: none; }
}

/* ---------- Stats ---------- */
.stats { padding-block: 0; }
.stats__row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 32px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--cream); }
.stat__label { color: var(--cream-50); font-size: 0.92rem; }
@media (max-width: 760px) {
  .stats__row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Work cards (featured + projects) ---------- */
.featured__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work--lg { grid-column: 1 / -1; }
.work {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.work img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.7s var(--ease), filter 0.5s; }
.work--lg img { aspect-ratio: 21 / 9; }
.work:hover { border-color: var(--line-strong); }
.work:hover img { transform: scale(1.04); }
.work__meta { padding: 22px 24px 26px; }
.work__type { display: inline-block; font-size: 0.76rem; font-weight: 700; margin-bottom: 10px; padding: 4px 9px; letter-spacing: 0.04em; color: var(--bg); background: var(--mint); }
.work[data-type="Survival"] .work__type, .work__type--survival { background: var(--amber); }
.work[data-type="Add-On"] .work__type, .work__type--add-on { background: var(--sky); }
.work[data-type="Horror"] .work__type, .work__type--horror { background: var(--violet); }
.work[data-type="Roleplay"] .work__type, .work__type--roleplay { background: var(--cream); }
.work__meta h3 { font-size: 1.3rem; margin-bottom: 8px; }
.work__meta p { color: var(--cream-70); margin: 0; font-size: 0.98rem; max-width: 60ch; }
.work--lg .work__meta {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 70%, transparent) 60%, transparent);
  padding-top: 80px;
}
.work--lg .work__meta h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.work__link { display: inline-block; margin-top: 14px; color: var(--cream); font-weight: 600; font-size: 0.9rem; border-bottom: 1.5px solid var(--mint); }
@media (max-width: 700px) {
  .featured__grid { grid-template-columns: 1fr; }
  .work--lg img { aspect-ratio: 3 / 2; }
  .work--lg .work__meta { position: static; padding-top: 22px; background: none; }
}

/* ---------- Services ---------- */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }
.services__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-left: 1px solid var(--line); }
.service { padding: 28px 28px 28px 28px; border-right: 1px solid var(--line); position: relative; transition: background-color 0.3s; }
.service:hover { background: var(--mint-soft); }
.service__n { font-family: var(--font-display); color: var(--mint); font-size: 0.9rem; display: block; margin-bottom: 40px; }
.service h3 { font-size: 1.2rem; }
.service p { color: var(--cream-70); font-size: 0.96rem; margin: 0; }
@media (max-width: 900px) { .services__list { grid-template-columns: 1fr 1fr; } .service { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .services__list { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); }
.process__intro p { color: var(--cream-70); font-size: 1.1rem; }
.process__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.process__steps li {
  counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.process__steps li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font-display);
  color: var(--amber); font-size: 1.1rem; padding-top: 3px; grid-row: 1 / span 2;
}
.process__steps li:last-child { border-bottom: 1px solid var(--line); }
.process__steps h3 { margin-bottom: 6px; grid-column: 2; }
.process__steps p { grid-column: 2; }
.process__steps p { color: var(--cream-70); margin: 0; }
@media (max-width: 800px) { .process__grid { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { padding-block: clamp(48px, 7vw, 96px); }
.cta__box {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  background:
    radial-gradient(50% 60% at 15% 20%, rgba(46, 230, 166, 0.28), transparent 70%),
    radial-gradient(45% 60% at 85% 80%, rgba(110, 168, 255, 0.26), transparent 70%),
    radial-gradient(30% 40% at 70% 10%, rgba(192, 132, 252, 0.18), transparent 70%),
    var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.cta__box::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 241, 217, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 241, 217, 0.06) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.cta__mark { margin: 0 auto 20px; width: 72px; height: 72px; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.cta p { color: var(--cream-70); max-width: 48ch; margin-inline: auto; font-size: 1.1rem; }
.cta .btn-row { justify-content: center; margin-top: 28px; }
.cta .btn--primary { background: var(--mint); color: var(--bg); }
.cta .btn--primary::before { background: #5cf2c0; }
.cta .btn--ghost { border-color: rgba(255, 241, 217, 0.5); }
.cta .btn--ghost:hover { border-color: var(--cream); background: rgba(255, 241, 217, 0.12); }

/* ---------- Page head ---------- */
.page-head { padding-block: clamp(56px, 8vw, 110px) clamp(24px, 4vw, 48px); }
.page-head--center { text-align: center; padding-block: clamp(80px, 12vw, 160px); }
.page-head--center .lead { margin-inline: auto; }
.big-code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 10rem); color: var(--mint); line-height: 1; margin: 0; }

/* ---------- Projects page ---------- */
.projects { padding-top: 0; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter__btn {
  background: transparent; color: var(--cream-70); border: 1px solid var(--line-strong);
  padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 0.9rem; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter__btn:hover { color: var(--cream); border-color: var(--cream); }
.filter__btn.is-active { background: var(--mint); color: var(--bg); border-color: var(--mint); }
.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work.is-hidden { display: none; }
@media (max-width: 960px) { .projects__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .projects__grid { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-story { padding-top: 0; }
.about-story__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-story__img img { border-radius: var(--radius); border: 1px solid var(--line); }
.about-story__text p { color: var(--cream-70); }
.values { background: var(--bg-2); border-block: 1px solid var(--line); }
.values__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.value { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.value--accent { background: linear-gradient(160deg, rgba(46, 230, 166, 0.22), rgba(110, 168, 255, 0.18)), var(--bg-3); border-color: rgba(46, 230, 166, 0.35); }
.value p { color: var(--cream-70); margin: 0; }
.value--accent p { color: var(--cream-70); }
.faq__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.faq__intro p { color: var(--cream-70); }
.faq__intro a { border-bottom: 1.5px solid var(--mint); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer; padding: 22px 40px 22px 0; font-family: var(--font-display); font-size: 1.05rem;
  list-style: none; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--mint); font-size: 1.6rem; font-family: var(--font-body); transition: transform 0.3s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { color: var(--cream-70); padding-bottom: 22px; margin: 0; max-width: 60ch; }
@media (max-width: 800px) {
  .about-story__grid, .faq__grid { grid-template-columns: 1fr; }
  .values__grid { grid-template-columns: 1fr; }
}

/* ---------- Careers ---------- */
.roles { padding-top: 0; }
.roles__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.role {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  transition: border-color 0.3s, transform 0.4s var(--ease), background-color 0.3s;
}
.role:hover { border-color: var(--mint); transform: translateY(-4px); background: var(--bg-3); }
.role__head { display: flex; flex-direction: column; gap: 6px; }
.role__type { font-size: 0.82rem; color: var(--amber); font-weight: 600; }
.role p { color: var(--cream-70); margin: 0; flex: 1; font-size: 0.97rem; }
.role__cta { font-weight: 600; font-size: 0.9rem; border-bottom: 1.5px solid var(--mint); align-self: flex-start; }
.perks { background: var(--bg-2); border-block: 1px solid var(--line); }
.perks__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.perks__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.perks__list li { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--cream-70); }
@media (max-width: 960px) { .roles__list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .perks__grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .roles__list, .perks__list { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-section { padding-top: 0; }
.form-section__grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.form-aside { position: sticky; top: 96px; }
.form-aside h2 { font-size: 1.4rem; }
.form-aside p { color: var(--cream-70); }
.form-aside a { border-bottom: 1.5px solid var(--mint); }
.contact-list { margin: 0 0 24px; }
.contact-list dt { font-size: 0.82rem; color: var(--cream-50); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 16px; }
.contact-list dd { margin: 4px 0 0; }
.form { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 4vw, 40px); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.opt { color: var(--cream-50); font-weight: 400; font-size: 0.85rem; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--cream); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 13px 14px; font: inherit; font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 241, 217, 0.35); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft);
}
.field [aria-invalid="true"], .field[aria-invalid="true"] input { border-color: #e0463e; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--cream-70) 50%), linear-gradient(135deg, var(--cream-70) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--bg-2); }
.field textarea { resize: vertical; min-height: 140px; }
.field input[type="file"] { padding: 10px; font-size: 0.92rem; }
.field input[type="file"]::file-selector-button {
  background: var(--bg-3); color: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 8px 14px; margin-right: 12px; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.field__help { color: var(--cream-50); font-size: 0.85rem; margin: 0; }
.field__error { color: #ff8a83; font-size: 0.88rem; margin: 0; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.9rem; color: var(--cream-70); transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip input:checked + span { background: var(--mint); color: var(--bg); border-color: var(--mint); }
.chip input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; font-size: 0.92rem !important; color: var(--cream-70); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--mint); flex: none; }
.check a { color: var(--cream); border-bottom: 1.5px solid var(--mint); }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.alert { padding: 16px 18px; border-radius: var(--radius); font-weight: 600; border: 1px solid; }
.alert--success { background: rgba(46, 125, 50, 0.15); border-color: rgba(76, 175, 80, 0.5); color: #b9f0bc; }
.alert--error { background: rgba(154, 15, 6, 0.2); border-color: var(--red-bright); color: #ffc9c5; }
.form .btn { align-self: flex-start; }
@media (max-width: 860px) {
  .form-section__grid { grid-template-columns: 1fr; }
  .form-aside { position: static; }
}
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Legal ---------- */
.legal { padding-top: 0; }
.legal__body { max-width: 68ch; }
.legal__body h2 { font-size: 1.3rem; margin-top: 2em; }
.legal__body p { color: var(--cream-70); }
.legal__body a { color: var(--cream); border-bottom: 1.5px solid var(--mint); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: clamp(48px, 6vw, 72px); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__brand p { color: var(--cream-70); max-width: 34ch; margin-top: 16px; }
.footer__legal-note { font-size: 0.8rem; color: var(--cream-50) !important; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h3 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-50); margin-bottom: 6px; font-family: var(--font-body); }
.footer__col a { color: var(--cream-70); transition: color 0.2s; width: fit-content; }
.footer__col a:hover { color: var(--cream); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--cream-50); font-size: 0.88rem;
}
.footer__top { color: var(--cream-70); border-bottom: 1px solid var(--line-strong); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }
  .reveal[data-delay="1"] { transition-delay: 0.1s; }
  .reveal[data-delay="2"] { transition-delay: 0.2s; }
  .reveal[data-delay="3"] { transition-delay: 0.3s; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  body.has-cursor, body.has-cursor * { cursor: auto; }
  .cursor { display: none; }
}

/* ==========================================================================
   Minecraft flavour: pixel corners, block grid, 3D voxel hero, particles,
   marquee, counters, card tilt
   ========================================================================== */

/* Pixel-stepped corners on buttons and cards (Minecraft UI feel) */
.btn, .work, .role, .value, .form, .cta__box, .filter__btn.is-active, .perks__list li, .alert {
  --px: 4px;
  clip-path: polygon(
    var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
    var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)), 0 var(--px), var(--px) var(--px)
  );
  border-radius: 0;
}
.work, .role, .value, .form, .cta__box { --px: 8px; }
.btn { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.btn--primary:active { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35); }

/* Blocky terrain silhouette along the bottom of the hero (Minecraft skyline) */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%221440%22%20height=%22200%22%20viewBox=%220%200%201440%20200%22%3E%3Cpath%20d=%22M0,200%20L0,104%20L24,104%20L24,104%20L48,104%20L48,104%20L72,104%20L72,80%20L96,80%20L96,104%20L120,104%20L120,128%20L144,128%20L144,104%20L168,104%20L168,104%20L192,104%20L192,104%20L216,104%20L216,104%20L240,104%20L240,80%20L264,80%20L264,56%20L288,56%20L288,32%20L312,32%20L312,32%20L336,32%20L336,32%20L360,32%20L360,32%20L384,32%20L384,32%20L408,32%20L408,56%20L432,56%20L432,80%20L456,80%20L456,80%20L480,80%20L480,104%20L504,104%20L504,104%20L528,104%20L528,128%20L552,128%20L552,128%20L576,128%20L576,104%20L600,104%20L600,80%20L624,80%20L624,56%20L648,56%20L648,32%20L672,32%20L672,32%20L696,32%20L696,32%20L720,32%20L720,32%20L744,32%20L744,56%20L768,56%20L768,80%20L792,80%20L792,80%20L816,80%20L816,56%20L840,56%20L840,56%20L864,56%20L864,56%20L888,56%20L888,32%20L912,32%20L912,32%20L936,32%20L936,32%20L960,32%20L960,32%20L984,32%20L984,32%20L1008,32%20L1008,32%20L1032,32%20L1032,32%20L1056,32%20L1056,32%20L1080,32%20L1080,56%20L1104,56%20L1104,56%20L1128,56%20L1128,56%20L1152,56%20L1152,56%20L1176,56%20L1176,80%20L1200,80%20L1200,80%20L1224,80%20L1224,80%20L1248,80%20L1248,80%20L1272,80%20L1272,104%20L1296,104%20L1296,128%20L1320,128%20L1320,104%20L1344,104%20L1344,80%20L1368,80%20L1368,104%20L1392,104%20L1392,104%20L1416,104%20L1416,104%20L1440,104%20L1440,200%20Z%22%20fill=%22rgba(46,230,166,0.05)%22/%3E%3Cpath%20d=%22M0,200%20L0,128%20L24,128%20L24,128%20L48,128%20L48,128%20L72,128%20L72,128%20L96,128%20L96,128%20L120,128%20L120,152%20L144,152%20L144,152%20L168,152%20L168,128%20L192,128%20L192,152%20L216,152%20L216,152%20L240,152%20L240,176%20L264,176%20L264,152%20L288,152%20L288,152%20L312,152%20L312,128%20L336,128%20L336,104%20L360,104%20L360,104%20L384,104%20L384,104%20L408,104%20L408,104%20L432,104%20L432,128%20L456,128%20L456,152%20L480,152%20L480,152%20L504,152%20L504,176%20L528,176%20L528,152%20L552,152%20L552,176%20L576,176%20L576,176%20L600,176%20L600,176%20L624,176%20L624,176%20L648,176%20L648,152%20L672,152%20L672,176%20L696,176%20L696,176%20L720,176%20L720,176%20L744,176%20L744,152%20L768,152%20L768,152%20L792,152%20L792,152%20L816,152%20L816,176%20L840,176%20L840,176%20L864,176%20L864,176%20L888,176%20L888,152%20L912,152%20L912,176%20L936,176%20L936,152%20L960,152%20L960,128%20L984,128%20L984,128%20L1008,128%20L1008,152%20L1032,152%20L1032,152%20L1056,152%20L1056,128%20L1080,128%20L1080,152%20L1104,152%20L1104,176%20L1128,176%20L1128,176%20L1152,176%20L1152,176%20L1176,176%20L1176,176%20L1200,176%20L1200,176%20L1224,176%20L1224,176%20L1248,176%20L1248,176%20L1272,176%20L1272,176%20L1296,176%20L1296,176%20L1320,176%20L1320,176%20L1344,176%20L1344,152%20L1368,152%20L1368,152%20L1392,152%20L1392,128%20L1416,128%20L1416,128%20L1440,128%20L1440,200%20Z%22%20fill=%22rgba(109,191,58,0.08)%22/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: bottom left; background-size: auto 200px;
}
.hero__grid { position: relative; z-index: 1; }

/* 3D voxel scene */
.hero__frame { position: relative; aspect-ratio: 6 / 5; touch-action: pan-y; }
.hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__frame.is-3d .hero__fallback { display: none; }
.hero__frame.is-3d { cursor: grab; }
.hero__frame.is-3d.is-dragging { cursor: grabbing; }
.hero__hint {
  position: absolute; right: 14px; bottom: 12px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cream-50); opacity: 0; transition: opacity 0.4s;
}
.hero__frame.is-3d .hero__hint { opacity: 1; }
.voxel {
  position: absolute; inset: 0; display: none;
  perspective: 1600px; perspective-origin: 50% 45%;
}
.hero__frame.is-3d .voxel { display: block; }
.voxel__world {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.cube {
  position: absolute; width: var(--s); height: var(--s); transform-style: preserve-3d;
  left: calc(var(--s) * -0.5); top: calc(var(--s) * -0.5);
}
.cube i {
  position: absolute; inset: -0.5px; display: block; backface-visibility: hidden;
  background: var(--side); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.cube i[hidden] { display: none; }
.cube i:nth-child(1) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); background: var(--top); }        /* top */
.cube i:nth-child(2) { transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.86); }      /* front */
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.66); }     /* right */
.cube i:nth-child(4) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.72); }    /* back */
.cube i:nth-child(5) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.95); }    /* left */
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.4); }     /* bottom */
.cube--small { transform-origin: 50% 50%; }
.cube--small i { inset: 25%; }
.cube--small i:nth-child(1) { transform: rotateX(90deg) translateZ(calc(var(--s) / 4)); }
.cube--small i:nth-child(2) { transform: rotateY(0deg) translateZ(calc(var(--s) / 4)); }
.cube--small i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 4)); }
.cube--small i:nth-child(4) { transform: rotateY(180deg) translateZ(calc(var(--s) / 4)); }
.cube--small i:nth-child(5) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 4)); }
.cube--small i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 4)); }
.cube--float { animation: cube-float 4s ease-in-out infinite; }
@keyframes cube-float { 0%, 100% { translate: 0 0 0; } 50% { translate: 0 -10px 0; } }
.cube.is-hit i { filter: brightness(1.6) !important; transition: filter 0.1s; }

/* Marquee (single, between stats and featured) */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); padding: 18px 0; background: var(--bg-2); }
.marquee__track { display: flex; align-items: center; gap: 32px; width: max-content; animation: marquee 32s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-50); white-space: nowrap; }
.marquee__track i { width: 8px; height: 8px; background: var(--mint); flex: none; }
.marquee__track i:nth-child(4n+2) { background: var(--amber); }
.marquee__track i:nth-child(4n+4) { background: var(--sky); }
.marquee__track i:nth-child(4n+6) { background: var(--violet); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Card tilt */
.work[data-tilt] { transform-style: preserve-3d; transition: transform 0.25s var(--ease), border-color 0.3s; }
.work[data-tilt] .work__meta { transform: translateZ(20px); }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .cube--float { animation: none; }
}

/* ==========================================================================
   Day mode (brand cream) — toggled via [data-theme="light"], follows system otherwise
   ========================================================================== */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fff1d9; --bg-2: #f8e6c8; --bg-3: #f1dcb8;
    --line: rgba(26, 21, 18, 0.1); --line-strong: rgba(26, 21, 18, 0.22);
    --cream: #1a1512; --cream-70: rgba(26, 21, 18, 0.72); --cream-50: rgba(26, 21, 18, 0.5);
    --mint: #12b380; --mint-soft: rgba(18, 179, 128, 0.16);
    --amber: #d97a10; --sky: #2f6fd6; --violet: #8a4bd6;
  }
}
:root[data-theme="light"] {
  --bg: #fff1d9; --bg-2: #f8e6c8; --bg-3: #f1dcb8;
  --line: rgba(26, 21, 18, 0.1); --line-strong: rgba(26, 21, 18, 0.22);
  --cream: #1a1512; --cream-70: rgba(26, 21, 18, 0.72); --cream-50: rgba(26, 21, 18, 0.5);
  --mint: #12b380; --mint-soft: rgba(18, 179, 128, 0.16);
  --amber: #d97a10; --sky: #2f6fd6; --violet: #8a4bd6;
}
/* things that must stay fixed regardless of theme */
.btn--primary, .cta .btn--primary, .skip { color: #fff1d9; }
.cta .btn--primary { color: #0e0f12; }
.work__type { color: #0e0f12; }
.filter__btn.is-active, .chip input:checked + span { color: #fff; }
:root[data-theme="light"] .hero::before { background:
    radial-gradient(55% 50% at 78% 45%, rgba(18, 179, 128, 0.16), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(47, 111, 214, 0.12), transparent 70%); }
:root[data-theme="light"] .hero__frame { background: #fbf0dc; box-shadow: 0 30px 60px -30px rgba(26, 21, 18, 0.35); }
:root[data-theme="light"] .work img { background: linear-gradient(180deg, #f8e6c8, #f1dcb8); }
:root[data-theme="light"] .cursor__dot, :root[data-theme="light"] .cursor__ring { mix-blend-mode: multiply; }

/* ---------- Day / night toggle button (pixel sun / moon) ---------- */
.theme-btn {
  position: relative; width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--bg-2);
  border-radius: 0; cursor: pointer; padding: 0; margin-left: 4px; flex: none;
  --px: 3px;
  clip-path: polygon(var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px), 100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)), 0 var(--px), var(--px) var(--px));
  transition: background-color 0.2s, border-color 0.2s;
}
.theme-btn:hover { border-color: var(--mint); background: var(--mint-soft); }
.theme-btn__sun, .theme-btn__moon { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; transition: opacity 0.3s, transform 0.4s var(--ease); }
.theme-btn__sun {
  background: var(--amber);
  box-shadow: 0 -8px 0 -5px var(--amber), 0 8px 0 -5px var(--amber), -8px 0 0 -5px var(--amber), 8px 0 0 -5px var(--amber);
  transform: scale(0.85);
}
.theme-btn__moon { background: var(--cream); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 75%, 45% 75%, 45% 25%, 0 25%); }
/* dark theme shows the moon (click → day); light shows the sun */
.theme-btn__sun { opacity: 0; transform: scale(0.4) rotate(-90deg); }
.theme-btn__moon { opacity: 1; }
:root[data-theme="light"] .theme-btn__sun { opacity: 1; transform: scale(0.85) rotate(0); }
:root[data-theme="light"] .theme-btn__moon { opacity: 0; transform: scale(0.4) rotate(90deg); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn__sun { opacity: 1; transform: scale(0.85) rotate(0); }
  :root:not([data-theme="dark"]) .theme-btn__moon { opacity: 0; transform: scale(0.4) rotate(90deg); }
}
.theme-btn--mobile { display: none; }
@media (max-width: 860px) {
  .theme-btn--mobile { display: block; margin-left: auto; margin-right: 8px; }
}

/* project art: transparent PNG dioramas on a soft card gradient */
.work img { background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); object-fit: contain; padding: 6% 4% 0; }
.work--lg img { object-fit: contain; padding: 2% 0 0; }
.about-story__img img { background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); }

/* ---------- Partner badge ---------- */
.partner-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 6px 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-70);
  border: 1px solid var(--line-strong); background: var(--bg-2); white-space: nowrap;
  --px: 3px;
  clip-path: polygon(var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px), 100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)), 0 var(--px), var(--px) var(--px));
}
.partner-badge i { width: 8px; height: 8px; background: #6dbf3a; box-shadow: inset -2px -2px 0 rgba(0,0,0,0.25); }

/* ---------- Day mode: richer hero background ---------- */
:root[data-theme="light"] .hero::after { background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%221440%22%20height=%22200%22%20viewBox=%220%200%201440%20200%22%3E%3Cpath%20d=%22M0,200%20L0,104%20L24,104%20L24,104%20L48,104%20L48,104%20L72,104%20L72,80%20L96,80%20L96,104%20L120,104%20L120,128%20L144,128%20L144,104%20L168,104%20L168,104%20L192,104%20L192,104%20L216,104%20L216,104%20L240,104%20L240,80%20L264,80%20L264,56%20L288,56%20L288,32%20L312,32%20L312,32%20L336,32%20L336,32%20L360,32%20L360,32%20L384,32%20L384,32%20L408,32%20L408,56%20L432,56%20L432,80%20L456,80%20L456,80%20L480,80%20L480,104%20L504,104%20L504,104%20L528,104%20L528,128%20L552,128%20L552,128%20L576,128%20L576,104%20L600,104%20L600,80%20L624,80%20L624,56%20L648,56%20L648,32%20L672,32%20L672,32%20L696,32%20L696,32%20L720,32%20L720,32%20L744,32%20L744,56%20L768,56%20L768,80%20L792,80%20L792,80%20L816,80%20L816,56%20L840,56%20L840,56%20L864,56%20L864,56%20L888,56%20L888,32%20L912,32%20L912,32%20L936,32%20L936,32%20L960,32%20L960,32%20L984,32%20L984,32%20L1008,32%20L1008,32%20L1032,32%20L1032,32%20L1056,32%20L1056,32%20L1080,32%20L1080,56%20L1104,56%20L1104,56%20L1128,56%20L1128,56%20L1152,56%20L1152,56%20L1176,56%20L1176,80%20L1200,80%20L1200,80%20L1224,80%20L1224,80%20L1248,80%20L1248,80%20L1272,80%20L1272,104%20L1296,104%20L1296,128%20L1320,128%20L1320,104%20L1344,104%20L1344,80%20L1368,80%20L1368,104%20L1392,104%20L1392,104%20L1416,104%20L1416,104%20L1440,104%20L1440,200%20Z%22%20fill=%22rgba(18,179,128,0.16)%22/%3E%3Cpath%20d=%22M0,200%20L0,128%20L24,128%20L24,128%20L48,128%20L48,128%20L72,128%20L72,128%20L96,128%20L96,128%20L120,128%20L120,152%20L144,152%20L144,152%20L168,152%20L168,128%20L192,128%20L192,152%20L216,152%20L216,152%20L240,152%20L240,176%20L264,176%20L264,152%20L288,152%20L288,152%20L312,152%20L312,128%20L336,128%20L336,104%20L360,104%20L360,104%20L384,104%20L384,104%20L408,104%20L408,104%20L432,104%20L432,128%20L456,128%20L456,152%20L480,152%20L480,152%20L504,152%20L504,176%20L528,176%20L528,152%20L552,152%20L552,176%20L576,176%20L576,176%20L600,176%20L600,176%20L624,176%20L624,176%20L648,176%20L648,152%20L672,152%20L672,176%20L696,176%20L696,176%20L720,176%20L720,176%20L744,176%20L744,152%20L768,152%20L768,152%20L792,152%20L792,152%20L816,152%20L816,176%20L840,176%20L840,176%20L864,176%20L864,176%20L888,176%20L888,152%20L912,152%20L912,176%20L936,176%20L936,152%20L960,152%20L960,128%20L984,128%20L984,128%20L1008,128%20L1008,152%20L1032,152%20L1032,152%20L1056,152%20L1056,128%20L1080,128%20L1080,152%20L1104,152%20L1104,176%20L1128,176%20L1128,176%20L1152,176%20L1152,176%20L1176,176%20L1176,176%20L1200,176%20L1200,176%20L1224,176%20L1224,176%20L1248,176%20L1248,176%20L1272,176%20L1272,176%20L1296,176%20L1296,176%20L1320,176%20L1320,176%20L1344,176%20L1344,152%20L1368,152%20L1368,152%20L1392,152%20L1392,128%20L1416,128%20L1416,128%20L1440,128%20L1440,200%20Z%22%20fill=%22rgba(90,160,50,0.28)%22/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .hero::after { background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%221440%22%20height=%22200%22%20viewBox=%220%200%201440%20200%22%3E%3Cpath%20d=%22M0,200%20L0,104%20L24,104%20L24,104%20L48,104%20L48,104%20L72,104%20L72,80%20L96,80%20L96,104%20L120,104%20L120,128%20L144,128%20L144,104%20L168,104%20L168,104%20L192,104%20L192,104%20L216,104%20L216,104%20L240,104%20L240,80%20L264,80%20L264,56%20L288,56%20L288,32%20L312,32%20L312,32%20L336,32%20L336,32%20L360,32%20L360,32%20L384,32%20L384,32%20L408,32%20L408,56%20L432,56%20L432,80%20L456,80%20L456,80%20L480,80%20L480,104%20L504,104%20L504,104%20L528,104%20L528,128%20L552,128%20L552,128%20L576,128%20L576,104%20L600,104%20L600,80%20L624,80%20L624,56%20L648,56%20L648,32%20L672,32%20L672,32%20L696,32%20L696,32%20L720,32%20L720,32%20L744,32%20L744,56%20L768,56%20L768,80%20L792,80%20L792,80%20L816,80%20L816,56%20L840,56%20L840,56%20L864,56%20L864,56%20L888,56%20L888,32%20L912,32%20L912,32%20L936,32%20L936,32%20L960,32%20L960,32%20L984,32%20L984,32%20L1008,32%20L1008,32%20L1032,32%20L1032,32%20L1056,32%20L1056,32%20L1080,32%20L1080,56%20L1104,56%20L1104,56%20L1128,56%20L1128,56%20L1152,56%20L1152,56%20L1176,56%20L1176,80%20L1200,80%20L1200,80%20L1224,80%20L1224,80%20L1248,80%20L1248,80%20L1272,80%20L1272,104%20L1296,104%20L1296,128%20L1320,128%20L1320,104%20L1344,104%20L1344,80%20L1368,80%20L1368,104%20L1392,104%20L1392,104%20L1416,104%20L1416,104%20L1440,104%20L1440,200%20Z%22%20fill=%22rgba(18,179,128,0.16)%22/%3E%3Cpath%20d=%22M0,200%20L0,128%20L24,128%20L24,128%20L48,128%20L48,128%20L72,128%20L72,128%20L96,128%20L96,128%20L120,128%20L120,152%20L144,152%20L144,152%20L168,152%20L168,128%20L192,128%20L192,152%20L216,152%20L216,152%20L240,152%20L240,176%20L264,176%20L264,152%20L288,152%20L288,152%20L312,152%20L312,128%20L336,128%20L336,104%20L360,104%20L360,104%20L384,104%20L384,104%20L408,104%20L408,104%20L432,104%20L432,128%20L456,128%20L456,152%20L480,152%20L480,152%20L504,152%20L504,176%20L528,176%20L528,152%20L552,152%20L552,176%20L576,176%20L576,176%20L600,176%20L600,176%20L624,176%20L624,176%20L648,176%20L648,152%20L672,152%20L672,176%20L696,176%20L696,176%20L720,176%20L720,176%20L744,176%20L744,152%20L768,152%20L768,152%20L792,152%20L792,152%20L816,152%20L816,176%20L840,176%20L840,176%20L864,176%20L864,176%20L888,176%20L888,152%20L912,152%20L912,176%20L936,176%20L936,152%20L960,152%20L960,128%20L984,128%20L984,128%20L1008,128%20L1008,152%20L1032,152%20L1032,152%20L1056,152%20L1056,128%20L1080,128%20L1080,152%20L1104,152%20L1104,176%20L1128,176%20L1128,176%20L1152,176%20L1152,176%20L1176,176%20L1176,176%20L1200,176%20L1200,176%20L1224,176%20L1224,176%20L1248,176%20L1248,176%20L1272,176%20L1272,176%20L1296,176%20L1296,176%20L1320,176%20L1320,176%20L1344,176%20L1344,152%20L1368,152%20L1368,152%20L1392,152%20L1392,128%20L1416,128%20L1416,128%20L1440,128%20L1440,200%20Z%22%20fill=%22rgba(90,160,50,0.28)%22/%3E%3C/svg%3E"); } }
:root[data-theme="light"] .hero::before, :root:not([data-theme="dark"]) .hero::before { background:
    radial-gradient(55% 50% at 78% 45%, rgba(18, 179, 128, 0.22), transparent 70%),
    radial-gradient(45% 45% at 8% 90%, rgba(47, 111, 214, 0.16), transparent 70%),
    radial-gradient(35% 35% at 30% 8%, rgba(217, 122, 16, 0.16), transparent 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { background:
    radial-gradient(55% 50% at 78% 45%, rgba(46, 230, 166, 0.14), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(110, 168, 255, 0.14), transparent 70%),
    radial-gradient(30% 30% at 30% 10%, rgba(255, 180, 84, 0.08), transparent 70%); } }
:root[data-theme="dark"] .hero::before { background:
    radial-gradient(55% 50% at 78% 45%, rgba(46, 230, 166, 0.14), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(110, 168, 255, 0.14), transparent 70%),
    radial-gradient(30% 30% at 30% 10%, rgba(255, 180, 84, 0.08), transparent 70%); }

/* Roleplay tag: fixed gold so it reads in both themes */
.work[data-type="Roleplay"] .work__type, .work__type--roleplay { background: #ffd15c; }

/* ---------- Smooth theme switch: view transition crossfade + long colour transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
html.theme-anim, html.theme-anim body, html.theme-anim * { transition: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease, fill 0.7s ease !important; }

/* ---------- Global drifting outline blocks ---------- */
.bg-blocks { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header { z-index: 50; }

/* ---------- Manifesto (replaces the marquee) ---------- */
.manifesto { padding-block: clamp(56px, 8vw, 104px); border-bottom: 1px solid var(--line); }
.manifesto__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.manifesto__text { font-family: var(--font-display); font-size: clamp(1.1rem, 1.9vw, 1.5rem); line-height: 1.35; color: var(--cream); margin: 0; max-width: 30ch; text-wrap: balance; }
.manifesto__link { font-weight: 600; border-bottom: 1.5px solid var(--mint); white-space: nowrap; }

/* Selected work footer: centred */
.section-foot { text-align: center; margin-top: 48px; }

/* Card tilt glare + image parallax */
.work { position: relative; }
.work__glare { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.work img { transition: transform 0.35s var(--ease); will-change: transform; }
.work:hover img { transform: none; }
.work__meta { position: relative; z-index: 1; }

/* Ghost buttons: readable in day mode */
:root[data-theme="light"] .btn--ghost { border-color: rgba(26, 21, 18, 0.45); background: rgba(255, 255, 255, 0.35); }
:root[data-theme="light"] .btn--ghost:hover { border-color: #1a1512; background: rgba(255, 255, 255, 0.6); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn--ghost { border-color: rgba(26, 21, 18, 0.45); background: rgba(255, 255, 255, 0.35); }
  :root:not([data-theme="dark"]) .btn--ghost:hover { border-color: #1a1512; background: rgba(255, 255, 255, 0.6); }
}

/* Footer partner line, centred */
.footer__bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.footer__bottom .footer__top { justify-self: end; }
.footer__partner { display: inline-flex; align-items: center; gap: 8px; justify-self: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-70); }
.footer__partner i { width: 8px; height: 8px; background: #6dbf3a; box-shadow: inset -2px -2px 0 rgba(0,0,0,0.25); }
@media (max-width: 760px) { .footer__bottom { grid-template-columns: 1fr; text-align: center; gap: 10px; } .footer__bottom .footer__top { justify-self: center; } }

/* effect toggles from the admin panel */
html[data-fx-noterrain] .hero::after { display: none; }
.rich p { color: var(--cream-70); }

/* ======================================================================
   Drag & drop content blocks (added in the admin's Website Design panel)
   ====================================================================== */
.blk { padding-block: clamp(30px, 4.5vw, 58px); }
.blk + .blk { padding-top: clamp(8px, 1.6vw, 18px); }
.blk-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 14px; }
.blk-lead { margin: 0 0 26px; max-width: 60ch; }
.blk-head { display: grid; gap: 12px; max-width: 62ch; }
.blk-head.is-center { margin-inline: auto; text-align: center; justify-items: center; }
.blk-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.8rem); margin: 0; }
.blk-head .lead { max-width: 56ch; }
.blk-head .eyebrow,
.blk .eyebrow { font: 700 0.72rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); }

.blk-rich { max-width: 68ch; }
.blk-rich.is-wide { max-width: none; column-gap: 40px; }
.blk--buttons .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.blk--buttons .btn-row.is-center { justify-content: center; }

.blk-quote { margin: 0; text-align: center; max-width: 780px; margin-inline: auto; }
.blk-quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.25; }
.blk-quote figcaption { margin-top: 14px; color: var(--cream-50); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }

.blk-img { margin: 0; }
.blk-img img { width: 100%; height: auto; max-height: 70vh; object-fit: cover; display: block; border: 1px solid var(--line); border-radius: 4px; }
.blk-img.is-narrow { max-width: 620px; margin-inline: auto; }
.blk-img figcaption,
.blk-gallery figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--cream-50); }

.blk-split { display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; grid-template-columns: 1fr; }
.blk-split__art img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 4px; }
.blk-split__copy h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin: 0 0 12px; }
.blk-split__copy p { color: var(--cream-70); margin: 0 0 18px; max-width: 48ch; }

.blk-gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.blk-gallery figure { margin: 0; }
.blk-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border: 1px solid var(--line); border-radius: 4px; transition: transform 0.25s; }
.blk-gallery figure:hover img { transform: translateY(-3px); }

.blk-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.blk-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 20px; position: relative; overflow: hidden; }
.blk-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--mint); opacity: 0.8; }
.blk-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.blk-card p { margin: 0; color: var(--cream-70); font-size: 0.95rem; }

.blk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.blk-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.blk-steps__n { display: grid; place-items: center; width: 34px; height: 34px; background: var(--mint); color: var(--bg); font: 700 0.95rem/1 var(--font-body); border-radius: 3px; }
.blk-steps h3 { margin: 0 0 4px; font-size: 1rem; }
.blk-steps p { margin: 0; color: var(--cream-70); font-size: 0.95rem; }

.blk-stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.blk-stat { background: var(--bg); padding: 22px 18px; display: grid; gap: 4px; }
.blk-stat strong { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.blk-stat span { color: var(--cream-50); font-size: 0.85rem; }

.blk-faq { display: grid; gap: 8px; max-width: 760px; }
.blk-faq details { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); padding: 14px 16px; }
.blk-faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.blk-faq summary::-webkit-details-marker { display: none; }
.blk-faq summary::after { content: "+"; float: right; color: var(--mint); }
.blk-faq details[open] summary::after { content: "\2212"; }
.blk-faq p { margin: 10px 0 0; color: var(--cream-70); }

.blk-cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: clamp(22px, 4vw, 38px); background: var(--bg-2); }
.blk-cta h2 { margin: 0 0 8px; font-size: clamp(1.3rem, 2.6vw, 2rem); }
.blk-cta p { margin: 0; color: var(--cream-70); max-width: 52ch; }
.blk-cta.is-accent { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint-soft); }
.blk-cta.is-red { border-color: var(--red-bright); background: linear-gradient(180deg, rgba(154, 15, 6, 0.22), var(--bg-2)); }

.blk-banner { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); min-height: 260px; display: grid; }
.blk-banner__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.blk-banner__copy { position: relative; padding: clamp(24px, 5vw, 56px); align-self: end; max-width: 60ch; }
.blk-banner__copy h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 3vw, 2.3rem); }
.blk-banner__copy p { margin: 0 0 18px; color: var(--cream-70); }

.blk--divider { padding-block: 0; }
.blk-divider.is-line { height: 1px; background: var(--line); margin-block: clamp(30px, 5vw, 60px); }
.blk-divider.is-space { height: clamp(40px, 8vw, 110px); }
.blk-divider.is-blocks { height: 42px; margin-block: clamp(24px, 4vw, 46px);
  background-image: linear-gradient(90deg, var(--line-strong) 1px, transparent 1px), linear-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 21px 21px; background-position: center; mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }

@media (min-width: 760px) {
  .blk-split { grid-template-columns: 1fr 1fr; }
  .blk-split.is-right .blk-split__art { order: 2; }
}

/* ======================================================================
   Animation templates (picked in the admin: theme-wide or per block)
   ====================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), filter 0.7s var(--ease); }
  html[data-reveal="zoom-in"] .reveal { transform: scale(0.92); }
  html[data-reveal="slide-left"] .reveal { transform: translateX(-40px); }
  html[data-reveal="slide-right"] .reveal { transform: translateX(40px); }
  html[data-reveal="blur-in"] .reveal { transform: none; filter: blur(10px); }
  html[data-reveal="none"] .reveal { opacity: 1; transform: none; filter: none; }
  .reveal.is-visible { opacity: 1; transform: none; filter: none; }

  /* per-block override (same specificity as the html rule, but later) */
  .reveal[data-anim="fade-up"]:not(.is-visible) { opacity: 0; transform: translateY(22px); filter: none; }
  .reveal[data-anim="zoom-in"]:not(.is-visible) { opacity: 0; transform: scale(0.92); filter: none; }
  .reveal[data-anim="slide-left"]:not(.is-visible) { opacity: 0; transform: translateX(-40px); filter: none; }
  .reveal[data-anim="slide-right"]:not(.is-visible) { opacity: 0; transform: translateX(40px); filter: none; }
  .reveal[data-anim="blur-in"]:not(.is-visible) { opacity: 0; transform: none; filter: blur(10px); }
  .reveal[data-anim="none"] { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---- button hover templates ---- */
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; }
html[data-btn-anim="lift"] .btn:hover,
[data-btn-anim="lift"] .btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32); }
html[data-btn-anim="glow"] .btn:hover,
[data-btn-anim="glow"] .btn:hover { box-shadow: 0 0 0 3px var(--mint-soft), 0 0 22px var(--mint-soft); border-color: var(--mint); }
html[data-btn-anim="shine"] .btn::after,
[data-btn-anim="shine"] .btn::after {
  opacity: 1; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.38) 50%, transparent 62%);
  transform: translateX(-120%); transition: transform 0.6s var(--ease);
}
html[data-btn-anim="shine"] .btn:hover::after,
[data-btn-anim="shine"] .btn:hover::after { transform: translateX(120%); }
html[data-btn-anim="pulse"] .btn:hover,
[data-btn-anim="pulse"] .btn:hover { animation: nds-btn-pulse 0.85s var(--ease) infinite; }
html[data-btn-anim="press"] .btn:hover,
[data-btn-anim="press"] .btn:hover { transform: translateY(2px) scale(0.98); filter: brightness(1.12); }
html[data-btn-anim="press"] .btn:active,
[data-btn-anim="press"] .btn:active { transform: translateY(3px) scale(0.95); }
html[data-btn-anim="none"] .btn:hover,
[data-btn-anim="none"] .btn:hover { transform: none; box-shadow: none; }
@keyframes nds-btn-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { animation: none !important; transform: none !important; }
}

/* ---- slider block ---- */
.blk-slider { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.blk-slider__track { position: relative; display: grid; }
.blk-slide { grid-area: 1 / 1; position: relative; min-height: clamp(260px, 42vw, 460px); opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease); }
.blk-slide.is-on { opacity: 1; pointer-events: auto; transform: none; z-index: 2; }
.blk-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blk-slide::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.05)); }
.blk-slide__copy { position: relative; z-index: 2; align-self: end; padding: clamp(18px, 4vw, 40px); max-width: 60ch;
  height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.blk-slide__copy h3 { margin: 0; font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 2rem); color: #fff1d9; }
.blk-slide__copy p { margin: 0; color: rgba(255, 241, 217, 0.82); }
.blk-slide__copy .btn { align-self: flex-start; margin-top: 6px; }
.blk-slider[data-transition="slide"] .blk-slide:not(.is-on) { transform: translateX(28%); }
.blk-slider[data-transition="fade"] .blk-slide:not(.is-on) { transform: none; }
.blk-slider[data-transition="zoom"] .blk-slide:not(.is-on) { transform: scale(1.08); }
.blk-slider[data-transition="flip"] .blk-slide:not(.is-on) { transform: perspective(900px) rotateY(22deg); transform-origin: left center; }
.blk-slider[data-transition="stack"] .blk-slide:not(.is-on) { transform: translateY(14%) scale(0.96); }
.blk-slider__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px;
  display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer;
  background: rgba(14, 15, 18, 0.55); color: #fff1d9; font-size: 14px; transition: background 0.2s, border-color 0.2s; }
.blk-slider__nav:hover { background: var(--mint); color: #04130d; border-color: var(--mint); }
.blk-slider__nav.is-prev { left: 12px; }
.blk-slider__nav.is-next { right: 12px; }
.blk-slider__dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; gap: 6px; justify-content: center; }
.blk-slider__dots button { width: 10px; height: 10px; border: 1px solid rgba(255, 241, 217, 0.7); background: transparent; cursor: pointer; padding: 0; }
.blk-slider__dots button.is-on { background: var(--mint); border-color: var(--mint); }
@media (prefers-reduced-motion: reduce) { .blk-slide { transition: opacity 0.2s; transform: none !important; } }

/* ---- language switcher ---- */
.lang-pick { position: relative; }
.lang-pick__btn { width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--cream);
  font: 700 0.72rem/1 var(--font-body); letter-spacing: .06em; cursor: pointer; border-radius: 4px; transition: border-color .2s, color .2s; }
.lang-pick__btn:hover, .lang-pick.is-open .lang-pick__btn { border-color: var(--mint); color: var(--mint); }
.lang-pick__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; z-index: 40;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px; display: grid; gap: 2px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35); }
.lang-pick__menu[hidden] { display: none; }
.lang-pick__menu a { padding: 8px 10px; border-radius: 4px; font-size: 0.9rem; color: var(--cream-70); text-decoration: none; }
.lang-pick__menu a:hover { background: var(--bg-3); color: var(--cream); }
.lang-pick__menu a[aria-current] { color: var(--mint); }
.lang-row { display: flex; gap: 6px; margin-top: 16px; }
.lang-row__a { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 4px; font: 700 0.75rem/1 var(--font-body);
  color: var(--cream-70); text-decoration: none; letter-spacing: .06em; }
.lang-row__a.is-on { border-color: var(--mint); color: var(--mint); }
/* Marketplace rating on project cards (filled by Marketplace Sync) */
.work__rating { display: inline-block; margin: 0 0 10px 8px; font-size: 0.76rem; font-weight: 700; color: #ffd15c; letter-spacing: .02em; }
.work__rating small { color: var(--cream-70, rgba(255,241,217,.7)); font-weight: 500; }

/* ================================================================ FX layer (fx.js) */
/* Block Rift page transition */
.rift-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 10000; pointer-events: none; display: none; }
/* while the next page waits for fx.js, keep it covered (fails open after 1.4 s if JS never runs) */
.rift-cover body::after { content: ""; position: fixed; inset: 0; z-index: 9999; background: #5c4a3a; pointer-events: none;
  animation: rift-failsafe 0.3s linear 1.4s forwards; }
@keyframes rift-failsafe { to { opacity: 0; visibility: hidden; } }

/* scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--red-bright), var(--mint));
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* word-by-word heading reveal */
.split__w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split__i { display: inline-block; transform: translateY(105%) rotate(4deg); opacity: 0; transition: transform 0.8s var(--ease), opacity 0.6s var(--ease); }
.split.is-in .split__i { transform: none; opacity: 1; }

/* magnetic buttons */
.magnetic { transition: transform 0.35s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s; will-change: transform; }

/* project cards open a modal */
article.work { cursor: pointer; }
article.work:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }

/* project modal */
.pmodal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: var(--gutter); }
.pmodal[hidden] { display: none; }
.pmodal__backdrop { position: absolute; inset: 0; background: rgba(8, 9, 11, 0.78); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s var(--ease); }
.pmodal__box { position: relative; width: min(980px, 100%); max-height: calc(100vh - 2 * var(--gutter)); overflow: auto; background: var(--bg-2);
  border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translateY(24px) scale(0.97); opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease); }
.pmodal.is-open .pmodal__backdrop { opacity: 1; }
.pmodal.is-open .pmodal__box { transform: none; opacity: 1; }
.pmodal__media { aspect-ratio: 16 / 9; background: #000; }
.pmodal__media img, .pmodal__media iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; image-rendering: auto; }
.pmodal__body { padding: clamp(18px, 3vw, 32px); }
.pmodal__meta { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); white-space: pre; }
.pmodal__title { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); }
.pmodal__text { margin: 0 0 20px; color: var(--cream-70); max-width: 64ch; }
.pmodal__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 4px;
  background: rgba(14, 15, 18, 0.7); cursor: pointer; }
.pmodal__close span { position: absolute; left: 11px; right: 11px; top: 20px; height: 2px; background: var(--cream); transform: rotate(45deg); }
.pmodal__close span + span { transform: rotate(-45deg); }
.pmodal__close:hover { border-color: var(--mint); }
body.pmodal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .split__i, .pmodal__box, .pmodal__backdrop, .magnetic { transition: none; }
}
