/* =========================================================
   Fonts — self-hosted from assets/fonts
   ========================================================= */

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-SemiBoldItalic.otf') format('opentype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('/assets/fonts/CrimsonText-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* =========================================================
   Tokens
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-beige: #e6dacb;
  --bg-dark: #1b1715;

  --text-dark: #1b1715;
  --text-body: #333333;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255,255,255,0.72);

  --accent: #fd4319;
  --cta-text: #131313;

  --font-heading: 'Crimson Text', 'Times New Roman', Georgia, serif;
  --font-body: 'PP Neue Montreal', Arial, sans-serif;

  --container-max: 1440px;
  --container-pad: 72px;
  --container-pad-tablet: 40px;
  --container-pad-mobile: 20px;

  --radius-sm: 4px;
  --radius-md: 5px;
}

/* Webflow uses a fluid root font-size that lands at ~13.93px on a 1440 viewport. */
html {
  font-size: clamp(11px, 0.9662vw, 14px);
}

html, body { overflow-x: clip; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }

ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
@media (max-width: 1024px) { .container { padding: 0 var(--container-pad-tablet); } }
@media (max-width: 640px)  { .container { padding: 0 var(--container-pad-mobile); } }

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

/* =========================================================
   Typography
   ========================================================= */

h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; margin: 0; color: var(--text-dark); }

h1 {
  font-size: 8.375rem;       /* 116.7px at 1rem=13.93 */
  line-height: 0.88;          /* 102.7/116.7 */
  letter-spacing: -0.04em;
  color: var(--text-dark);
}

.display {
  font-size: 5rem;            /* 69.7px */
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.display--xl {
  font-size: 7.437rem;        /* 103.6px */
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lede {
  font-family: var(--font-body);
  font-size: 2rem;            /* ~27.87px — matches live */
  line-height: 1.4;
  color: var(--text-dark);
  margin: 1.25rem 0 2.25rem;
  font-weight: 400;
  white-space: nowrap;
}

.accent { color: var(--accent); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  background: var(--bg);
  padding: 72px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.hero-text {
  position: relative;
  z-index: 1;
}
.hero-brand {
  display: block;
  margin: 0 0 24px;
}
.hero-brand img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 56px;
}

.hero-media {
  display: none;
}

@media (min-width: 960px) {
  .hero-grid {
    min-height: 620px;
    padding-left: calc(var(--container-pad) + 65px);
  }
  .hero-text {
    max-width: 530px;
  }
  .hero-brand {
    margin-bottom: 56px;
  }
  .hero-media {
    display: block;
    position: absolute;
    right: -3vw;
    bottom: calc(min(46vw, 1180px) * -0.20);
    width: min(46vw, 1180px);
    aspect-ratio: 16 / 9;
    pointer-events: none;
    z-index: 0;
  }
  .hero-media #hero-rive {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.25);
    transform-origin: 100% 100%;
    /* Fade the bottom-left half of the canvas to transparent so the
       Chain B input stream visually trails off toward off-screen rather
       than ending mid-section. Diagonal gradient: bottom-left → top-right. */
    mask-image: linear-gradient(to top right, transparent 0% 15%, black 45%);
    -webkit-mask-image: linear-gradient(to top right, transparent 0% 15%, black 45%);
  }
}

@media (min-width: 960px) and (max-width: 1599px) {
  .hero-media {
    aspect-ratio: 4 / 3;
    bottom: calc(min(46vw, 1180px) * -0.27);
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border: 0;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-lg {
  padding: 1.9rem 4.8rem;
  font-size: 1.05rem;
  border-radius: 0.35rem;
}

/* =========================================================
   Hero load-in animations
   ========================================================= */

.hero h1 .line,
.hero .lede .line {
  display: block;
  overflow: hidden;
}
.hero h1 .line {
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.hero h1 .line-inner,
.hero .lede .line-inner {
  display: inline-block;
}

.hero .hero-brand,
.hero h1 .line-inner,
.hero .lede .line-inner,
.hero .btn-primary {
  will-change: transform, opacity;
  transition-delay: var(--fade-delay, 0ms);
}

.hero .hero-brand {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 1100ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--fade-delay, 0ms);
}
.hero .hero-brand.is-in {
  opacity: 1;
  transform: none;
}

.hero h1 .line-inner,
.hero .lede .line-inner {
  transform: translateY(110%);
  transition: transform 1200ms cubic-bezier(0.625, 0.05, 0, 1);
  transition-delay: var(--fade-delay, 0ms);
}
.hero h1 .line-inner {
  transform: translateY(140%);
}
.hero h1 .line-inner.is-in,
.hero .lede .line-inner.is-in {
  transform: none;
}

.hero .btn-primary {
  opacity: 0;
  transition: opacity 1000ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--fade-delay, 0ms);
}
.hero .btn-primary.is-in {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-brand,
  .hero h1 .line-inner,
  .hero .lede .line-inner,
  .hero .btn-primary {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   Build / problem section (beige)
   ========================================================= */

.build {
  background: var(--bg-beige);
  padding: clamp(64px, 10vw, 144px) 0;
  position: relative;
  z-index: 1;
}
.build-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 96px);
}


.prose {
  margin: 0 auto;
  max-width: 60ch;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  line-height: 1.45;
  color: var(--text-dark);
  font-weight: 400;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.prose p { margin: 0 0 0.9em; }
.prose p em { font-style: italic; font-weight: 400; }
.prose strong { font-weight: 700; }

.prose .prose-lead {
  font-size: 1.75rem;
  line-height: 1.25;
  text-align: center;
  margin: 1.2em 0;
}
.prose .prose-lead em { font-weight: 700; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose-cta {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(27, 23, 21, 0.18);
  font-size: 1.5rem;
  line-height: 1.4;
}
.prose-cta p { margin: 0 0 0.5em; }
.prose-cta p:last-child { margin-bottom: 0; }

.prose .numbered {
  list-style: none;
  counter-reset: item;
  padding: 0;
  margin: 0 0 1.5em;
}
.prose .numbered li {
  counter-increment: item;
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 1.2em;
}
.prose .numbered li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
}

/* =========================================================
   Team (dark)
   ========================================================= */

.team {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: clamp(64px, 10vw, 144px) 0;
}

.team-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (min-width: 960px) {
  .team-layout {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 40px 24px;
  }
  .team-left { grid-column: 1 / span 2; grid-row: 1; align-self: start; }
  .team-grid.founders { grid-column: 3 / span 3; grid-row: 1; }
  .team-grid.mts { grid-column: 1 / -1; }
}

.team-heading { color: var(--text-on-dark); }

.team-cross {
  display: block;
  width: 31px;
  height: 32px;
  margin: 48px 0 24px;
}

.team-tagline {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
  max-width: 32ch;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.team-right {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 56px);
}

.team-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  grid-auto-flow: row;
  justify-items: stretch;
}
@media (min-width: 640px)  { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  {
  .team-grid.founders { grid-template-columns: repeat(3, 1fr); }
  .team-grid.mts { grid-template-columns: repeat(5, 1fr); }
}

.team-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  isolation: isolate;
}

.team-card .portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  display: block;
  z-index: 0;
}

.team-card-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 1;
  pointer-events: none;
}

