/* DG Devs, dgdevs.com
   Editorial drafting-sheet design system. Tokens below; rationale in
   docs/superpowers/specs/2026-07-04-dgdevs-website-design.md */

:root {
  --bg: #0B0B0C;
  --fg: #F4F4F2;
  --muted: #8A8A85;
  --line: rgba(244, 244, 242, 0.14);
  --line-strong: rgba(244, 244, 242, 0.3);
  --accent: #C8FF4D;
  --ink: #0B0B0C;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --nav-h: 64px;
  --pad: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--ink); }

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

a { color: var(--fg); text-decoration: none; }

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

.mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

em, .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.accent { color: var(--accent); }

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--accent);
  color: var(--ink);
  padding: 10px 18px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- grain overlay ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 30px; height: 30px; max-width: none; flex: none; }
.brand-word {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(4px, 2vw, 20px);
  list-style: none;
}

.nav-links a:not(.nav-cta) {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 9px 8px;
  transition: color 0.18s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--fg); }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: var(--accent);
  padding: 9px 16px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-cta:hover { background: var(--fg); }

/* ---------- buttons & links ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  padding: 14px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid:hover { background: var(--fg); }

.btn-line { border-color: var(--line-strong); color: var(--fg); }
.btn-line:hover { border-color: var(--fg); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

p a {
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.18s ease, border-color 0.18s ease;
}
p a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding-top: clamp(40px, 7vh, 84px); }

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 6vh, 76px) 0 clamp(48px, 8vh, 96px);
}

h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
h1 em { font-size: 1.04em; }

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  max-width: 33em;
  margin-bottom: 36px;
}
.lede a { color: var(--fg); }

/* hero figure: drafting frame around the Remotion loop */

.hero-fig {
  position: relative;
  border: 1px solid var(--line);
  padding: 10px;
  max-width: 430px;
  justify-self: end;
  width: 100%;
}

.hero-fig video { width: 100%; height: auto; }

.hero-fig figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 12px 2px 2px;
}

.tick { position: absolute; width: 17px; height: 17px; }
.tick::before, .tick::after { content: ""; position: absolute; background: var(--muted); }
.tick::before { left: 8px; top: 0; width: 1.5px; height: 17px; }
.tick::after { left: 0; top: 8px; width: 17px; height: 1.5px; }
.tick-tl { top: -9px; left: -9px; }
.tick-tr { top: -9px; right: -9px; }
.tick-bl { bottom: -9px; left: -9px; }
.tick-br { bottom: -9px; right: -9px; }

/* ---------- marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 13px 0;
}

.marquee-track {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  animation: marquee 46s linear infinite;
}

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

/* ---------- sections ---------- */

.section { padding: clamp(72px, 11vh, 128px) 0 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: clamp(40px, 6vh, 64px);
}

.sec-idx { color: var(--accent); }

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* ---------- work / feature ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.feature-fig {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center;
}

.feature-fig img { width: clamp(110px, 12vw, 150px); }

h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  font-size: 0.68rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.feature-role { color: var(--muted); margin-bottom: 20px; }

.feature-body > p:not(.mono) {
  color: var(--muted);
  max-width: 38em;
  margin-bottom: 26px;
}

.lab-line {
  margin-top: clamp(40px, 6vh, 60px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.lab-line a { color: var(--fg); border-bottom: 1px solid var(--line-strong); }
.lab-line a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- capabilities index list ---------- */

.index-list { list-style: none; border-top: 1px solid var(--line); }

.index-list li {
  display: grid;
  grid-template-columns: 80px minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: clamp(22px, 3.4vh, 34px) 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.22s ease, color 0.22s ease;
}

.index-list .num { color: var(--muted); transition: color 0.22s ease; }
.index-list h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); margin: 0; }
.index-list p { color: var(--muted); font-size: 0.98rem; transition: color 0.22s ease; }

.index-list li:hover {
  background: var(--accent);
  color: var(--ink);
}
.index-list li:hover .num,
.index-list li:hover p { color: rgba(11, 11, 12, 0.72); }

/* ---------- studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.studio-copy p {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  max-width: 30em;
  margin-bottom: 22px;
}
.studio-copy .serif { color: var(--fg); font-size: 1.06em; }

.spec { border-top: 1px solid var(--line); }
.spec > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--muted); text-transform: uppercase; }
.spec dd a { border-bottom: 1px solid var(--line-strong); }
.spec dd a:hover { color: var(--accent); border-color: var(--accent); }

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

.section-contact { padding-bottom: clamp(80px, 12vh, 140px); }

.contact-big {
  font-size: clamp(2.6rem, 7.4vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.contact-big em { font-size: 1.04em; }

.section-contact .lede { margin-bottom: 34px; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 26px;
  padding-bottom: 10px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
}
.footer-links a { color: var(--muted); transition: color 0.18s ease; }
.footer-links a:hover { color: var(--fg); }
.footer-note { color: var(--muted); }

.footer-word {
  font-weight: 700;
  font-size: clamp(5.4rem, 17.5vw, 15rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
  margin-bottom: -0.16em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 242, 0.22);
  user-select: none;
}
@supports not (-webkit-text-stroke: 1px black) {
  .footer-word { color: rgba(244, 244, 242, 0.07); }
}

/* ---------- reveal on scroll (gated behind .js; no-JS users see everything) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .status-dot { animation: none; }
  .btn, .nav-cta, .index-list li { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-fig { justify-self: start; }
  .studio-grid { grid-template-columns: 1fr; }
  .index-list li { grid-template-columns: 56px 1fr; }
  .index-list p { grid-column: 2; }
}

@media (max-width: 640px) {
  .hero-meta-right { display: none; }
  .brand-word { display: none; }
  .nav-links { gap: 2px; }
  .nav-links a:not(.nav-cta) {
    padding: 8px 6px;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }
  .nav-cta {
    padding: 8px 12px;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }
  .feature { grid-template-columns: 1fr; }
  .feature-fig { min-height: 240px; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .index-list li { grid-template-columns: 1fr; gap: 8px; padding-left: 4px; padding-right: 4px; }
  .index-list p { grid-column: 1; }
  .spec > div { grid-template-columns: 88px 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 374px) {
  .nav-inner { padding-left: 14px; padding-right: 14px; }
  .nav-links { gap: 0; }
  .nav-links a:not(.nav-cta) {
    padding: 8px 4px;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
  }
  .nav-cta {
    padding: 8px 10px;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
  }
}
