/* Switxh Mono: DM Mono with our signature lowercase l (see fonts/build) */
@font-face {
  font-family: 'Switxh Mono';
  src: url('fonts/SwitxhMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Switxh Mono';
  src: url('fonts/SwitxhMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #17221f;
  --muted: #58635b;
  --copy: #56635c;
  --paper: #f5f5ef;
  --card: #fbfbf6;
  --line: #c9cfc3;
  --lime: #c5ec45;
  --blue: #95c9ff;
  --orange: #ff9f5a;
  --sticker-ink: #17221f;
  /* Comic-book Ben-Day dots in the page's bottom-right corner */
  --benday: rgba(185, 226, 52, 0.85);
  --benday-opacity: 0.15;
  --grain: 0.045;
  /* Light: dark specks only; dark: fine grey noise */
  --grain-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 0 0 0 1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-gray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --mono: 'Switxh Mono', monospace;
  --sans: 'Manrope', sans-serif;
  /* Hand-cut corners: slightly uneven radii, echoing the logo's edges */
  --cut-sm: 14px 9px 15px 8px / 9px 15px 8px 14px;
  --cut-a: 18px 10px 20px 9px / 10px 20px 9px 18px;
  --cut-b: 10px 20px 9px 18px / 20px 9px 18px 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f1f3f5;
    --muted: #9aa3ad;
    --copy: #c4cbd3;
    --paper: #14171c;
    --card: #1c2027;
    --line: #323843;
    --blue: #83b7ec;
    --benday: rgba(131, 183, 236, 0.38);
    --benday-opacity: 0.1;
    --grain: 0.1;
    --grain-image: var(--grain-gray);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --ink: #f1f3f5;
  --muted: #9aa3ad;
  --copy: #c4cbd3;
  --paper: #14171c;
  --card: #1c2027;
  --line: #323843;
  --blue: #83b7ec;
  --benday: rgba(131, 183, 236, 0.38);
  --benday-opacity: 0.1;
  --grain: 0.1;
  --grain-image: var(--grain-gray);
  color-scheme: dark;
}

/* Light/dark logo swap without a flash: both images ship, CSS shows one */
.for-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .for-light {
    display: none;
  }
  :root:not([data-theme='light']) .for-dark {
    display: block;
  }
}
:root[data-theme='dark'] .for-light {
  display: none;
}
:root[data-theme='dark'] .for-dark {
  display: block;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: clip;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 5px;
}
a:hover {
  opacity: 0.78;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.site-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 28px 0;
}

.logo {
  display: flex;
}
.logo img {
  height: 22px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-family: var(--mono);
  font-size: 14px;
}


.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Hero ---------- */

main {
  position: relative;
}
/* Film grain over the whole page, above content; clicks pass through */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: var(--grain-image);
  background-size: 220px 220px;
  opacity: var(--grain);
}

/* Ben-Day dots: comic halftone in the page's bottom-right corner */
body::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(var(--benday) 3.4px, transparent 4px),
    radial-gradient(var(--benday) 3.4px, transparent 4px);
  background-size: 20px 20px;
  background-position:
    0 0,
    10px 10px;
}
body::after {
  right: 0;
  bottom: 0;
  width: min(320px, 50%);
  height: 220px;
  opacity: var(--benday-opacity);
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000, transparent 62%);
  mask-image: radial-gradient(circle at 100% 100%, #000, transparent 62%);
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
  padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 4vw, 56px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

/* Lime marker underline, like the one under the logo's x */
.marked {
  position: relative;
  display: inline-block;
}
.marker {
  position: absolute;
  overflow: visible;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 0.16em;
}
.marker path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 7;
  stroke-linecap: round;
}
.rotating-word {
  display: inline-block;
  min-width: 6.1ch;
  white-space: nowrap;
}
.type-cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.78em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  background: currentColor;
  animation: cursor-blink 1s steps(1) infinite;
}
.rotating-word.is-typing .type-cursor {
  animation: none;
}
@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

