/* ==========================================================================
   Silicartz: 3D generalist & animator portfolio
   Dark game-studio look: near-black, yellow + blue accents, heavy display type.
   ========================================================================== */

/* Colour tokens. The admin Settings page can override yellow, blue, ink, bg, panel, header, text and muted
   for the public site (an inline :root style in _Layout); these values are the defaults. */
:root {
  --yellow: #ffd900;
  --blue: #019ce0;
  --ink: #1a1a1a;
  --bg: #0b0b0d;
  --panel: #1b1b1d;
  --header: #000000;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a8a8ad;

  --font-display: "Archivo Black", "Arial Black", Arial, sans-serif;
  --font-title: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: Arial, Helvetica, sans-serif;

  --header-h: 88px;
  --wrap: 1280px;
  --gutter: 32px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.yellow { color: var(--yellow); }
.blue { color: var(--blue); }

/* Diagonal line texture used behind dark sections */
.textured {
  background:
    repeating-linear-gradient(135deg, transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 48px),
    linear-gradient(180deg, var(--panel) 0%, color-mix(in srgb, var(--bg) 55%, #000) 100%);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--header);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main {
  padding-top: var(--header-h);
}

.logo {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo-a {
  color: var(--yellow);
}

.logo-b {
  color: var(--blue);
}

.logo small {
  color: var(--text);
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--blue);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--yellow);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 34px;
  height: 2px;
  margin: 8px auto;
  background: var(--blue);
  transition: transform 0.25s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Buttons & small type ---------- */

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 2px solid transparent;
  font: 700 14px/1.2 var(--font-body);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn-yellow:hover {
  background: #fff;
}

.btn-outline {
  border-color: var(--yellow);
  background: transparent;
  color: var(--yellow);
}

.btn-outline:hover {
  background: var(--yellow);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--yellow);
}

.btn-dark:hover {
  background: #000;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 36px;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}

.big-title {
  margin: 0 0 40px;
  font: 400 clamp(48px, 5vw, 72px)/1 var(--font-title);
  text-align: center;
}

.link-arrow {
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
}

.section--tight {
  padding-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px;
}

.section-head .section-title {
  margin-bottom: 0;
}

/* ---------- Placeholder 3D render ----------
   Stands in for real artwork: a lit primitive on a coloured floor glow.
   Colours come from --c1 (object) and --c2 (floor light). */

.art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 45% at 50% 100%, color-mix(in srgb, var(--c2) 60%, transparent), transparent 70%),
    linear-gradient(170deg, #17181c 0%, #060607 100%);
}

.art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: 38%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%,
      color-mix(in srgb, var(--c1) 30%, #fff) 0%,
      var(--c1) 32%,
      color-mix(in srgb, var(--c1) 35%, #000) 78%);
  box-shadow: 0 0 70px color-mix(in srgb, var(--c1) 30%, transparent);
}

.art::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 70%;
  width: 34%;
  height: 7%;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  filter: blur(10px);
}

/* Vary the primitive so a grid of placeholders doesn't look identical */
.tile:nth-child(3n + 2) .art::before {
  width: 30%;
  border-radius: 16%;
  rotate: 45deg;
}

.tile:nth-child(3n) .art::before {
  background: radial-gradient(circle,
      transparent 40%,
      color-mix(in srgb, var(--c1) 35%, #000) 41%,
      var(--c1) 54%,
      color-mix(in srgb, var(--c1) 35%, #000) 69%,
      transparent 70%);
  box-shadow: none;
  rotate: 1 0 0 62deg;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  height: min(72vh, 720px);
  min-height: 360px;
  overflow: hidden;
  background: #050507;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, color-mix(in srgb, var(--blue) 35%, transparent), transparent 70%),
    linear-gradient(180deg, #030304 0%, #0a0f15 100%);
}

.hero-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 60%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--blue) 55%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--blue) 55%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 15%, transparent 85%);
  animation: floor-move 3s linear infinite;
}

.hero-orb {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(30vw, 300px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%,
      color-mix(in srgb, var(--yellow) 25%, #fff) 0%,
      var(--yellow) 28%,
      color-mix(in srgb, var(--yellow) 55%, #000) 72%,
      color-mix(in srgb, var(--yellow) 15%, #000) 100%);
  box-shadow: 0 0 140px color-mix(in srgb, var(--yellow) 35%, transparent);
  animation: float 6s ease-in-out infinite;
}

.hero-note {
  position: absolute;
  right: var(--gutter);
  bottom: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes floor-move {
  to { background-position: 0 64px; }
}

@keyframes float {
  50% { transform: translateY(-16px); }
}

/* ---------- Home: intro ---------- */

.intro {
  padding: 80px 0 96px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.display > span {
  display: block;
}

.amp {
  font-size: 0.6em;
  vertical-align: 0.15em;
}

.intro-copy p {
  margin: 0 0 18px;
}

.intro-copy .lead {
  margin-bottom: 26px;
  font-size: 19px;
  font-weight: 700;
}

/* ---------- Home: stats band ---------- */

.stats {
  padding: 34px 0;
  background: var(--yellow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  color: var(--blue);
}

.stat strong {
  display: block;
  font: 400 clamp(52px, 5vw, 74px)/1 var(--font-title);
}

.stat span {
  font-size: 15px;
  font-weight: 700;
}

/* ---------- Home: service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
}

.card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 26px 30px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.card-body p {
  flex: 1;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Project tiles (home + portfolio) ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.tile {
  --c1: var(--yellow);
  --c2: var(--blue);
  position: relative;
  aspect-ratio: 16 / 15;
  overflow: hidden;
  background: #111;
}

.tile[hidden] {
  display: none;
}

.tile > img,
.tile > .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 38%, transparent 62%);
  pointer-events: none;
}

.tile-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tile-link:focus-visible {
  outline-offset: -4px;
}

.tile-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile:hover > img,
.tile:hover > .art {
  transform: scale(1.06);
}

.tile-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 1;
  /* Always light: it sits on the dark gradient over the image, whatever the text colour setting is. */
  color: #fff;
}

.tile-meta {
  color: var(--yellow);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile-title {
  margin: 2px 0 0;
  font: 400 clamp(26px, 2.3vw, 34px)/1 var(--font-title);
  letter-spacing: 0.02em;
}

.tile-credit {
  display: block;
  margin-top: 4px;
  color: #c9c9ce;
  font-size: 12px;
}

/* ---------- Home: tools marquee ---------- */

.tools {
  padding: 88px 0;
  background: var(--header);
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marquee-list li {
  padding: 0 30px;
  color: var(--muted);
  font: 400 clamp(30px, 3vw, 44px)/1 var(--font-title);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.2s;
}

.marquee-list li::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 60px;
  vertical-align: 0.3em;
  background: var(--yellow);
  rotate: 45deg;
}

.marquee-list li:hover {
  color: var(--text);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Home: callout ---------- */

.callout {
  padding: 48px 56px;
  border-left: 4px solid var(--yellow);
  background: var(--panel);
}

.callout h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
}

.callout p {
  max-width: 60ch;
  margin: 0 0 28px;
  color: var(--muted);
}

/* ---------- Inner page hero (Portfolio, About) ---------- */

.page-hero {
  padding: 40px 0 24px;
  overflow: hidden;
}

.mega {
  margin: 0;
  color: var(--yellow);
  font: 700 clamp(64px, 14.5vw, 220px)/0.9 var(--font-body);
  letter-spacing: -0.03em;
  text-align: center;
}

.mega-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 4px;
}

.mega-sub {
  margin: 0 0 0 auto;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1;
  text-align: right;
}

/* ---------- Portfolio: filter bar ---------- */

.filter-bar {
  margin-bottom: 0;
  background: var(--panel);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
}

.filter {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 15px/1.4 var(--font-body);
  cursor: pointer;
}

.filter:hover {
  color: var(--yellow);
}

.filter.is-active {
  color: var(--yellow);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.empty {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

/* ---------- About ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #111;
}

.split-copy p:not(.eyebrow) {
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--text) 86%, var(--bg));
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding-top: 20px;
  border-top: 2px solid var(--yellow);
}

.step-number {
  color: var(--blue);
  font: 400 48px/1 var(--font-title);
}

.step h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.timeline-period {
  color: var(--yellow);
  font: 400 30px/1 var(--font-title);
  letter-spacing: 0.02em;
}

.timeline-item h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.timeline-place {
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.timeline-item p {
  max-width: 70ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.site-footer {
  padding: 72px 0 28px;
  background: var(--yellow);
  color: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.15;
}

.footer-lead {
  margin: 0;
  font-size: 16px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-contact .btn {
  font-size: 16px;
}

.footer-link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-bottom {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 76px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    gap: 8px;
    padding: 32px var(--gutter);
    background: var(--header);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav a {
    font: 400 44px/1.2 var(--font-title);
    letter-spacing: 0.02em;
  }

  .logo-word {
    font-size: 26px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .intro-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split-media {
    aspect-ratio: 16 / 11;
  }

  .callout {
    padding: 36px 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .intro {
    padding: 56px 0 64px;
  }

  .stats-grid,
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    row-gap: 28px;
  }

  .tile-info {
    left: 12px;
    right: 12px;
    bottom: 10px;
  }

  .tile-title {
    font-size: 22px;
  }

  .tile-meta {
    font-size: 10px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 22px;
    scrollbar-width: none;
  }

  .filter {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
