/* UrbanQ, in the X+1 system.
 *
 * The values here are read off xplus-studio.com rather than invented: DM Sans at
 * weight 650 with heavy negative tracking for display, Space Mono at 11px for
 * every label, warm paper, near-black bands, and one hot red. An earlier pass
 * guessed at a light ground with a terracotta accent and got both wrong, which
 * is why they are measured now and written down.
 *
 *   paper      #F2F0EA     ink        #101010
 *   accent     #FF2B18     warm white #FFFDF8
 *   bands      #1C1C1C hero  #111111 dark  #080808 contact
 *   display    DM Sans 650, -0.07em at hero size, 0.84 leading
 *   label      Space Mono 11px, 0.06em, uppercase
 */

:root {
  color-scheme: light;

  --paper: #F2F0EA;
  --ink: #101010;
  --ink-2: #3C3C3C;
  --muted: #4F4F4F;
  --accent: #FF2B18;
  --warm-white: #FFFDF8;
  --rule: #DDDDDD;

  --band-hero: #1C1C1C;
  --band-dark: #111111;
  --band-deep: #080808;

  --on-dark: rgba(255, 255, 255, .85);
  --on-dark-dim: rgba(255, 255, 255, .62);
  --rule-dark: rgba(255, 255, 255, .16);

  --display: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;

  /* One measure for the page gutters, so every rule and column lines up. */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1560px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--display);
  -webkit-font-smoothing: antialiased;
}

/* width:100% is load-bearing. .hero is a flex column, and an auto margin on the
   cross axis beats `stretch` - so without it the wrap sizes to its content and
   the hero's rules bunch in the middle instead of spanning the gutters. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ type scale */

/* Display sizes track the studio's: 134px hero, 77px section, 173px closing,
   each with tracking tightening as the size grows. */
.display-xl, .display-l, .display-m {
  font-family: var(--display);
  font-weight: 650;
  line-height: .84;
  margin: 0;
  text-wrap: balance;
}

.display-xl { font-size: clamp(2.75rem, 9.4vw, 8.4rem); letter-spacing: -.07em; }
.display-l  { font-size: clamp(2rem, 5.4vw, 4.8rem);    letter-spacing: -.055em; line-height: .9; }
.display-m  { font-size: clamp(1.5rem, 2.4vw, 2.08rem); letter-spacing: -.03em;  line-height: 1.05; }

.label {
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  line-height: 1.5;
  max-width: 46ch;
  color: var(--ink-2);
  margin: 0;
}

a { color: inherit; }

/* ------------------------------------------------------------ masthead */

.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: 1.4rem 0;
  color: var(--warm-white);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand svg { display: block; }

.studio {
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  text-decoration: none;
}

.studio:hover { color: var(--accent); }

.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.masthead nav a { text-decoration: none; color: rgba(255, 255, 255, .72); }
.masthead nav a:hover { color: var(--warm-white); }