/* Screen readers always get the full static line; sighted visitors see the typing */
.hero-static {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.intro-copy {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--copy);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  font-family: var(--mono);
  font-size: 15px;
}
.button-solid {
  padding: 15px 24px;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--cut-sm);
}
.text-link {
  text-decoration: underline;
}

/* ---------- Products ---------- */

.ventures {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 64px);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

h2 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(30px, 3.8vw, 48px);
  letter-spacing: -0.04em;
}

.venture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 36px;
}

.venture-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  padding: 32px;
}

.venture-type {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.venture-card h3,
.card-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.04em;
}
.card-copy {
  font-size: 17px;
  line-height: 1.6;
  color: var(--copy);
}

.coming-soon {
  border: 2px dashed var(--ink);
  border-radius: var(--cut-a);
}
.status {
  position: absolute;
  right: 28px;
  bottom: 28px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--sticker-ink);
  background: var(--blue);
  border-radius: 12px 7px 13px 6px / 7px 13px 6px 12px;
}

/* Live products: filled, lifting slightly on hover */
.live-card {
  background: var(--card);
  border-radius: var(--cut-b);
  transition: transform 0.2s ease;
}
.live-card:hover {
  opacity: 1;
  transform: translate(-2px, -3px);
}
.card-link {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--lime);
  text-underline-offset: 7px;
}
/* Home page products: plain link text */
.venture-grid .card-link {
  text-decoration: none;
}

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

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: clamp(24px, 3vw, 40px) 0 40px;
}

/* Email left, newsletter right; stacks on phones */
.footer-hello {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 48px;
}
.footer-email {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
/* Newsletter: a text link with an orange underline */
.footer-subscribe {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--orange);
  text-underline-offset: 7px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-home {
  display: flex;
}
.footer-mark {
  width: 28px;
  height: 28px;
}

.social-links {
  display: flex;
  margin: -12px -12px -12px 0;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Blog ---------- */

.site-nav [aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--lime);
  text-underline-offset: 7px;
}

.blog-index {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.post-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-card {
  min-height: 0;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 700px;
  padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px);
}
.post-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.post-back {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.post-title {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.15;
  text-wrap: balance;
}

.post-body {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.75;
  color: var(--copy);
}
.post-body > * + * {
  margin-top: 1.1em;
}
.post-body h2 {
  margin-top: 2.4em;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
  color: var(--ink);
}
.post-body h2 + p {
  margin-top: 0.7em;
}
.post-body strong {
  font-weight: 700;
  color: var(--ink);
}
.post-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin-bottom: 0;
  padding-left: 1.2em;
}
.post-body li::marker {
  color: var(--muted);
}
/* Pull quote: the filled card treatment from the products grid */
.post-body blockquote {
  margin: 0 0 2em;
  padding: 28px 32px;
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--card);
  border-radius: var(--cut-b);
}
.post-signoff {
  font-family: var(--mono);
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--ink);
}

.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-top: 40px;
  font-family: var(--mono);
  font-size: 15px;
}

/* ---------- Phones: a calmer top of page ---------- */

@media (max-width: 600px) {
  .hide-on-phone,
  .intro-actions {
    display: none;
  }
  /* Header: logo left; blog + theme toggle stay on the same row */
  .site-header {
    flex-wrap: nowrap;
  }
  .site-nav {
    flex-wrap: nowrap;
    gap: 16px;
    margin-right: -12px;
  }
  /* Footer: copyright + LinkedIn on one row, tagline below */
  .footer-meta {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .footer-meta > span:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }
  /* Keep "All the world's" on one line down to 320px */
  h1 {
    font-size: min(38px, 10vw);
  }
}

/* ---------- Reduced motion: the static headline replaces the typing ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-animated {
    display: none;
  }
  .hero-static {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  .live-card,
  .live-card:hover {
    transition: none;
    transform: none;
  }
}
