/* ==========================================================================
   The Bit Better Company of Manhattan
   One stylesheet, four pages. No build step, no dependencies.
   ========================================================================== */

/* --- Display face. Wordmark and titles only. 67 glyphs: A-Z a-z 0-9 , - . --- */
@font-face {
  font-family: "Bit Better Font";
  src: url("assets/fonts/BitBetterFont-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bit Better Font";
  src: url("assets/fonts/BitBetterFont-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* --- Body face. Full character set, carries everything else. --- */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper:    #f5ead6;
  --ink:      #111213;
  --body:     #33302a;
  --muted:    #6b6555;
  --rule:     rgba(17, 18, 19, .14);
  --rule-soft:rgba(17, 18, 19, .08);
  --blue:     #0c50ff;

  --display: "Bit Better Font", "Iowan Old Style", Palatino, "Times New Roman", serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shell: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --art-h: clamp(460px, 52vw, 900px);
  --art-top: 0px;
}

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

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

body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--body);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Hero artwork. Anchored to the top right of the page, dissolved into the
   paper on its left and bottom edges so the printed texture leaves no seam.
   -------------------------------------------------------------------------- */
.hero-art {
  position: absolute;
  top: var(--art-top);
  right: 0;
  width: min(100%, 1672px);
  height: var(--art-h);
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/hero.webp");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: auto 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 42%, #000 78%);
          mask-image: linear-gradient(to right, transparent 0%, transparent 42%, #000 78%);
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(245, 234, 214, 0) 52%, var(--paper) 100%);
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 34px 0 14px;
}
.wordmark {
  font-family: var(--display);
  font-size: clamp(.78rem, 1.5vw, .875rem);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 7px;
}
.wordmark:hover { color: var(--blue); }

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: .8125rem;
  letter-spacing: .01em;
}
.masthead nav a {
  color: var(--muted);
  text-decoration: none;
}
.masthead nav a:hover { color: var(--blue); }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
h1, h2, .display {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.015em;
}
h1 .ln { white-space: nowrap; }
@supports (width: 1cqi) {
  h1 { font-size: clamp(2rem, 11.6cqi, 5rem); }
}
h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
h3 {
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 8px;
}
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--text);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 18px;
}
.lede {
  font-size: clamp(1.125rem, 1.9vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 34ch;
}
.prose { max-width: 68ch; }
.statement {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  line-height: 1.28;
  letter-spacing: -.005em;
  color: var(--ink);
  max-width: 30ch;
  margin-bottom: 1.4em;
}
.more {
  margin-top: 22px;
  font-size: .9375rem;
  color: var(--muted);
  max-width: 60ch;
}
.footnote {
  margin-top: clamp(34px, 4.5vw, 56px);
  font-size: .78125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}
.product .footnote {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  max-width: none;
}
.prose p + h3 { margin-top: 1.8em; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(56px, 9vw, 118px) 0 clamp(84px, 13vw, 205px);
  max-width: 46%;
  container-type: inline-size;
}
.hero h1 { margin-bottom: 26px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  border-top: 1px solid var(--rule);
  padding: clamp(48px, 6.5vw, 84px) 0;
}
.section > h2 { margin-bottom: 26px; max-width: 20ch; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.split > h2 { margin: 0; }

/* Cards --------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin-top: clamp(30px, 4vw, 54px);
}
.card {
  background: var(--paper);
  padding: 26px 26px 28px;
}
.card p { font-size: .9375rem; color: var(--muted); line-height: 1.65; }

/* Product ------------------------------------------------------------- */
.product {
  border: 1px solid var(--rule);
  padding: clamp(26px, 4vw, 40px);
  display: grid;
  gap: 10px;
  max-width: 68ch;
}
.product .name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--ink);
  line-height: 1.1;
}
.product .status {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--blue);
  text-transform: uppercase;
}
.product .metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-size: .875rem;
  color: var(--muted);
}
.product .metrics b {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

/* Facts list ---------------------------------------------------------- */
.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr);
  gap: 8px 32px;
  padding: 15px 0;
  border-top: 1px solid var(--rule-soft);
}
.facts div:first-child { border-top: 0; }
.facts dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.facts dd { margin: 0; color: var(--ink); }

/* Contact ------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 28px 38px;
}
.contact-grid h3 { margin-bottom: 6px; }
.contact-grid p { font-size: .9375rem; color: var(--muted); }
.contact-grid .big {
  font-size: 1.0625rem;
  color: var(--ink);
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Legal pages
   -------------------------------------------------------------------------- */
.page-head {
  padding: clamp(40px, 6vw, 76px) 0 clamp(26px, 4vw, 40px);
}
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.page-head .updated {
  font-size: .8125rem;
  color: var(--muted);
  margin: 18px 0 0;
}
.legal { border-top: 1px solid var(--rule); padding: clamp(36px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); }
.legal h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  margin: 2.4em 0 .7em;
}
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 1.15em; margin: 0 0 1.1em; }
.legal li { margin-bottom: .5em; }
.legal .callout {
  border-left: 3px solid var(--blue);
  background: rgba(12, 80, 255, .045);
  padding: 20px 24px;
  margin: 1.6em 0;
}
.legal .callout p { font-size: 1rem; }
.legal .callout strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 34px 0 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: baseline;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--muted);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--blue); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Narrow screens. The artwork moves below the masthead and shrinks, so the
   title never lands on the halftone grid.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { max-width: 62%; }
}
@media (max-width: 820px) {
  :root {
    --art-h: clamp(230px, 60vw, 330px);
    --art-top: 76px;
  }
  .hero-art {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 12%, #000 46%);
            mask-image: linear-gradient(to right, transparent 0%, transparent 12%, #000 46%);
  }
  .hero {
    max-width: none;
    padding-top: calc(var(--art-h) + 18px);
  }
  .hero .lede { max-width: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dt { padding-top: 0; }
}
