/* ═══════════════════════════════════════════════════════════
   Preteridea — corporate site
   Deliberately quiet: one accent colour, hairline rules,
   monospaced numerals. The product site can shout; this one
   only has to be true and legible.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0b0d;
  --bg-2: #101014;
  --panel: #131318;
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.055);
  --text: #e9e9ec;
  --text-soft: #9a9ba3;
  --text-faint: #6a6b74;
  --accent: #7d8cff;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1040px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(125, 140, 255, 0.3); }

/* A hairline of accent at the very top — the only decoration on the page. */
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.55; z-index: 100;
}

a { color: var(--text); }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px clamp(20px, 5vw, 40px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 16.5px;
  letter-spacing: 0.01em;
}
.brand-mark { display: block; }
.brand-mark.sm { opacity: 0.75; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); }
.nav-links a {
  color: var(--text-soft); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.lang-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-soft); background: transparent;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 13px; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lang-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
@media (max-width: 620px) { .nav-links a { display: none; } }

/* ── hero ── */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(84px, 15vh, 170px) clamp(20px, 5vw, 40px) clamp(60px, 10vh, 110px);
}
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 6px 15px; margin-bottom: 32px;
}
h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.06;
  margin-bottom: 30px;
}
.hero-sub {
  font-size: clamp(16px, 1.85vw, 18.5px);
  color: var(--text-soft);
  max-width: 34em;
}

/* ── generic section ── */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) clamp(20px, 5vw, 40px);
  border-top: 1px solid var(--line-soft);
}
.section-title {
  font-size: clamp(13px, 1.4vw, 14px);
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: clamp(30px, 5vh, 48px);
}

/* ── cards ── */
.cards {
  display: grid; gap: clamp(20px, 3vw, 34px);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card-no {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-faint); margin-bottom: 18px;
}
.card h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-soft); }
.card a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(125, 140, 255, 0.35); }
.card a:hover { border-bottom-color: var(--accent); }

/* ── contact ── */
.contact { padding-bottom: clamp(70px, 12vh, 120px); }
.mail {
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 600; letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 140, 255, 0.4);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.mail:hover { color: var(--accent); border-bottom-color: var(--accent); }
.contact-sub { margin-top: 22px; font-size: 15px; color: var(--text-soft); max-width: 34em; }

/* ── footer ── */
.footer { border-top: 1px solid var(--line-soft); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 5vh, 42px) clamp(20px, 5vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px;
}
.footer-copy { font-size: 13px; color: var(--text-faint); }

/* ── projects ── */
.projects {
  display: grid; gap: clamp(18px, 2.6vw, 26px);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .projects { grid-template-columns: 1fr; } }
.project {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 30px);
  transition: border-color 0.3s var(--ease);
}
.project:hover { border-color: var(--line); }
.project-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 9px;
}
.project-head h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 10px; white-space: nowrap;
}
.tag-live { color: #8ee0b0; border-color: rgba(142, 224, 176, 0.34); }
.project .project-meta {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.07em; color: var(--text-faint);
  margin-bottom: 17px;
}
.project > p:not(.project-meta):not(.project-link) {
  font-size: 15px; color: var(--text-soft);
}
.project-link { margin-top: auto; padding-top: 22px; }
.project-link a {
  color: var(--accent); text-decoration: none; font-size: 14px;
  border-bottom: 1px solid rgba(125, 140, 255, 0.35);
}
.project-link a:hover { border-bottom-color: var(--accent); }
.project-link.pending { font-size: 13px; color: var(--text-faint); }

/* ── how we work ── */
.steps {
  list-style: none;
  display: grid; gap: clamp(20px, 3vw, 30px);
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--line); padding-top: 18px; }
.step-no {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.12em; color: var(--text-faint);
}
.step h3 { font-size: 16.5px; font-weight: 650; margin: 11px 0 8px; }
.step p { font-size: 14.5px; color: var(--text-soft); }

/* ── hero: the three-line fact strip ── */
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 14px clamp(26px, 4vw, 46px);
  margin-top: 34px;
}
.hero-fact { display: flex; align-items: baseline; gap: 8px; }
.hero-fact b {
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 500; letter-spacing: -0.01em;
  color: var(--text);
}
.hero-fact span {
  font-size: 12.5px; letter-spacing: 0.05em;
  color: var(--text-faint);
}

/* ── section intro line ── */
.section-lead {
  font-size: 16.5px; color: var(--text-soft);
  max-width: 40em;
  margin-bottom: clamp(30px, 4.5vh, 44px);
}

/* ── product series sub-headings ── */
.series-title {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 650; letter-spacing: -0.01em;
  margin: 4px 0 6px;
}
.series-title.mt { margin-top: clamp(38px, 6vh, 58px); }
.series-sub {
  font-size: 15px; color: var(--text-soft);
  max-width: 40em; margin-bottom: 24px;
}
.projects.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .projects.two { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
