/* Viaalink — site styles. Brand book v1.0:
   paper 70 · ink 25 · blue 4 · green 1. Blue only where something connects. */

@import url("/fonts/fonts.css");

/* Brand tokens are defined in src/lib/styles/tokens.css and loaded before site.css. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--link);
  color: var(--paper);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 520px) {
  .wrap {
    padding: 0 16px;
  }
}

/* ————— theme-aware asset helpers ————— */
.theme-dark-only {
  display: none !important;
}
[data-theme="dark"] .theme-light-only {
  display: none !important;
}
[data-theme="dark"] .theme-dark-only {
  display: block !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only {
    display: none !important;
  }
  :root:not([data-theme="light"]) .theme-dark-only {
    display: block !important;
  }
}

/* ————— skip link & focus ————— */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--link);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  background-image: none;
}
.skip-link:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

/* ————— links: blue and underlined — always. Nav links draw the
   underlink on hover, because that is a connection being made. ————— */
a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
}
nav a,
.brand-link {
  background-image: none;
}
nav a {
  background-image: linear-gradient(var(--link), var(--link));
  background-size: 0% 2px;
  transition: background-size 0.18s ease;
}
nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] {
  background-size: 100% 2px;
}

/* ————— nav ————— */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.top-nav .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: none;
  flex-shrink: 0;
}
.brand-link:hover {
  background: none;
}
.brand-link img {
  height: 24px;
  width: auto;
  display: block;
}
.brand-link .wm {
  height: 30px;
  width: auto;
  display: block;
}
.top-nav nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.top-nav nav a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  padding: 2px 0;
}
.top-nav nav a:hover,
.top-nav nav a[aria-current="page"] {
  color: var(--link);
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-switch a {
  color: var(--muted);
  background-image: none;
  padding: 1px 3px;
  font-weight: 500;
}
.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--link);
}
.lang-switch a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
}
.lang-switch .lang-sep {
  color: var(--muted);
  user-select: none;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover {
  border-color: var(--link);
  color: var(--link);
}
.theme-toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.addr-chip {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.addr-chip .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--peer);
  margin-right: 7px;
  vertical-align: 1px;
}
@media (max-width: 760px) {
  .addr-chip {
    display: none;
  }
}
@media (max-width: 680px) {
  .top-nav .wrap {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 0;
  }
  .brand-link {
    order: 1;
  }
  .brand-link .wm {
    height: 24px;
  }
  .lang-switch {
    order: 2;
    margin-left: auto;
    padding: 3px 8px;
    gap: 3px;
    font-size: 11.5px;
  }
  .theme-toggle {
    order: 2;
    padding: 4px 8px;
    gap: 5px;
    font-size: 11.5px;
  }
  .top-nav nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 6px 14px;
    flex-wrap: wrap;
    border-top: 1px solid var(--hairline);
    padding-top: 8px;
  }
  .top-nav nav a {
    font-size: 12.5px;
  }
}

/* ————— hero ————— */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--hairline);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 56px;
  align-items: center;
}
.hero-mark {
  width: 100%;
  max-width: 420px;
}
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-mark {
    max-width: 320px;
  }
}
@media (max-width: 680px) {
  .hero {
    padding: 36px 0 32px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-mark {
    display: none;
  }
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero h1 .u {
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: 100% 6px;
}
.hero .sub {
  margin-top: 22px;
  font-size: 20px;
  color: var(--ink);
  max-width: 34em;
}
.hero .sub code,
.lede code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--ink);
  background: var(--hairline);
  padding: 1px 6px;
  border-radius: 4px;
}
.hero .pillars {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.hero .pillars b {
  color: var(--ink);
  font-weight: 600;
}

/* The one motion on the page: the bronze mark arrives — a fade and a small
   rise. Progressive enhancement — the mark is fully visible by default (and
   always under prefers-reduced-motion); the motion only runs when allowed. */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark {
    animation: arrive 0.8s ease-out both;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ————— terminal proof ————— */
.terminal {
  margin-top: 40px;
  background: var(--deep-ink);
  color: var(--body-on-ink);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 22px 26px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
  overflow-x: auto;
}
.terminal .prompt {
  color: #9DA2B0;
}
.terminal .cmd {
  color: var(--fg-on-deep);
}
.terminal .live {
  color: #00A868;
}
.terminal .url {
  color: var(--link-300);
}
.terminal .cm {
  color: #9DA2B0;
}

/* ————— sections ————— */
section,
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--hairline);
}
.kicker,
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  max-width: 22em;
}
.lede {
  margin-top: 16px;
  max-width: 44em;
  color: var(--ink);
}

/* ————— reusable cards & buttons ————— */
.cards {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 860px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
.card {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 26px 28px;
  background: var(--bg-elevated);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  background-image: none;
  transition: border-color 0.18s ease;
}
a.card:hover,
a.card:focus-visible {
  border-color: var(--link);
  background-image: none;
}
.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card p {
  font-size: 15.5px;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  background-image: none;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--link);
  color: var(--link);
  background-image: none;
}
.btn-primary {
  background: var(--link);
  color: var(--paper);
  border-color: var(--link);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--link);
  color: var(--paper);
  border-color: var(--link);
  opacity: 0.92;
}