.team-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-on-dark);
}

.team-card h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text-on-dark);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.team-card .name { color: var(--text-on-dark); font-weight: 500; }
.team-card .role {
  color: var(--text-on-dark);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.3;
  opacity: 0.9;
}

.team-card .card-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-card .bio {
  color: var(--text-on-dark);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 300ms ease;
}
.team-card:hover .team-card-overlay { opacity: 0.55; }
.team-card:hover .bio { opacity: 1; }

.team-card .links {
  display: flex;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.team-card .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 200ms ease;
  border-radius: 6px;
}
.team-card .links a img {
  display: block;
  width: 28px;
  height: 28px;
  transition: filter 200ms ease;
}
.team-card .links a:hover { background: #ffffff; text-decoration: none; }
.team-card .links a:hover img { filter: invert(1); }
.icon { width: 28px; height: 28px; }

/* =========================================================
   Footer (dark)
   ========================================================= */

.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: clamp(32px, 5vw, 56px) 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; gap: 48px; }
}

.footer-col--cta { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.footer-col--cta .contact { margin: 0; color: var(--text-on-dark); font-size: 1rem; line-height: 1.5; }
.footer-col--cta .contact a { color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.footer-col--newsletter h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--text-on-dark);
  margin: 0 0 6px;
  font-weight: 400;
}
.footer-col--newsletter p {
  color: var(--text-on-dark);
  font-size: 1rem;
  margin: 0 0 14px;
  max-width: 44ch;
}

.newsletter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 640px;
}
.newsletter[hidden] { display: none; }
.newsletter input[type="email"] {
  flex: 1 1 260px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-on-dark);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .15s ease;
}
.newsletter input[type="email"]::placeholder { color: rgba(255,255,255,0.55); }
.newsletter input[type="email"]:focus { border-color: var(--accent); }
.newsletter button {
  padding: 0.75rem 1.5rem;
  background: var(--text-on-dark);
  color: var(--bg-dark);
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 1rem;
  transition: filter .15s ease;
}
.newsletter button:hover { filter: brightness(0.95); }
.newsletter-success {
  color: var(--text-on-dark);
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.footer-meta {
  display: grid;
  gap: 16px;
  padding-top: 20px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 768px) {
  .footer-meta { grid-template-columns: auto 1fr auto; }
}

.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-brand img { height: 22px; width: auto; }
.footer-brand .soc2 { height: 44px; width: auto; opacity: 0.9; }

.footer-legal { color: var(--text-on-dark); font-size: 0.86rem; line-height: 1.8; }
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--text-on-dark); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.footer-links a { color: var(--text-on-dark); }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* =========================================================
   Privacy policy page
   ========================================================= */

.policy {
  background: var(--bg);
  padding: clamp(48px, 8vw, 96px) 0;
}
.policy h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.policy .policy-frame {
  width: 100%;
  height: 85vh;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
}
.policy .download { margin-top: 16px; font-size: 1rem; }
.policy .download a { color: var(--accent); font-weight: 600; }
