@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #080808;
  color: #fff;
  overflow-x: hidden;
}

:root {
  --accent:   #9E1428;
  --accent2:  #C23240;
  --grad:     linear-gradient(135deg, #9E1428 0%, #C23240 100%);
  --surface:  #101010;
  --surface2: #181818;
  --muted:    #777;
  --border:   rgba(255,255,255,0.07);
}

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 4rem;
  background: rgba(8,8,8,0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1.35rem; font-weight: 900; letter-spacing: .18em;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a {
  color: #888; text-decoration: none; font-size: .9rem;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: color .2s; position: relative;
}
.nav-links a:not(.nav-cta) { padding-bottom: 2px; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--grad); border-radius: 1px;
}
.nav-cta {
  background: var(--grad); color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: .6rem 1.5rem; border-radius: 8px;
  display: inline-flex; align-items: center; line-height: 1;
}
.nav-cta.active::after { display: none !important; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--grad); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .9rem;
  padding: .85rem 2rem; border-radius: 8px;
  transition: opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .8; transform: translateY(-2px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #ccc; text-decoration: none; font-weight: 500; font-size: .9rem;
  padding: .85rem 1.5rem; border-radius: 8px; border: 1px solid var(--border);
  transition: border-color .2s, background .2s, color .2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); color: #fff; }

/* ── SECTION COMMONS ─────────────────────────────── */
.section { padding: 7rem 4rem; }
.section-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .25em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .9rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 900;
  letter-spacing: -.025em; line-height: 1.08;
}
.section-title span {
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.divider { height: 1px; background: var(--border); margin: 0 4rem; }

/* ── BRANCH CARDS (main page) ────────────────────── */
.branch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-top: 4rem;
}
.branch-card {
  border-radius: 1.5rem; overflow: hidden; position: relative;
  aspect-ratio: 2/3; display: block; text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .4s cubic-bezier(.2,.8,.3,1), border-color .3s;
}
.branch-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,.12); }
.branch-bg {
  position: absolute; inset: 0;
  transition: transform .6s cubic-bezier(.2,.8,.3,1);
}
.branch-card:hover .branch-bg { transform: scale(1.04); }
.branch-bg-games  { background: linear-gradient(160deg, #130005 0%, #3a000f 40%, #720020 75%, #9e1428 100%); }
.branch-bg-arch   { background: linear-gradient(160deg, #0f0800 0%, #3a2200 40%, #7a5000 75%, #c88000 100%); }
.branch-bg-indust { background: linear-gradient(160deg, #001018 0%, #002a45 40%, #005575 75%, #009ab0 100%); }
.branch-wire {
  position: absolute; inset: 0; opacity: .1;
  background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(450px) rotateX(25deg) scale(1.8);
  transform-origin: bottom;
}
.branch-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.7) 30%, rgba(0,0,0,.95) 100%);
}
.branch-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }
.branch-overlay h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.01em; }
.branch-overlay p { color: var(--muted); font-size: .85rem; line-height: 1.65; margin-bottom: 1.25rem; }
.branch-link {
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; opacity: .45; display: inline-flex; align-items: center; gap: .4rem;
  transition: opacity .2s;
}
.branch-card:hover .branch-link { opacity: 1; }
.branch-arrow-icon {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: rgba(255,255,255,.35);
  transition: background .3s, color .3s, border-color .3s;
}
.branch-card:hover .branch-arrow-icon {
  background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25);
}