/* ————— product rows: ruled list, no cards ————— */
.rows {
  margin-top: 44px;
  border-top: 1px solid var(--hairline);
}
.row {
  display: grid;
  grid-template-columns: 64px 260px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}
.row .no {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.row h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.row .tag {
  color: var(--ink);
}
.row .meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}
.row .status {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  text-align: right;
}
.row .status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--peer);
  margin-right: 7px;
  vertical-align: 1px;
}
@media (max-width: 860px) {
  .row {
    grid-template-columns: 40px 1fr;
  }
  .row .tag {
    grid-column: 2;
  }
  .row .meta,
  .row .status {
    grid-column: 2;
    text-align: left;
  }
}

/* ————— floor plan ————— */
.plan {
  margin-top: 44px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 28px;
  background: var(--bg-elevated);
}
.plan svg {
  width: 100%;
  height: auto;
  display: block;
}
.plan .cap {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.steps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}
.step {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}
.step .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--link);
}
.step h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  margin: 6px 0 4px;
}
.step p {
  font-size: 15px;
  color: var(--muted);
}
.step code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--hairline);
  padding: 1px 6px;
  border-radius: 4px;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ————— forge ————— */
.forge-note {
  margin-top: 16px;
  max-width: 44em;
  color: var(--muted);
}

/* ————— dark band ————— */
.band-ink {
  background: var(--deep-ink);
  color: var(--body-on-ink);
  border-bottom: none;
}
.band-ink h2 {
  color: var(--fg-on-deep);
}
.band-ink a {
  color: var(--link-300);
  background-image: linear-gradient(var(--link-300), var(--link-300));
}
.band-ink .kicker,
.band-ink .eyebrow {
  color: #9DA2B0;
}

/* ————— footer ————— */
footer {
  padding: 56px 0 40px;
}
footer .big {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--ink);
}
footer .big .u {
  background-image: linear-gradient(var(--link), var(--link));
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: 100% 4px;
}
footer .cols {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}
footer p,
footer li {
  font-size: 14.5px;
  color: var(--muted);
}
footer ul {
  list-style: none;
}
footer li {
  padding: 2px 0;
}
footer .fine {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  footer .cols {
    grid-template-columns: 1fr;
  }
}

/* ————— brand page ————— */
.swatches {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.swatch {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
}
.swatch .chip {
  height: 92px;
}
.swatch .info {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.swatch .info b {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
@media (max-width: 760px) {
  .swatches {
    grid-template-columns: repeat(2, 1fr);
  }
}

.logo-tiles {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tile {
  border-radius: 10px;
  padding: 44px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.tile.paper {
  background: #F4F2EB;
  color: #14161D;
  border: 1px solid var(--hairline);
}
.tile.paper a {
  color: #0038FF;
  background-image: linear-gradient(#0038FF, #0038FF);
}
.tile.ink {
  background: #0B0D13;
  color: #C6C9D2;
  border: 1px solid var(--hairline);
}
.tile.ink a {
  color: #7D93FF;
  background-image: linear-gradient(#7D93FF, #7D93FF);
}
.tile img {
  max-width: 100%;
  height: auto;
}
.tile .dl {
  margin-top: 18px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
}
@media (max-width: 760px) {
  .logo-tiles {
    grid-template-columns: 1fr;
  }
}

table.names {
  width: 100%;
  margin-top: 36px;
  border-collapse: collapse;
}
table.names th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
}
table.names td {
  padding: 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  font-size: 15px;
}
table.names td:first-child {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  white-space: nowrap;
}
table.names td .was {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
table.names td .mono {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
@media (max-width: 760px) {
  table.names,
  table.names tbody,
  table.names tr,
  table.names td {
    display: block;
    width: 100%;
  }
  table.names td {
    border-bottom: none;
    padding: 8px 0;
  }
  table.names tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
  }
  table.names td:first-child {
    padding-top: 14px;
  }
}

.type-sample {
  margin-top: 36px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 32px;
}
.type-sample .face {
  font-size: 15px;
  color: var(--muted);
  font-family: var(--mono);
  margin-bottom: 8px;
}
.type-sample .d500 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.type-sample .d700 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.type-sample .mono-sample {
  font-family: var(--mono);
  font-size: 15px;
}

.dodont {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dodont .col {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 24px 26px;
}
.dodont h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.dodont .do h4 {
  color: var(--ink);
}
.dodont .do h4::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--peer);
  margin-right: 7px;
  vertical-align: 1px;
}
.dodont .dont h4 {
  color: var(--ink);
}
.dodont li {
  font-size: 15px;
  padding: 5px 0;
  color: var(--ink);
}
.dodont ul {
  list-style: none;
}
@media (max-width: 760px) {
  .dodont {
    grid-template-columns: 1fr;
  }
}

.back-link {
  font-family: var(--mono);
  font-size: 13px;
}
