/* ==========================================================================
   Phasttek corporate site
   Design: Swiss / International Typographic Style applied to technical
   documentation. Warm paper, near-black ink, one ember accent, monospace
   metadata rail. No third-party requests, no cookies, no tracking.
   ========================================================================== */

:root {
  --paper: #f5f4ef;
  --surface: #fffefb;
  --ink: #14150f;
  --ink-2: #3c3d35;
  --ink-3: #6b6c62;
  --rule: #d9d7cd;
  --rule-ink: #14150f;
  --accent: #e4572e;
  --accent-deep: #a83c1c;
  --footer-bg: #14150f;
  --footer-ink: #eceae2;
  --footer-ink-2: #a9a89e;
  --footer-rule: #33342b;

  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(44px, 6vw, 76px);

  --font-display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(33px, 5.6vw, 60px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(22px, 2.9vw, 31px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.014em;
}

h3 {
  font-size: clamp(18px, 1.9vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-ink);
  transition: text-decoration-thickness 120ms ease, color 120ms ease;
}

a:hover {
  text-decoration-thickness: 3px;
  color: var(--accent-deep);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.94em;
}

.note {
  font-size: 15px;
  color: var(--ink-3);
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  border-top: 1px solid var(--rule);
  padding-top: clamp(30px, 4vw, 48px);
  padding-bottom: var(--section-y);
}

.section--flush {
  padding-bottom: 0;
}

.section-head {
  margin-bottom: clamp(26px, 3.4vw, 42px);
  max-width: 66ch;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background-color: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 50;
  font-family: var(--font-mono);
  font-size: 13px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.055em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

.hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(38px, 5vw, 62px);
}

.hero h1 {
  max-width: 22ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 30px;
  align-items: center;
}

.hero-actions a {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
}

.hero-actions a:hover {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

/* ---------- Signal mark ---------- */

.signal {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  flex: 0 0 auto;
  margin-top: 8px;
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  font-size: 16px;
  color: var(--ink-2);
}

/* ---------- Specification table ---------- */

.spec {
  margin: 0;
  border-top: 1px solid var(--rule-ink);
}

.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 172px) minmax(0, 1fr);
  gap: 8px 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.spec dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}

.spec dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.spec dd strong {
  font-weight: 600;
}

/* ---------- Callout ---------- */

.callout {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: clamp(20px, 2.6vw, 30px);
}

.callout h2,
.callout h3 {
  margin-bottom: 10px;
}

.callout p {
  font-size: 16px;
  color: var(--ink-2);
}

/* ---------- Prose pages ---------- */

.page-head {
  padding-top: clamp(40px, 5.5vw, 76px);
  padding-bottom: clamp(26px, 3.4vw, 42px);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  max-width: 26ch;
  margin-bottom: 16px;
}

.page-head .meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}

.prose {
  max-width: 72ch;
  padding-top: clamp(28px, 3.6vw, 46px);
  padding-bottom: var(--section-y);
}

.prose h2 {
  margin-top: clamp(32px, 4vw, 52px);
  margin-bottom: 12px;
  font-size: clamp(20px, 2.2vw, 24px);
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  margin-top: 26px;
  margin-bottom: 8px;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
  color: var(--ink-2);
}

.prose p {
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.contact-block h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-bottom: 12px;
}

.contact-block p {
  font-size: 17px;
  margin: 0;
}

.contact-block a {
  font-size: 17px;
}

address {
  font-style: normal;
  line-height: 1.6;
  color: var(--ink);
}

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

.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: clamp(30px, 4vw, 50px);
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 46px);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand .brand-word {
  color: var(--footer-ink);
}

.footer-lede {
  font-size: 16px;
  color: var(--footer-ink-2);
  max-width: 34ch;
  margin: 0;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-ink-2);
  margin: 0 0 14px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 9px;
  font-size: 15px;
}

.footer-list a,
.footer-list span {
  color: var(--footer-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--footer-rule);
  padding-bottom: 1px;
}

.footer-list a:hover {
  border-bottom-color: var(--accent);
  color: var(--footer-ink);
}

.footer-list address {
  color: var(--footer-ink);
  font-size: 15px;
  line-height: 1.6;
}

.footer-legal {
  margin-top: clamp(36px, 4.4vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--footer-rule);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  justify-content: space-between;
}

.footer-legal p {
  margin: 0;
  font-size: 13.5px;
  color: var(--footer-ink-2);
  max-width: 74ch;
}

/* ---------- Not found ---------- */

.notfound {
  padding-top: clamp(60px, 9vw, 120px);
  padding-bottom: clamp(60px, 9vw, 120px);
  max-width: 62ch;
}

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

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .split,
  .cards,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards,
  .contact-grid {
    gap: 28px;
  }

  .spec > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
    min-height: 0;
  }

  .site-nav {
    width: 100%;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  a {
    transition: none;
  }
}