/* ── TOOLS MARQUEE ───────────────────────────────── */
.marquee-wrap {
  overflow: hidden; margin-top: 3.5rem;
  mask-image: linear-gradient(90deg, transparent, #fff 8%, #fff 92%, transparent);
}
.marquee-track {
  display: flex; align-items: center; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  padding: .6rem 2rem; font-size: .875rem; font-weight: 600;
  color: #444; letter-spacing: .03em; white-space: nowrap;
  transition: color .2s; cursor: default;
}
.marquee-item:hover { color: #999; }
.marquee-sep { width: 1px; height: 18px; background: rgba(255,255,255,.08); flex-shrink: 0; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── CTA SECTION ─────────────────────────────────── */
.cta-section {
  text-align: center; background: var(--surface);
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(158,20,40,.1) 0%, transparent 65%);
  pointer-events: none;
}
.cta-section h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 900;
  letter-spacing: -.03em; margin-bottom: 1.5rem; line-height: 1.1; position: relative;
}
.cta-section h2 span {
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.cta-section > p {
  color: var(--muted); font-size: 1.05rem; max-width: 44ch;
  margin: 0 auto 3rem; line-height: 1.75; position: relative;
}

/* ── PORTFOLIO GRID (sub-pages) ──────────────────── */
.port-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-top: 3.5rem;
}
.port-card {
  border-radius: 1.25rem; overflow: hidden; position: relative;
  aspect-ratio: 4/3; background: var(--surface2); border: 1px solid var(--border);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), border-color .3s;
}
.port-card:hover { transform: translateY(-6px); }
.port-bg { position: absolute; inset: 0; }
.port-wire {
  position: absolute; inset: 0; opacity: .1;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 36px 36px;
  transform: perspective(380px) rotateX(28deg) scale(1.6);
  transform-origin: bottom;
}
.port-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.port-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; margin-bottom: .35rem;
}
.port-overlay h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.port-tools { display: flex; gap: .35rem; flex-wrap: wrap; }
.port-tool {
  font-size: .62rem; background: rgba(255,255,255,.08);
  padding: .18rem .55rem; border-radius: 100px; color: #aaa;
}

/* ── PAGE HERO (sub-pages) ───────────────────────── */
.page-hero {
  padding: 10rem 4rem 6rem; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero .hero-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .25em;
  text-transform: uppercase; margin-bottom: 1.2rem; display: block;
}
.page-hero h1 {
  font-size: clamp(2.8rem, 8vw, 7rem); font-weight: 900;
  letter-spacing: -.04em; line-height: .95; margin-bottom: 1.75rem;
}
.page-hero p {
  color: var(--muted); font-size: 1.05rem; max-width: 52ch; line-height: 1.75;
}
.page-hero-glow {
  position: absolute; top: -30%; right: -5%;
  width: 55vw; height: 55vw; border-radius: 50%; pointer-events: none;
  z-index: 2;
}
.page-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.page-hero-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.page-hero > .hero-label, .page-hero > h1, .page-hero > p { position: relative; z-index: 2; }

/* full-viewport video hero (Digic-style) */
.page-hero--video {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 6rem; padding-bottom: 6rem;
}
.page-hero--video::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(transparent, #080808);
  z-index: 1; pointer-events: none;
}

/* ── FOOTER ──────────────────────────────────────── */
footer { padding: 3.5rem 4rem; border-top: 1px solid var(--border); }
.footer-main {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 2rem; margin-bottom: 2.5rem;
}
.footer-logo {
  font-size: 1.2rem; font-weight: 900; letter-spacing: .18em;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.footer-nav { display: flex; gap: 2rem; list-style: none; justify-content: center; }
.footer-nav a {
  color: var(--muted); text-decoration: none; font-size: .78rem;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; transition: color .2s;
}
.footer-nav a:hover { color: #fff; }
.footer-social { display: flex; gap: .8rem; justify-content: flex-end; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 700;
  transition: border-color .2s, color .2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .75rem;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .section { padding: 5rem 1.5rem; }
  .divider { margin: 0 1.5rem; }
  .branch-grid { grid-template-columns: 1fr; }
  .branch-card { aspect-ratio: 3/2; }
  .port-grid { grid-template-columns: 1fr; }
  footer { padding: 2.5rem 1.5rem; }
  .footer-main { grid-template-columns: 1fr; text-align: center; }
  .footer-social { justify-content: center; }
  .footer-nav { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
  .page-hero { padding: 8rem 1.5rem 4rem; }
}
