/* Techarcus landing page - implements kit section 07 (1440x1520 dark + light). */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ta-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The 48px measuring grid that sits behind the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg,  var(--grid-line) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 48px);
}
.page { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.shell {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 72px);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- Logo ---------------- */

/* Arc and bar colours come from CSS custom properties set as presentation
   attributes inside the <symbol>, so they inherit through <use>. */
.glyph { flex: none; }

.wordmark {
  font-family: var(--ta-font-display);
  font-weight: 600;
  letter-spacing: var(--ta-tracking-display);
  line-height: 1;
  color: var(--text);
}

.lockup { display: flex; align-items: center; gap: 12px; }

/* Tagline - mono caps, phases always lime -> teal -> sky. */
.tagline {
  font-family: var(--ta-font-mono);
  font-weight: 600;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.tagline .design   { color: var(--design); }
.tagline .engineer { color: var(--engineer); }
.tagline .ship     { color: var(--ship); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ta-font-body);
  font-weight: 600;
  border-radius: var(--ta-radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--ship); outline-offset: 3px; }

.btn-primary { background: var(--cta-bg); color: var(--cta-text); }
.btn-primary:hover { background: var(--cta-bg-hover); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border-soft); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn-sm  { font-size: 15px; padding: 12px 24px; }
.btn-lg  { font-size: 17px; padding: 16px 32px; }

/* ---------------- Header ---------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}
.site-header .wordmark { font-size: clamp(20px, 1.7vw, 24px); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
}
/* Exclude .btn - a bare `.nav a` (0-1-1) outranks `.btn-primary` (0-1-0) and
   would repaint the CTA label in the muted nav colour. */
.nav a:not(.btn) {
  font-weight: 500;
  font-size: 16px;
  color: var(--text-muted);
  transition: color .18s ease;
}
.nav a:not(.btn):hover { color: var(--text); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--ta-radius-pill);
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--ship); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(56px, 7vw, 96px);
}
.glow {
  position: absolute;
  top: 60px;
  width: min(820px, 90vw);
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-core), var(--glow-edge), transparent);
  filter: blur(70px);
  pointer-events: none;
}
/* Everything except the glow lifts above it. Must exclude .glow, or it loses
   its absolute positioning and pushes the hero 420px down the page. */
.hero > *:not(.glow) { position: relative; }

.hero .tagline { font-size: clamp(11px, 1vw, 13px); letter-spacing: 0.22em; margin-bottom: 26px; }

.hero h1 {
  font-family: var(--ta-font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 940px;
  margin: 0;
  text-wrap: balance;
}
.hero .lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 720px;
  margin: 24px 0 0;
  text-wrap: pretty;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* ---------------- Pillars ---------------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 400px));
  justify-content: center;
  gap: 24px;
  padding-top: clamp(56px, 6.5vw, 88px);
}
.pillar {
  border: 1px solid;
  border-radius: var(--ta-radius-card);
  padding: 32px;
}
.pillar h2 {
  font-family: var(--ta-font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  margin: 20px 0 0;
}
.pillar p { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 10px 0 0; }

.pillar-design   { background: var(--card-design-bg);   border-color: var(--card-design-border); }
.pillar-design h2   { color: var(--design); }
.pillar-engineer { background: var(--card-engineer-bg); border-color: var(--card-engineer-border); }
.pillar-engineer h2 { color: var(--engineer); }
.pillar-ship     { background: var(--card-ship-bg);     border-color: var(--card-ship-border); }
.pillar-ship h2     { color: var(--ship); }

/* ---------------- Stats ---------------- */

.stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4.5vw, 64px);
  padding-top: clamp(52px, 5.5vw, 78px);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat dd {
  font-family: var(--ta-font-display);
  font-weight: 600;
  font-size: clamp(30px, 2.8vw, 40px);
  line-height: 1;
  margin: 0;
  color: var(--text);
}
.stat dt { font-size: 15px; color: var(--text-muted); }
.stat-rule { width: 1px; height: 52px; background: var(--rule); }

/* ---------------- Closing panel ---------------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 6vw, 84px);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--ta-radius-panel);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 4.5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-panel .watermark {
  position: absolute;
  right: -50px;
  top: -60px;
  width: 300px;
  height: 300px;
  opacity: var(--watermark-opacity);
  pointer-events: none;
}
.cta-copy { position: relative; display: flex; flex-direction: column; gap: 10px; }
.cta-copy h2 {
  font-family: var(--ta-font-display);
  font-weight: 600;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.2;
  margin: 0;
}
.cta-copy p { font-size: 17px; color: var(--text-muted); margin: 0; }
.cta-panel .btn { position: relative; flex: none; }

/* ---------------- Footer ---------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: clamp(40px, 4.5vw, 60px);
  padding-bottom: clamp(40px, 4vw, 56px);
}
.site-footer .lockup { gap: 10px; }
.site-footer .wordmark { font-size: 17px; }
.site-footer .colophon { font-size: 14px; color: var(--text-faint); }
.site-footer .colophon a:hover { color: var(--text-muted); }

/* ---------------- Responsive ---------------- */

@media (max-width: 1080px) {
  .pillars { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--ta-radius-pill);
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
  }
  .nav {
    position: absolute;
    top: 100%;
    right: clamp(20px, 5vw, 72px);
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 200px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 8px 10px; border-radius: 8px; }
  .nav .btn { margin-top: 6px; }
  .nav .theme-toggle { width: 100%; height: 36px; margin-top: 4px; }
  .site-header { position: relative; }
  .header-tools { display: flex; align-items: center; gap: 10px; }
  .stat-rule { display: none; }
  .stats { gap: 32px 48px; }
}

@media (min-width: 861px) {
  .nav[hidden] { display: flex; }
  .header-tools { display: flex; align-items: center; gap: 14px; }
}

@media (max-width: 560px) {
  .hero .actions .btn { flex: 1 1 100%; }
  .cta-panel .btn { width: 100%; }
}
