/* RenEx Studios public site.
   Palette sampled from RenEx Studios.png: indigo field #1c0b55, emblem cyan #3dbcdc.
   Red comes from the Slayers Unbound wordmark and is used only inside the game section. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #0b0922;
  --ink-2: #110d2e;
  --indigo: #1c0b55;
  --indigo-2: #2b1a78;
  --line: rgba(236, 234, 255, 0.12);
  --text: #eeedf8;
  --muted: #b3afd2;
  --cyan: #3dbcdc;
  --cyan-2: #6fd3ea;
  --red: #c4202b;

  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 140px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--cyan); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* ---------- Type ---------- */
.display, .h2, .pillars h3, .testing h3, .link-title, .brand-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.display { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem); text-wrap: balance; }
.h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); text-wrap: balance; }
.eyebrow, .kicker, .tag, .facts dt, .ws-cap, .link-label, .footer-h, .contact-list dt {
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow, .kicker { color: var(--cyan); }
.kicker { margin-bottom: 12px; }
.lede { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); max-width: 34ch; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-sub { margin-top: 14px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border-radius: 8px; border: 1px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cyan); color: var(--ink); }
.btn-primary:hover { background: var(--cyan-2); }
.btn-ghost { border-color: rgba(238, 237, 248, 0.35); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(238, 237, 248, 0.06); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--indigo); /* matches the logo's own field so the square mark sits seamlessly */
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px rgba(5, 3, 20, 0.35); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { border-radius: 8px; }
.brand-name { font-size: 1.0625rem; letter-spacing: 0.02em; text-transform: uppercase; }
.brand-name span { color: var(--cyan); font-weight: 500; }

.nav { margin-left: auto; }
.nav-menu { display: flex; gap: 4px; }
.nav-menu a {
  display: block; padding: 10px 12px; border-radius: 6px;
  font-weight: 600; font-size: 0.9375rem; color: var(--muted); text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .header-inner { gap: 12px; }
  .nav { order: 3; margin-left: 0; }
  .header-cta { margin-left: auto; }
  .nav-menu { display: none; } /* without JS the footer nav covers mobile */
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 0 12px; margin-right: -12px;
    background: none; border: 0; color: var(--text); font: 700 0.9375rem var(--body); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .25s var(--ease), background-color .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .nav-menu {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--indigo); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(5, 3, 20, 0.45);
  }

  .js .nav-menu.is-open { display: flex; animation: drop .22s var(--ease); }
  .nav-menu a {
    padding: 14px 0; font-family: var(--display); font-size: 1.25rem; font-weight: 600;
    color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .nav-menu li:last-child a { border-bottom: 0; }
}
@media (max-width: 380px) {
  .brand-name span { display: none; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--indigo);
  padding-block: clamp(48px, 8vw, 104px) clamp(56px, 9vw, 120px);
}
.hero-arc {
  position: absolute; width: min(720px, 120vw); right: -18%; top: -30%;
  fill: none; stroke: var(--cyan); stroke-width: 1; opacity: 0.18; pointer-events: none;
}
.hero-arc circle + circle { stroke-dasharray: 6 10; }
.hero-grid { position: relative; display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
.hero-copy .display { margin-top: 18px; }
.hero-copy .lede { margin-top: 22px; }
.hero-art { position: relative; }
.hero-art img {
  width: 100%; border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(5, 3, 20, 0.7);
}
.tag {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(11, 9, 34, 0.82); color: var(--text); font-size: 0.75rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); display: inline-block; flex: none; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 5fr 7fr; }
  .hero-art { margin-right: calc(-1 * var(--gutter)); }
}
@media (max-width: 959px) {
  .hero-art { margin-inline: calc(-1 * var(--gutter)); }
  .hero-art img { border-radius: 0; }
  .lede { max-width: 46ch; }
}
@media (max-width: 479px) {
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- Slayers Unbound ---------- */
.slayers {
  position: relative;
  padding-top: var(--section);
  background: var(--ink);
  border-top: 3px solid var(--red);
}
.slayers-head { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.slayers-logo { margin: 0; font-size: inherit; }
.slayers-logo img { width: 100%; max-width: 560px; margin-block: -6%; /* trims the logo canvas padding visually */ }
.slayers-desc { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); max-width: 56ch; }

.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.75rem; }
.facts dd { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 1.0625rem; }
.facts .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(196, 32, 43, 0.22); }

@media (min-width: 960px) {
  .slayers-head { grid-template-columns: 5fr 6fr; }
}

.pillars {
  display: grid; gap: 0; counter-reset: p;
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.pillars li { position: relative; padding: 28px 0; border-bottom: 1px solid var(--line); }
.pillar-num { font-family: var(--display); font-weight: 700; font-size: 0.875rem; color: var(--red); letter-spacing: 0.04em; filter: brightness(1.35); }
.pillars h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); margin-top: 10px; }
.pillars p { margin-top: 8px; color: var(--muted); }
@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); border-top: 0; }
  .pillars li { padding: 32px 32px 8px 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .pillars li + li { padding-left: 32px; border-left: 1px solid var(--line); }
}

