/* ===========================================================================
   Traction Labs — studio site
   Dark only. One ground, one ink, one accent. No theme switch: the studio
   has a single face and this is it.
   ======================================================================== */

:root {
  /* Ground steps. Each is a real step in luminance, not a tint of the last,
     so a surface reads as raised without needing a border to say so. */
  --ground:    #0A0A0B;
  --raised:    #121214;
  --raised-2:  #17171A;

  /* Ink. Warm off-white, never pure #fff — pure white on near-black buzzes. */
  --ink:       #F0EDE6;
  --ink-dim:   #A8A39A;
  --ink-faint: #6E6A63;

  --line:      #232327;
  --line-lit:  #323238;

  --accent:      #E8A33D;
  --accent-dim:  #8A6224;

  --measure: 34rem;   /* ~66 characters at body size */
  --page:    58rem;

  /* Spacing rhythm — a 4px base, used in multiples only. */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s6: 1.5rem;  --s8: 2rem;    --s12: 3rem;   --s16: 4rem;
  --s24: 6rem;   --s32: 8rem;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--s6);
}
@media (max-width: 30rem) { .wrap { padding-inline: var(--s4); } }

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

.display {
  font-weight: 600;
  /* Tight tracking is what keeps a large sans from reading as a slide deck.
     It has to loosen as the size drops, hence the second rule below. */
  letter-spacing: -0.035em;
  line-height: 1.08;
  /* 38px floor, 64px ceiling, fluid between */
  font-size: clamp(2.375rem, 1.7rem + 3.2vw, 4rem);
  margin: 0;
  text-wrap: balance;
}
@media (max-width: 34rem) { .display { letter-spacing: -0.025em; } }

h2 {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 var(--s6);
}

p { margin: 0 0 var(--s4); max-width: var(--measure); }
.lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--ink-dim);
  line-height: 1.6;
}

a { color: inherit; }

/* Links in prose: an underline that sits low and lights up on hover, rather
   than a colour change — colour is reserved for the accent. */
.prose a, .link {
  text-decoration: none;
  border-bottom: 1px solid var(--line-lit);
  padding-bottom: 1px;
  transition: border-color 160ms ease, color 160ms ease;
}
.prose a:hover, .link:hover { border-color: var(--accent); color: var(--accent); }

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

/* --- header -------------------------------------------------------------- */

.masthead {
  padding-block: var(--s8) 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  color: var(--ink);
}
.brand svg { display: block; width: 26px; height: 26px; color: var(--accent); }
.brand span {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* --- hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(var(--s16), 14vh, var(--s32)) var(--s16); }
.hero .lede { margin-top: var(--s8); }

/* --- sections ------------------------------------------------------------ */

section { padding-block: var(--s16); border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* --- the work list ------------------------------------------------------- */

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

.work-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: var(--s6);
  align-items: start;
  padding: var(--s6);
  margin-inline: calc(var(--s6) * -1);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background-color 180ms ease;
}
.work-item:hover { background: var(--raised); }
.work-item + .work-item { margin-top: var(--s2); }

/* The tile holds the product's real app icon, already rounded in the PNG, so
   it needs no background or border of its own — a plate behind an app icon
   reads as a second, competing shape. */
.work-icon {
  width: 3.5rem; height: 3.5rem;
  display: block; flex: 0 0 auto;
}
.work-icon img { width: 100%; height: 100%; display: block; }

.work-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: var(--s3);
}
.work-desc {
  margin: var(--s2) 0 0;
  color: var(--ink-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 30rem;
}

.tag {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line-lit);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  line-height: 1.5;
  white-space: nowrap;
}
.tag--live { color: var(--accent); border-color: var(--accent-dim); }

.work-go {
  align-self: center;
  color: var(--ink-faint);
  transition: transform 180ms ease, color 180ms ease;
}
.work-item:hover .work-go { color: var(--accent); transform: translateX(3px); }

@media (max-width: 34rem) {
  .work-item { grid-template-columns: 2.75rem 1fr; gap: var(--s4); padding: var(--s4); margin-inline: calc(var(--s4) * -1); }
  .work-icon { width: 2.75rem; height: 2.75rem; }
  .work-go { display: none; }
}

/* --- principles ---------------------------------------------------------- */

.principles { display: grid; gap: var(--s8); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.principle h3 {
  margin: 0 0 var(--s2);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.005em;
}
.principle p { margin: 0; color: var(--ink-dim); font-size: 0.9375rem; }

/* --- contact ------------------------------------------------------------- */

.contact-mail {
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-lit);
  transition: border-color 160ms ease, color 160ms ease;
  display: inline-block;
  line-height: 1.2;
  /* long address must not push the page sideways on a narrow phone */
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--accent); border-color: var(--accent); }

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

footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s8) var(--s12);
  display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6);
  align-items: center; justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.8125rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); }
footer a { text-decoration: none; transition: color 160ms ease; }
footer a:hover { color: var(--ink); }
