/* ---------- Tokens ---------- */
:root {
  --bg: #f0f0ee;
  --surface: #fafafa;
  --ink: #141414;
  --ink-muted: #6a6a6a;
  --btn-dark: #1f1f1f;

  --font-sans: "Inter Tight", system-ui, -apple-system, sans-serif;

  --line: rgba(20, 20, 20, .1);

  --radius: 8px;
  --content-width: 700px;
  --services-width: 960px;
}

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

html, body { margin: 0; }
html { scroll-behavior: smooth; }

/* No grey/blue flash when something is tapped on a phone; keyboard focus rings are unaffected */
* { -webkit-tap-highlight-color: transparent; }
a, button, label, summary { touch-action: manipulation; }

/* Selected text uses the theme's ink instead of the browser's blue (inverted on the dark cards and buttons) */
::selection { background: var(--ink); color: #fafafa; }
.builder__card ::selection, .cta__card ::selection, .btn--dark ::selection, .btn--dark::selection { background: #fafafa; color: var(--ink); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* Shared column used by every section */
.column {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Layout ---------- */
.page {
  display: flex;
  flex-direction: column;
  padding: 24px clamp(20px, 4vw, 48px) 0;
}

/* Desktop/tablet: the hero fills the screen, so services starts on its own below the fold */
@media (min-width: 561px) {
  .page { min-height: 100vh; min-height: 100svh; padding-bottom: 48px; }
  .page .hero { padding: 0; }
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: block;
  width: 15px;
  height: 15px;
}

/* ---------- Hero ---------- */
.hero {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(72px, 15vh, 160px) 0 0;
}

.hero__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.muted { color: var(--ink-muted); }

.lead {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
}

.lead .hl { color: var(--ink); }

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

/* ---------- Buttons (flat, no shadows) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  min-width: 112px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn--sm {
  min-height: 32px;
  min-width: 0;
  padding: 0 16px;
  font-size: 13px;
}

/* Arrows are drawn SVG icons, never text characters */
.btn__arrow {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--lg { min-height: 40px; border-radius: 10px; }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--light:hover { background: #fff; }

.btn--dark { background: var(--btn-dark); color: #fafafa; }
.btn--dark:hover { background: #000; }

/* Desktop: the hero buttons are the same size as the case-study button (40px tall, 10px radius) */
@media (min-width: 801px) {
  .hero__actions .btn { min-height: 40px; border-radius: 10px; }
}

/* ---------- Hero grid (canvas, drawn by static/js/hero-grid.js) ---------- */
.hero__grid {
  display: block;
  width: 100%;
  aspect-ratio: 20 / 7;   /* keep in sync with data-cols / data-rows */
}

/* ---------- Services ---------- */
.services {
  display: flex;
  justify-content: center;
  padding: 112px clamp(20px, 4vw, 48px) 128px;
}

.services__title,
.work__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* Services use a wider column than the hero (no effect below ~960px) */
.services .column,
.process .column,
.work .column,
.pricing .column,
.testimonials .column,
.faq .column,
.cta .column { max-width: var(--services-width); }

/* Cards: flat rounded tiles in the same light fill as the buttons */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 14px;
  background: var(--surface);
}

.card__art { margin: 0 0 18px; }

.card__canvas {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 4;   /* matches the 280x160 design space in illustrations.js */
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card__num {
  flex: none;
  font-size: 13px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
}