.testing {
  display: grid; gap: 24px; align-items: center;
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--indigo);
  border-radius: 10px;
  border-left: 4px solid var(--cyan);
}
.testing h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.testing p:not(.kicker) { margin-top: 12px; color: var(--muted); max-width: 60ch; }
@media (min-width: 760px) {
  .testing { grid-template-columns: 1fr auto; gap: 48px; }
}

.faceoff { margin-top: var(--section); position: relative; background: #121018; }
.faceoff img { width: 100%; max-height: 82vh; object-fit: cover; object-position: 50% 40%; }
.faceoff figcaption {
  padding-block: 14px; font-size: 0.8125rem; color: var(--muted);
}

/* ---------- Workshop ---------- */
.workshop { padding-block: var(--section); background: var(--ink-2); }
.ws-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(120px, 16vw, 230px);
}
.ws { position: relative; overflow: hidden; border-radius: 6px; background: #2a2a2e; }
.ws img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ws:hover img { transform: scale(1.04); }
.ws-cap {
  position: absolute; left: 10px; bottom: 10px;
  padding: 5px 9px; border-radius: 4px;
  background: rgba(11, 9, 34, 0.8); color: var(--text); font-size: 0.6875rem;
}
.ws-feature { grid-column: span 4; grid-row: span 2; }
.ws-tall { grid-column: span 2; }
.ws-mask { grid-column: span 1; }
.ws-wide { grid-column: span 3; }
@media (max-width: 759px) {
  .ws-grid { grid-auto-rows: clamp(110px, 30vw, 200px); gap: 8px; }
  .ws-feature { grid-column: span 6; grid-row: span 2; }
  .ws-tall { grid-column: span 3; grid-row: span 2; }
  .ws-mask { grid-column: span 2; }
  .ws-wide { grid-column: span 6; grid-row: span 2; }
  .ws-mask .ws-cap { display: none; }
}

/* ---------- Studio ---------- */
.studio { padding-block: var(--section); background: var(--indigo); }
.studio-grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.studio-id { display: flex; align-items: center; gap: 24px; }
.studio-id img { width: clamp(96px, 12vw, 150px); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.studio-meta { margin-top: 8px; color: var(--muted); }
.studio-quote p {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem); line-height: 1.4; letter-spacing: -0.01em;
  text-wrap: pretty;
}
.studio-quote { padding-left: clamp(20px, 3vw, 36px); border-left: 2px solid var(--cyan); }
@media (min-width: 960px) {
  .studio-grid { grid-template-columns: 4fr 7fr; }
}

/* ---------- Community ---------- */
.community { padding-block: var(--section); }
.links { display: grid; gap: 16px; }
.link-tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 220px; padding: clamp(24px, 3.5vw, 40px);
  border-radius: 10px; text-decoration: none;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease);
}
.link-title { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); margin-top: auto; }
.link-text { max-width: 40ch; }
.link-arrow {
  position: absolute; top: clamp(24px, 3.5vw, 40px); right: clamp(24px, 3.5vw, 40px);
  font-size: 1.5rem; line-height: 1; transition: transform .25s var(--ease);
}
.link-tile:hover .link-arrow { transform: translateX(4px); }
.link-tile:hover { transform: translateY(-3px); }
.link-discord { background: var(--cyan); color: var(--ink); }
.link-discord .link-text { color: #102a33; }
.link-discord:hover { background: var(--cyan-2); }
.link-roblox { border: 1px solid var(--line); background: var(--ink-2); }
.link-roblox .link-label, .link-roblox .link-text { color: var(--muted); }
.link-roblox:hover { border-color: rgba(238, 237, 248, 0.4); }
@media (min-width: 760px) {
  .links { grid-template-columns: 3fr 2fr; }
  .link-tile { min-height: 280px; }
}

/* ---------- Contact ---------- */
.contact { padding-bottom: var(--section); }
.contact-list { border-top: 1px solid var(--line); }
.contact-list > div {
  display: grid; gap: 6px; padding-block: 24px;
  border-bottom: 1px solid var(--line);
}
.contact-list dt { color: var(--muted); }
.contact-list dd a {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.0625rem, 0.8rem + 1.6vw, 1.875rem);
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--cyan), var(--cyan)) 0 100% / 0 2px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.contact-list dd a:hover { background-size: 100% 2px; color: var(--cyan-2); }
@media (min-width: 760px) {
  .contact-list > div { grid-template-columns: 2fr 3fr; align-items: baseline; padding-block: 32px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--indigo); padding-top: clamp(48px, 6vw, 72px); font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 10px; color: var(--muted); }
.footer-h { color: var(--cyan); margin-bottom: 10px; font-size: 0.75rem; }
.site-footer ul a { display: inline-block; padding-block: 6px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.site-footer ul a:hover { color: var(--text); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-block: 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.875rem;
}
.footer-base a { color: var(--muted); padding-block: 6px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
  .footer-brand { grid-column: auto; }
}
@media (max-width: 479px) {
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}

/* ---------- Reveal on scroll (JS adds .js; skipped entirely for reduced motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ws:hover img, .link-tile:hover, .link-tile:hover .link-arrow { transform: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; align-items: center; }
.notfound .eyebrow { margin-top: 48px; }
.notfound .display { margin-top: 14px; }
.notfound .lede { margin-top: 16px; }
