/* ==========================================================================
   Puppet Dev Studios — landing page
   Dark, dev-grade. Single electric accent. Geist grotesque.
   Design tokens first, then components top-to-bottom.
   ========================================================================== */

:root {
  /* Color */
  --bg: #0B0B0F;
  --surface: #14141A;
  --surface-hover: #16161D;
  --badge-bg: #101016;
  --text: #F5F6F8;
  --text-body: #B6BAC2;
  --text-muted: #8A8F98;
  --text-faint: #6A6F78;
  --accent: #5B8CFF;

  /* Hairlines */
  --line-1: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.09);

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 70px;

  /* Type */
  --font-sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- Reset / base ---------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01';
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

canvas { display: block; }

a { color: inherit; }

/* Accessibility: visible focus + skip link */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* The skip-link target is programmatically focusable; don't box the whole region. */
#main:focus { outline: none; }

/* --- Layout helpers -------------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --- Scroll reveal --------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.22, .65, .2, 1),
              transform .9s cubic-bezier(.22, .65, .2, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Brand lockup (header / hero / footer) --------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 72%),
    var(--badge-bg);
  display: grid;
  place-items: center;
  flex: none;
}
.brand__mark svg { display: block; }

.brand__mark--lg {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 72%),
    var(--badge-bg);
  box-shadow: 0 0 40px -10px color-mix(in srgb, var(--accent) 50%, transparent);
}

.brand__mark--sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%),
    var(--badge-bg);
}

.brand__name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand__name span { color: var(--text-muted); font-weight: 400; }

.brand__name--lg {
  font-size: clamp(19px, 3vw, 24px);
  letter-spacing: -0.02em;
}

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 15, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 13px;
  padding-bottom: 13px;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 30px);
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.nav a:hover { color: var(--text); }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(900px, 94vh);
  display: flex;
  align-items: center;
  scroll-margin-top: var(--header-h);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 420px;
  max-width: 100%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}
.hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 46%, rgba(11, 11, 15, 0) 0%, rgba(11, 11, 15, 0.5) 66%, #0B0B0F 100%);
  pointer-events: none;
}
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(11, 11, 15, 0), #0B0B0F);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 96px;
  padding-bottom: 96px;
}
.hero__lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.hero__title {
  margin: 0;
  font-size: clamp(42px, 8.4vw, 96px);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.hero__sub {
  margin: 30px 0 0;
  max-width: 660px;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.55;
  color: var(--text-body);
}
.hero__cta-row {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Eyebrow used in the hero (rule | label | rule) */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.hero-eyebrow__rule {
  width: 24px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}
.hero-eyebrow__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  padding: 13px 22px;
  border-radius: 10px;
  transition: background .25s, border-color .25s;
}
.btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent);
}
.btn__arrow { font-family: var(--font-mono); }

/* --- Generic section ------------------------------------------------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scroll-margin-top: var(--header-h);
}
.section--pad {
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(80px, 12vh, 140px);
}
.section--cap {
  padding-bottom: clamp(80px, 12vh, 140px);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.section-eyebrow__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.section-eyebrow__rule {
  width: 18px;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}
.section-eyebrow__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.section-title--wide { max-width: 860px; }
.section-title--cap { margin-bottom: clamp(28px, 4vw, 44px); }

.section-intro {
  margin: 24px 0 0;
  max-width: 680px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-body);
}

/* --- Approach pillars ------------------------------------------------------ */
.pillars {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--line-1);
  border-radius: 16px;
  padding: clamp(24px, 2.6vw, 32px);
  transition: border-color .3s, background .3s;
}
.pillar:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: var(--surface-hover);
}
.pillar__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.pillar h3 {
  margin: 16px 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pillar p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --- Capabilities list ----------------------------------------------------- */
.cap-list { border-top: 1px solid var(--line-2); }
.cap-row {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 4vw, 40px);
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
  transition: background .2s;
}
.cap-row:hover { background: rgba(255, 255, 255, 0.015); }
.cap-row__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  flex: none;
  width: 34px;
}
.cap-row__name {
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  flex: 1 1 220px;
}
.cap-row__desc {
  font-size: 15px;
  color: var(--text-muted);
  flex: 1 1 200px;
}

/* --- Contact --------------------------------------------------------------- */
.contact {
  position: relative;
  border-top: 1px solid var(--line-1);
  scroll-margin-top: var(--header-h);
}
.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(80px, 14vh, 160px);
  padding-bottom: clamp(80px, 14vh, 160px);
}
.contact__line {
  margin: 0;
  max-width: 560px;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.contact__email {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity .2s;
}
.contact__email:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line-1);
  background: var(--bg);
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.footer-brand { max-width: 300px; }
.footer-brand__lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}
.footer-brand p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.footer-cols {
  display: flex;
  gap: clamp(40px, 8vw, 80px);
  flex-wrap: wrap;
}
.footer-col__head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col__list span { font-size: 14px; color: var(--text-body); }
.footer-col__list a {
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  transition: color .2s;
}
.footer-col__list a:hover { color: var(--text); }
.footer-col__list .muted {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}
.site-footer__bottom { padding-bottom: clamp(30px, 4vw, 44px); }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
