/* Rift Digital: Option A "Modern Tech" palette */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cyan: #00C6FF;
  --purple: #7A3BFF;
  --purple-text: #9B70FF; /* lighter purple for gradient text (contrast on --bg) */
  --bg: #0B0F1A;
  --surface: #1A1F2B;
  --text: #F8FAFC;
  --muted: #A9B1C3;
  --line: rgba(248, 250, 252, 0.1);
  --grad: linear-gradient(120deg, var(--cyan), var(--purple));
  --grad-text: linear-gradient(100deg, var(--cyan), var(--purple-text));
  --radius: 14px;
  --wrap: 1120px;
  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--cyan); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; 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: 16px; top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap; min-height: 72px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.nav a {
  color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  opacity: 0.82; padding: 6px 0; display: inline-block;
}
.nav a:hover { opacity: 1; color: var(--cyan); }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 112px 0 168px; text-align: center; }
.hero::before { /* faint grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(248,250,252,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,250,252,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute; left: 50%; bottom: 0; width: 100%; height: 100%; transform: translateX(-50%); z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), transparent);
}
.hero-glow::before { /* soft bloom */
  content: ""; position: absolute; left: 50%; bottom: -40%; width: 140%; height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%, rgba(122,59,255,.45), rgba(0,198,255,.18) 40%, transparent 70%);
  filter: blur(20px);
}
.hero-glow::after { /* the arc */
  content: ""; position: absolute; left: 50%; bottom: -1180px; width: 2200px; height: 1300px;
  transform: translateX(-50%);
  border-radius: 50%;
  border-top: 2px solid rgba(120, 170, 255, 0.85);
  box-shadow: 0 -8px 40px rgba(0,198,255,.35), 0 -2px 120px rgba(122,59,255,.55), inset 0 10px 60px rgba(122,59,255,.35);
  background: radial-gradient(ellipse at 50% 0%, rgba(40,30,90,.9), var(--bg) 45%);
}
.hero-inner { max-width: 880px; }
.eyebrow, .kicker {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.kicker { color: var(--cyan); margin-bottom: 12px; }
h1 { font-size: clamp(2.25rem, 1.2rem + 5vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; }
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lede { color: var(--muted); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); max-width: 620px; margin: 24px auto 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 8px 30px rgba(122, 59, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(0, 198, 255, 0.35); }
.btn-ghost { color: var(--text); border: 1px solid rgba(248,250,252,.22); background: rgba(248,250,252,.03); }
.btn-ghost:hover { border-color: var(--cyan); }

/* Sections */
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); font-weight: 700; }
.section-lede { color: var(--muted); max-width: 640px; margin-top: 16px; }
h3 { font-size: 1.25rem; font-weight: 700; }

.cards { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--surface); border-radius: var(--radius);
  padding: 32px 28px; border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(0, 198, 255, 0.4); transform: translateY(-2px); }
.card p { color: var(--muted); margin-top: 10px; font-size: 1rem; }
.icon { width: 44px; height: 44px; margin-bottom: 22px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Work */
.work-card {
  margin-top: 40px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.work-media {
  display: grid; place-items: center; padding: 40px;
  background: radial-gradient(circle at 50% 45%, rgba(0,198,255,.16), transparent 65%), #10141F;
  border-right: 1px solid var(--line);
}
.work-media img { width: 100%; max-width: 300px; }
.work-body { padding: 40px; }
.work-meta { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.work-body h3 { font-size: 1.75rem; margin: 6px 0 14px; }
.work-body > p:not(.work-meta) { color: #D5DAE4; }
.ticks { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); font-size: 1rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px;
  border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg);
}
.link-arrow { font-weight: 600; text-decoration: none; color: var(--cyan); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Approach */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.step { padding: 28px 4px 0; border-top: 2px solid transparent; border-image: var(--grad) 1; }
.step-num {
  display: block; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2em; margin-bottom: 12px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step p { color: var(--muted); margin-top: 10px; font-size: 1rem; }

/* Contact */
.contact-panel {
  position: relative; overflow: hidden; text-align: center;
  padding: 72px 28px; border-radius: 20px; border: 1px solid rgba(122,59,255,.35);
  background:
    radial-gradient(ellipse 80% 120% at 50% 120%, rgba(122,59,255,.35), transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(0,198,255,.12), transparent 60%),
    var(--surface);
}
.contact-panel p:not(.kicker) { color: #D5DAE4; max-width: 560px; margin: 16px auto 0; font-size: 1.125rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-inner { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.875rem; }
.footer-inner img { width: 28px; height: 28px; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .work-card { grid-template-columns: 1fr; }
  .work-media { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px; }
  .work-media img { max-width: 220px; }
}
@media (max-width: 640px) {
  .header-inner { justify-content: center; min-height: 0; padding-top: 12px; padding-bottom: 6px; }
  .brand img { height: 34px; }
  .nav ul { justify-content: center; gap: 0 22px; }
  .hero { padding: 72px 0 128px; }
  .section { padding: 72px 0; }
  .work-body { padding: 28px 22px; }
  .card { padding: 28px 22px; }
  .contact-panel { padding: 56px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 360px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .eyebrow { letter-spacing: 0.16em; font-size: 0.75rem; }
  .nav ul { gap: 0 16px; }
  .nav a { font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .btn-primary:hover { transform: none; }
}

section[id] { scroll-margin-top: 80px; }
@media (max-width: 640px) {
  .site-header { position: static; }
  section[id] { scroll-margin-top: 0; }
}
