/* ---------- fonts (self-hosted, SIL OFL, see /assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2");
}

/* ---------- tokens ---------- */
/* TechStone brand: monochrome. Ink #020205, paper #f2f4f7. No accent hue. */
:root {
  --bg: #020205;
  --bg-elev: #0a0a0e;
  --bg-card: #0e0e13;
  --line: #1e1e25;
  --line-strong: #2e2e37;
  --fg: #f2f4f7;
  --fg-muted: #a4a7b0;
  --fg-dim: #6e717b;
  --accent: #f2f4f7;
  --accent-ink: #020205;
  --grid: rgba(242, 244, 247, 0.045);
  --glow: rgba(242, 244, 247, 0.09);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1080px;
  --radius: 14px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f4f7;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --line: #dfe2e8;
    --line-strong: #c3c7cf;
    --fg: #020205;
    --fg-muted: #4a4d57;
    --fg-dim: #6b6e77;
    --accent: #020205;
    --accent-ink: #f2f4f7;
    --grid: rgba(2, 2, 5, 0.055);
    --glow: rgba(2, 2, 5, 0.06);
    color-scheme: light;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.place {
  text-decoration: underline dotted;
  text-underline-offset: 0.25em;
}

.place:hover {
  color: var(--fg);
  text-decoration-style: solid;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}

section {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 2rem;
  max-width: 28ch;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 26px;
  height: 30px;
  color: var(--fg);
  flex-shrink: 0;
}

.brand .accent {
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
  paint-order: stroke fill;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  color: var(--fg-muted);
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-links .cta {
  color: var(--fg);
  font-weight: 500;
}

@media (max-width: 640px) {
  .nav-links li:not(:last-child) {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  border-top: 0;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 80%;
  background: radial-gradient(55% 60% at 50% 40%, var(--glow), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero .hero-mark {
  width: clamp(120px, 22vw, 200px);
  height: auto;
  aspect-ratio: 82 / 100;
  color: var(--fg);
  margin-bottom: 1.8rem;
}

.hero h1 {
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 1.2rem;
}

.hero h1 .accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--fg);
  paint-order: stroke fill;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--fg-muted);
  max-width: 46ch;
  margin-bottom: 1.4rem;
}

.hero .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  color: var(--fg-dim);
  margin-bottom: 2rem;
}

.hero .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero .meta .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fg) 18%, transparent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--fg-dim);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.card h3 {
  line-height: 1.3;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.93rem;
  color: var(--fg-muted);
  margin: 0;
}

.card .icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  background: color-mix(in srgb, var(--fg) 10%, transparent);
  border: 1px solid var(--line-strong);
  color: var(--fg);
}

.card .icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- services ---------- */
.services .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.services .featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  padding: 1.8rem 1.8rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.services .featured .icon {
  margin: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent-ink) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent-ink) 25%, transparent);
}

.services .featured .icon svg {
  width: 26px;
  height: 26px;
}

.services .featured .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.services .featured h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin: 0;
}

.services .featured p {
  color: var(--accent-ink);
  opacity: 0.75;
  font-size: 1rem;
  margin-top: 0.4rem;
}

@media (max-width: 900px) {
  .services .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services .grid {
    grid-template-columns: 1fr;
  }

  .services .featured {
    grid-template-columns: 1fr;
  }
}

/* ---------- leadership ---------- */
.leader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  max-width: 640px;
}

.leader h3 {
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.leader p {
  margin: 0;
  color: var(--fg-muted);
}

/* ---------- contact ---------- */
.contact .actions {
  justify-content: flex-start;
}

.contact p {
  color: var(--fg-muted);
  max-width: 52ch;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  color: var(--fg-dim);
  font-size: 0.88rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

footer .legal {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

footer .legal strong {
  color: var(--fg-muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

footer a:hover {
  color: var(--fg);
}

/* ---------- 404 ---------- */
.notfound .container {
  align-items: flex-start;
  text-align: left;
}

.notfound h1 {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