@media (max-width: 860px) {
  .masthead nav, .studio { display: none; }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  background: var(--band-hero);
  color: var(--warm-white);
  min-height: min(94vh, 900px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 0 0;
  overflow: hidden;
}

/* The plan itself as the ground, the way the studio uses a photograph. Drawn
   rather than photographed, because the subject is a drawing. */
.hero-plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .42;
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-rule {
  border-top: 1px solid var(--rule-dark);
  padding-top: .9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero-rule .label { color: var(--on-dark-dim); }

.hero-body { padding: clamp(3rem, 12vh, 9rem) 0 2rem; }
.hero-body .label { color: var(--on-dark-dim); margin-bottom: 1.1rem; }
.hero h1 { color: var(--warm-white); }

.hero-foot {
  border-top: 1px solid var(--rule-dark);
  margin-top: auto;
  padding: .9rem 0 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero-foot .label { color: var(--on-dark-dim); }

.hero-cta {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  margin-top: 2rem;
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--warm-white);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: .55rem;
}

.hero-cta:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------- sections */

.section { padding: clamp(4.5rem, 11vw, 9rem) 0; }
.section.dark { background: var(--band-dark); color: var(--warm-white); }
.section.dark .label { color: var(--on-dark-dim); }
.section.dark .lede { color: var(--on-dark); }

.section-head {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0 1.5rem;
  align-items: start;
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section.dark .section-head { border-top-color: var(--rule-dark); }
.section-head .num { font: 400 11px/1 var(--mono); color: var(--accent); }
.section-head .label { grid-column: 2; }
.section-head h2 { grid-column: 2; margin-top: 1.6rem; }
.section-head .lede { grid-column: 2; margin-top: 1.6rem; }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .label, .section-head h2, .section-head .lede { grid-column: 1; }
}

/* --------------------------------------------------------- evidence grid */

.evidence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  border-top: 1px solid var(--rule);
}

.section.dark .evidence { border-top-color: var(--rule-dark); }

.evidence > div {
  padding: 1.6rem 1.5rem 1.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.section.dark .evidence > div { border-bottom-color: var(--rule-dark); }

.evidence .n {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  letter-spacing: -.045em;
  line-height: 1;
  display: block;
  margin-bottom: .7rem;
}

.evidence .n em { font-style: normal; color: var(--accent); }
.evidence p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.section.dark .evidence p { color: var(--on-dark-dim); }

/* ------------------------------------------------------------- measures */

.measures { border-top: 1px solid var(--rule-dark); }

.measure {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule-dark);
}

.measure .num { font: 400 11px/1 var(--mono); color: var(--on-dark-dim); }
.measure h3 { margin: 0; }

/* What each measure refuses to say. The point of the tool, so it sits in its
   own column rather than as a footnote. */
.measure .refuses {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--on-dark-dim);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.measure .refuses strong {
  display: block;
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}

@media (max-width: 860px) {
  .measure { grid-template-columns: 1fr; gap: .9rem; }
}

/* ------------------------------------------------------------- manifesto */

.manifesto {
  background: var(--accent);
  color: var(--ink);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  overflow: hidden;
}

.marquee {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  will-change: transform;
  animation: drift 38s linear infinite;
}

.marquee + .marquee { animation-direction: reverse; margin-top: .7rem; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

.manifesto blockquote {
  margin: clamp(2rem, 4vw, 3.4rem) 0;
  max-width: 26ch;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.75rem, 4.6vw, 4rem);
  letter-spacing: -.05em;
  line-height: .95;
}

/* -------------------------------------------------------------- download */

.get {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

.terminal {
  background: var(--band-deep);
  color: var(--warm-white);
  padding: 1.4rem 1.5rem;
  font: 400 .82rem/1.85 var(--mono);
  /* pre, not pre-wrap: a wrapped command line is a command that will not run,
     and without this the whole block collapsed into one run-on paragraph. */
  white-space: pre;
  overflow-x: auto;
}

.terminal .c { color: rgba(255, 255, 255, .45); }
.terminal .p { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--ink);
  color: var(--warm-white);
  text-decoration: none;
  padding: .95rem 1.4rem;
  font: 400 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.btn:hover { background: var(--accent); color: var(--ink); }
.btn.ghost { background: none; color: inherit; box-shadow: inset 0 0 0 1px var(--rule); }
.btn.ghost:hover { background: var(--ink); color: var(--warm-white); box-shadow: none; }

.needs { list-style: none; margin: 0; padding: 0; }

.needs li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .92rem;
}

.needs li span:last-child { font: 400 11px/1.5 var(--mono); color: var(--muted); text-align: right; }

/* --------------------------------------------------------------- closing */

.closing {
  background: var(--band-deep);
  color: var(--warm-white);
  padding: clamp(4rem, 10vw, 8rem) 0 2rem;
}

.closing h2 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.5rem, 11.5vw, 10.8rem);
  letter-spacing: -.075em;
  line-height: .82;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.closing-foot {
  border-top: 1px solid var(--rule-dark);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.closing-foot .label { color: var(--on-dark-dim); }
.closing-foot a { color: var(--on-dark); text-decoration: none; }
.closing-foot a:hover { color: var(--accent); }

/* ------------------------------------------------------------- credits */

.credits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
}

.credits h4 { margin: 0 0 .5rem; font: 400 11px/1 var(--mono);
              letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.credits ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; line-height: 1.9; }
.credits a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.credits a:hover { border-bottom-color: var(--accent); color: var(--accent); }
