/* ==========================================================================
   thesidebuild.com
   Five colors, three faces, four components. Nothing outside the system.
   ========================================================================== */

:root {
  /* Color — five values, no others */
  --graphite: #1c1f24;      /* page background */
  --graphite-lift: #24282e; /* card fills */
  --bone: #f4f2ed;          /* all primary text */
  --terracotta: #c4552f;    /* one accent only: the next action */
  --steel: #8a929c;         /* labels, metadata, anything archived */

  --bone-lift: #fffdf9;     /* a half-step above bone, for the name only */

  --rule: rgba(244, 242, 237, 0.14); /* 1px rules at 14% bone */
  --rule-hover: rgba(244, 242, 237, 0.34);

  /* Type */
  --display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing scale — 4 / 8 / 16 / 24 / 40 / 64. Nothing outside it. */
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;

  --container: 1000px;
  --bar-height: 72px;
}

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

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

body {
  margin: 0;
  background: var(--graphite);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--terracotta); color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--terracotta);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: var(--s2) var(--s3);
  z-index: 10;
}
.skip-link:focus { left: var(--s3); top: var(--s2); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Type roles ----------------------------------------------------------- */

.display-1,
.display-2,
.card-title,
.section-head {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
}

.display-1 {
  font-size: clamp(32px, 8.5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.display-2 {
  font-size: clamp(28px, 6vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.section-head {
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.05;
}

.utility {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0;
}

a.utility { text-decoration: none; transition: color 0.15s ease; }
a.utility:hover { color: var(--bone); }

.lede,
.body-copy {
  max-width: 60ch;
  margin: 0;
}

/* The full name in running copy — heavier and a shade brighter than the
   paragraph around it. Wrap it wherever "The Side Build" is written out. */
.brand {
  font-weight: 800;
  color: var(--bone-lift);
}

/* --- 01 — Bar ------------------------------------------------------------- */

.bar {
  border-bottom: 1px solid var(--rule);
  background: var(--graphite);
  position: sticky;
  top: 0;
  z-index: 5;
}

.bar__inner {
  min-height: var(--bar-height);
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}

.bar__id {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.bar__face {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  object-fit: cover;
}

.bar__name {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.bar__tld { color: var(--steel); }

.bar__nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

.bar__nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
  padding: var(--s2) 0;
  transition: color 0.15s ease;
}
.bar__nav a:hover { color: var(--bone); }
.bar__nav a[aria-current="page"] { color: var(--bone); }

.bar__social {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* Brand logos sit at full color, so hover shifts opacity rather than fill. */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.icon-link:hover { opacity: 1; }
.icon-link svg { width: 22px; height: 22px; }

/* --- Sections ------------------------------------------------------------- */

.section { padding: var(--s6) 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s5);
}

/* --- 02 — Hero ------------------------------------------------------------ */

.hero { padding: var(--s6) 0 var(--s5); }

.hero__meta { margin-bottom: var(--s4); }

.hero .lede {
  margin-top: var(--s4);
  font-size: 18px;
  color: var(--bone);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}

/* The terms, stated once, in the same voice as everything else. */
.creed {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

/* --- 03 — Build cards ----------------------------------------------------- */

/* One-up under 760px, three-up above. Never two-up. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}

@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Component 01 — Build card (the signature element) */
.build {
  display: flex;
  flex-direction: column;
  background: var(--graphite-lift);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: var(--s4);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.build:hover { border-color: var(--rule-hover); }
.build:hover .build__action { color: var(--bone); }
.build:hover .btn--primary { background: #a94525; }

.build__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.build__title {
  font-size: 22px;
  line-height: 1.0;
  margin-bottom: var(--s3);
}

/* The receipt line: what this build cancels. */
.build__replaces {
  display: block;
  margin-bottom: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.build__desc {
  font-size: 15px;
  color: var(--bone);
  margin: 0 0 var(--s4);
}

.build__stack { margin: 0 0 var(--s4); }

.build__foot {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

.build__action {
  font-family: var(--body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.15s ease;
}

/* Component 04 — Status tags. Terracotta = shipped and live. Steel = everything else. */
.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  padding: var(--s1) var(--s2);
  border: 1px solid currentColor;
  border-radius: 0;
  color: var(--steel);
  white-space: nowrap;
}

.tag--live {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

/* Component 02 — Buttons. Zero radius. One primary per section. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-family: var(--body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding: var(--s3) var(--s4);
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--terracotta);
  color: var(--bone);
}
.btn--primary:hover { background: #a94525; }

.btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--rule);
}
.btn--ghost:hover { border-color: var(--bone); }

.btn--block { width: 100%; }

/* --- 04 — Email capture --------------------------------------------------- */

/* Full-bleed, lift background. */
.signup {
  background: var(--graphite-lift);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s6) 0;
}

.signup__head { margin-bottom: var(--s3); }

.signup .body-copy { color: var(--bone); }

.signup__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
  max-width: 520px;
}

.signup__input {
  flex: 1 1 240px;
  min-width: 0;
  background: var(--graphite);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  padding: var(--s3);
}
.signup__input::placeholder { color: var(--steel); }
.signup__input:focus { border-color: var(--bone); outline-offset: 0; }

.signup__note {
  margin-top: var(--s3);
  min-height: 16px;
}

/* What lands in the inbox, listed so the trade is obvious before you sign up. */
.signup__list {
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
  max-width: 60ch;
}

.signup__list li {
  padding-left: var(--s4);
  position: relative;
  font-size: 15px;
}

.signup__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--steel);
}

/* --- 05 — Videos ---------------------------------------------------------- */

/* No autoplay, no embeds. Thumbnails only — they link out. */
.video {
  text-decoration: none;
  display: block;
}

.video__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--graphite-lift);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.video__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__play {
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.video__play svg { width: 14px; height: 14px; fill: currentColor; }

.video:hover .video__thumb { border-color: var(--rule-hover); }
.video:hover .video__play { color: var(--bone); border-color: var(--bone); }

.video__meta { margin-top: var(--s3); }

.video__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.15;
  text-transform: uppercase;
  margin: var(--s2) 0 0;
}

/* --- Shorts: same card, vertical frame ------------------------------------ */

.grid--shorts {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

@media (min-width: 560px) {
  .grid--shorts { grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
}

@media (min-width: 900px) {
  .grid--shorts { grid-template-columns: repeat(4, 1fr); }
}

.video--short .video__thumb { aspect-ratio: 9 / 16; }
.video--short .video__title { font-size: 13px; }

/* --- Featured build: the one that gets the whole width -------------------- */

.feature {
  background: var(--graphite-lift);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s6) 0;
}

.feature__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-bottom: var(--s4);
}

.feature__mark {
  height: 28px;
  width: auto;
}

/* The product shot runs full width — it's a 2:1 frame, it needs the room. */
.feature__shot {
  display: block;
  width: 100%;
  height: auto;
  margin: var(--s5) 0 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.feature__title {
  font-size: clamp(36px, 7vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s3);
}

.feature__lede {
  font-size: 18px;
  color: var(--bone);
  max-width: 56ch;
  margin: 0 0 var(--s4);
}

.feature__note {
  font-size: 15px;
  color: var(--steel);
  max-width: 56ch;
  margin: 0;
}

/* Spec strip — four facts, ruled apart, no boxes. */
.feature__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s4);
  margin: var(--s5) 0;
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 620px) {
  .feature__stats { grid-template-columns: repeat(4, 1fr); }
}

.feature__stats dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
}

.feature__stats dd {
  margin: var(--s2) 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.15;
  text-transform: uppercase;
}

.feature__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* --- Ledger: the full build archive --------------------------------------- */

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

.ledger__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.15s ease;
}

@media (min-width: 760px) {
  .ledger__row {
    grid-template-columns: 92px minmax(0, 1fr) 190px 104px;
    align-items: baseline;
    gap: var(--s4);
  }
}

.ledger__row:hover { background: var(--graphite-lift); }

.ledger__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 var(--s2);
}

.ledger__desc {
  font-size: 14px;
  color: var(--steel);
  margin: 0;
  max-width: 56ch;
}

.ledger__status { justify-self: start; }

@media (min-width: 760px) {
  .ledger__status { justify-self: end; }
}

/* Component 03 — Filters. Same skin as tags, but they toggle. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s5);
}

.filter {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  padding: var(--s2) var(--s3);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--steel);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.filter:hover { color: var(--bone); border-color: var(--bone); }
.filter[aria-pressed="true"] {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.empty {
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--rule);
}

/* --- About ---------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  align-items: start;
}

@media (min-width: 760px) {
  .about__grid { grid-template-columns: 2fr 1fr; }
}

.about__copy > * + * { margin-top: var(--s4); }

/* Portrait stacked above the spec sheet in the narrow column. */
.about__aside {
  display: grid;
  gap: var(--s4);
}

.about__figure { margin: 0; }

.about__photo {
  border: 1px solid var(--rule);
  border-radius: 3px;
  width: 100%;
  object-fit: cover;
}

.about__caption { margin-top: var(--s2); }

/* The side panel reads as a spec sheet, not a bio. */
.spec {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: var(--s4);
  background: var(--graphite-lift);
}

.spec dl { margin: 0; }

.spec dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
}

.spec dd {
  margin: var(--s1) 0 0;
  font-size: 15px;
  line-height: 1.35;
}

.spec dd + dt {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding: var(--s5) 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  justify-content: space-between;
}

.footer a { text-decoration: none; color: var(--steel); }
.footer a:hover { color: var(--bone); }

/* --- Mobile gutters ------------------------------------------------------- */

/* Under 720px the nav drops to its own row so the wordmark never truncates. */
@media (max-width: 719px) {
  .bar__inner {
    min-height: 0;
    row-gap: 0; /* the nav row carries its own rule and padding */
    padding-top: var(--s3);
    padding-bottom: 0;
  }
  .bar__nav {
    order: 3;
    width: 100%;
    gap: var(--s4);
    border-top: 1px solid var(--rule);
    padding: var(--s2) 0;
    overflow-x: auto;
  }
  .bar__nav a { white-space: nowrap; }
}

@media (max-width: 420px) {
  .bar__name { font-size: 13px; }
  .bar__tld { display: none; }
}

@media (max-width: 759px) {
  .container { padding: 0 20px; }
  .section { padding: var(--s5) 0; }
  .hero { padding: var(--s5) 0 var(--s4); }
  .build__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
