/* ljr.dev design tokens and components. See design.md for the system. */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0c0e;
  --card: #121417;
  --border: #1d2024;
  --border-soft: #2a2e33;
  --border-tag: #23272c;
  --text: #e8eaed;
  --bright: #c6cbd1;
  --body: #b7bcc2;
  --muted: #9ba1a8;
  --dim: #8b9096;
  --faint: #7e858d;
  --accent: #4ade80;
  --accent-hover: #86efac;

  --sans: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(40px, 7vh, 80px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--muted);
  text-decoration: none;
}

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

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

::selection {
  background: rgba(255, 255, 255, 0.16);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

/* ---------- layout ---------- */

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

.section {
  border-top: 1px solid var(--border);
}

.section > .wrap {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section--cta > .wrap {
  padding-top: clamp(56px, 9vh, 90px);
  padding-bottom: clamp(56px, 9vh, 90px);
}

.grid {
  display: grid;
  gap: 32px 40px;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--center {
  align-items: center;
}

.grid--tight {
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--steps {
  gap: 28px 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
}

/* ---------- nav ---------- */

.site-nav {
  max-width: 1020px;
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.wordmark span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}

.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
}

.nav-links a[aria-current='page'] {
  color: var(--text);
}

/* ---------- type ---------- */

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 28px;
}

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 8px;
}

.page-kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 20px;
}

.note {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

.h1 {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.h1--page {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  max-width: 720px;
}

.h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.h2--cta {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 640px;
}

.h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(18px, 2.4vw, 22px);
  max-width: 660px;
}

.prose {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--bright);
  line-height: 1.6;
  max-width: 640px;
}

.sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
}

.body {
  font-size: 15px;
  color: var(--body);
  line-height: 1.55;
}

.body-sm {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- availability ---------- */

.availability {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

/* ---------- buttons and links ---------- */

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

.actions--cta {
  gap: 20px;
}

.btn {
  height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

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

.btn--primary:hover {
  background: #fff;
  color: var(--bg);
}

.btn--secondary {
  border: 1px solid var(--border-soft);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: #4a5058;
  color: #fff;
}

.btn--nav {
  height: auto;
  padding: 10px 18px;
  font-size: 14px;
}

.metalinks {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--mono);
  font-size: 13px;
}

.metalink {
  font-family: var(--mono);
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2px;
}

.metalink:hover {
  border-color: var(--muted);
}

.textlink {
  color: var(--accent);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1px;
}

.textlink:hover {
  color: var(--accent-hover);
}

.sitelink {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
}

.sitelink:hover {
  color: var(--accent-hover);
}

.morelink {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2px;
}

.morelink:hover {
  color: var(--accent-hover);
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}

.card--pad {
  padding: 24px;
}

.card--wide {
  padding: 20px 24px;
}

a.card {
  display: block;
  transition: border-color 0.15s ease;
}

a.card:hover {
  border-color: var(--border-soft);
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card-title--lg {
  font-size: 19px;
  margin-bottom: 8px;
}

.pattern-card {
  font-size: 15.5px;
  color: var(--bright);
}

.price {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

/* ---------- projects ---------- */

/* Screenshots vary in aspect ratio (1.5:1 to 2.3:1). A fixed 16/10 slot keeps the
   grid rhythm; `contain` letterboxes against the card fill rather than cropping
   away the logo and headings that make each shot identifiable. */
.shot {
  width: 100%;
  /* height:auto is required, or the intrinsic height="" attribute wins and
     aspect-ratio is ignored. */
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}

.project-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.titleline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border-tag);
  border-radius: 99px;
  padding: 4px 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
}

.chip {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--bright);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 14px;
}

/* ---------- lists ---------- */

.bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

.bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  transform: translateY(-2px);
}

.step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

/* ---------- architecture pages ---------- */

/* Wide diagrams scroll inside this container; the page itself never scrolls
   sideways on narrow screens. */
.diagram {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(14px, 3vw, 24px);
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
}

.diagram::-webkit-scrollbar {
  height: 8px;
}

.diagram::-webkit-scrollbar-track {
  background: transparent;
}

.diagram::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: 99px;
}

.diagram svg {
  display: block;
  min-width: 720px;
  width: 100%;
  height: auto;
}

.diagram-caption {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 12px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
}

.site-footer a {
  color: var(--dim);
}

.site-footer a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
