/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }

/* ─── Accent tokens ──────────────────────────────────── */
:root {
  --accent: #FFE500;
}
[data-accent="red"]  { --accent: #E8261A; }
[data-accent="blue"] { --accent: #1A5CE8; }

/* ─── Theme tokens ───────────────────────────────────── */
[data-theme="light"] {
  --bg:         #ffffff;
  --text:       #000000;
  --mid:        #888888;
  --border:     #000000;
  --card-hover: #f5f5f5;
}
[data-theme="dark"] {
  --bg:         #0a0a0a;
  --text:       #ffffff;
  --mid:        #777777;
  --border:     #333333;
  --card-hover: #111111;
}

/* ─── Base ───────────────────────────────────────────── */
body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Nav ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: #000000;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
[data-theme="dark"] .logo-mark { background: #444444; }

.logo-mark span {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.05em;
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav-links a:hover  { border-bottom-color: var(--accent); }
.nav-links a.active { border-bottom-color: var(--accent); }

/* ─── Nav accent swatches ────────────────────────────── */
.nav-accents {
  display: flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.swatch:hover  { transform: scale(1.2); }
.swatch.active { outline-color: #888888; }
.swatch-yellow { background: #FFE500; }
.swatch-red    { background: #E8261A; }
.swatch-blue   { background: #1A5CE8; }

/* ─── Theme toggle ───────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0;
  position: relative;
}
.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  position: absolute;
  transition: opacity 0.2s;
}
.icon-sun  { opacity: 0; }
.icon-moon { opacity: 1; }
[data-theme="dark"] .icon-sun  { opacity: 1; }
[data-theme="dark"] .icon-moon { opacity: 0; }

/* ─── Hamburger ──────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* ─── Mobile menu ────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu ul li { border-bottom: 1px solid var(--border); }
.mobile-menu ul li:first-child { border-top: 1px solid var(--border); }
.mobile-menu ul li a {
  display: block;
  padding: 16px 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}
.mobile-menu ul li a:hover,
.mobile-menu ul li a.active { color: var(--accent); }

.mobile-accents {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
}
.mobile-accents-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  padding: 100px 40px 80px;
  border-bottom: 1px solid var(--border);
  width: 100%;
  flex: 1;
}

.hero-inner { max-width: 960px; }

.hero-eyebrow-wrap {
  position: relative;
  height: 22px;
  margin-bottom: 14px;
  overflow: hidden;
}
.hero-eyebrow {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aaaaaa;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  white-space: nowrap;
}
[data-theme="dark"] .hero-eyebrow { color: #555555; }
.hero-eyebrow.active { opacity: 1; }

.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-rotating-word {
  color: var(--accent);
  display: inline-block;
  transition: opacity 0.4s ease-in-out;
}
.hero-rotating-word.fade { opacity: 0; }

.accent-underline {
  display: inline;
  background-image: linear-gradient(to bottom, transparent 82%, var(--accent) 82%);
  padding-bottom: 2px;
}

/* ─── Terminal subhead ───────────────────────────────── */
.hero-terminal {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(13px, 1.5vw, 16px);
  color: var(--mid);
  letter-spacing: 0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  min-height: 1.2em;
  margin-top: 4px;
}

.terminal-cursor {
  color: var(--mid);
  animation: cursor-blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Cards ──────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.card {
  padding: 28px 40px;
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: background 0.15s;
}
.card:last-child { border-right: none; }
.card:hover { background: var(--card-hover); }
.card:hover .card-label { border-bottom-color: var(--accent); }

.card-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.03em;
  color: var(--text);
  display: inline-block;
  margin-bottom: 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.card--primary .card-label {
  font-size: 48px;
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.card--primary .card-arrow { color: var(--accent); }

.card-desc {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.5;
}

.card-arrow {
  display: block;
  margin-top: 20px;
  font-size: 20px;
  color: var(--text);
}

/* ─── Shared buttons ─────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000000;
  background: var(--accent);
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  padding: 12px 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--card-hover); }

.btn-sm {
  font-size: 11px;
  padding: 8px 16px;
}

.btn-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Shared page header ─────────────────────────────── */
.page-header {
  padding: 40px 40px 32px;
  border-bottom: 1px solid var(--border);
}

.page-header-inner { max-width: 960px; }

.page-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 8px;
}

.page-desc {
  font-size: 18px;
  color: var(--mid);
  line-height: 1.6;
  max-width: 960px;
}

/* ─── Shared section typography ─────────────────────── */
.section-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.6;
  max-width: 460px;
}

/* ─── Shared email banner ────────────────────────────── */
.email-banner {
  border-bottom: 1px solid var(--border);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 160px;
}

.email-banner-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.email-banner-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}

.email-banner-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--text);
}

.email-banner-copy {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.6;
}

.email-banner-form { flex-shrink: 0; }

.email-banner-fields {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.email-banner-input {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 11px 14px;
  width: 180px;
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
  -webkit-appearance: none;
}

.email-banner-input::placeholder { color: var(--mid); }
.email-banner-input:focus { border-color: var(--accent); }

.email-banner-link {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000000;
  background: var(--accent);
  padding: 13px 24px;
  transition: opacity 0.15s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.email-banner-link:hover { opacity: 0.85; }

/* ─── Shared banner (Get in touch / CTA) ────────────── */
.hire-banner {
  border-bottom: 1px solid var(--border);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 160px;
}

.hire-banner-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.hire-banner-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hire-banner-desc {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  background: #000000;
  border-top: 1px solid #222222;
  padding: 20px 40px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 13px;
  color: #555555;
}

.footer-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-nav a {
  font-size: 13px;
  color: #555555;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.footer-nav a:hover  { color: #ffffff; }
.footer-nav a.active { color: #ffffff; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links   { display: none; }
  .nav-accents { display: none; }
  .hamburger   { display: flex; }

  .hero { padding: 60px 20px 48px; }

  .cards { grid-template-columns: 1fr; }
  .card {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }
  .card:last-child { border-bottom: none; }

  .page-header { padding: 28px 20px 24px; }
  .page-desc   { font-size: 16px; }

  .email-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 20px;
    gap: 24px;
    min-height: auto;
  }

  .email-banner-fields {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .email-banner-input { width: 100%; }

  .hire-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 20px;
    gap: 24px;
    min-height: auto;
  }

  .footer { padding: 20px; }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-nav { flex-wrap: wrap; gap: 16px; }
  .mobile-menu { top: 57px; }
}

@media (max-width: 480px) {
  .logo-name { font-size: 20px; }
  .hero-headline { font-size: clamp(48px, 13vw, 80px); }
  .card--primary .card-label { font-size: 40px; }
}
