/* ============================================================
   RemoteTech Ventures — brand stylesheet
   Palette: Indigo #5A67FF · Purple #8B5CF6 · Teal #00D4B3
            Coral #FF6B6B · Ink #101828
   Type:    Satoshi (display) · Inter (body)
   ============================================================ */

/* ---------- Type scale ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* Spacing (4px system) */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem;
  --radius-xl: 1.5rem; --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1240px;

  /* Fonts */
  --font-display: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Brand hues (fixed, mode-independent) */
  --indigo: #5A67FF;
  --purple: #8B5CF6;
  --teal:   #00D4B3;
  --coral:  #FF6B6B;
  --ink:    #101828;

  --brand-gradient: linear-gradient(120deg, var(--indigo), var(--purple));
  --brand-gradient-tri: linear-gradient(120deg, var(--teal), var(--indigo) 45%, var(--purple));
}

/* ---------- Dark mode (default / primary) ---------- */
:root, [data-theme='dark'] {
  --color-bg: #0B0F1A;
  --color-bg-2: #0E1424;
  --color-surface: #141B2E;
  --color-surface-2: #1A2237;
  --color-border: #263149;
  --color-divider: #1c2437;

  --color-text: #EAECF5;
  --color-text-muted: #9AA3BD;
  --color-text-faint: #5C6683;
  --color-text-inverse: #0B0F1A;

  --color-primary: var(--indigo);
  --color-primary-hover: #6E79FF;
  --color-accent: var(--teal);

  --hero-overlay: linear-gradient(180deg, rgba(11,15,26,0.35) 0%, rgba(11,15,26,0.75) 60%, var(--color-bg) 100%);
  --card-glow: 0 0 0 1px var(--color-border), 0 20px 50px -30px rgba(90,103,255,0.5);
  --shadow-lg: 0 24px 60px -30px rgba(0,0,0,0.7);
}

/* ---------- Light mode ---------- */
[data-theme='light'] {
  --color-bg: #F7F8FC;
  --color-bg-2: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-2: #F2F4FB;
  --color-border: #E2E6F2;
  --color-divider: #EBEEF7;

  --color-text: #101828;
  --color-text-muted: #4A5170;
  --color-text-faint: #98A0BA;
  --color-text-inverse: #FFFFFF;

  --color-primary: #4A57F0;
  --color-primary-hover: #3B47D6;
  --color-accent: #00A98F;

  --hero-overlay: linear-gradient(180deg, rgba(11,15,26,0.30) 0%, rgba(11,15,26,0.55) 55%, var(--color-bg) 100%);
  --card-glow: 0 0 0 1px var(--color-border), 0 20px 40px -28px rgba(74,87,240,0.28);
  --shadow-lg: 0 24px 50px -30px rgba(16,24,40,0.22);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
ul[role='list'] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
p { text-wrap: pretty; }

::selection { background: rgba(90,103,255,0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }

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

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap { width: min(100% - 2.5rem, var(--content-wide)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--content-narrow)); margin-inline: auto; }
.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--color-accent); }
.section-title { font-size: var(--text-2xl); margin-top: var(--space-4); }
.section-lead { font-size: var(--text-lg); color: var(--color-text-muted); margin-top: var(--space-4); max-width: 54ch; }
.gradient-text {
  background: var(--brand-gradient-tri);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: transform .35s cubic-bezier(0.16,1,0.3,1), background-color .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.header--scrolled {
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--color-border);
}
.header--hidden { transform: translateY(-105%); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
/* Brand: white while header is transparent over the dark hero; switches to theme text once scrolled */
.brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.05; color: #F5F6FF; }
.header--scrolled .brand { color: var(--color-text); }
.brand__mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand__sub { color: #9AA3BD; font-weight: 600; letter-spacing: 0.28em; font-size: 0.6rem; text-transform: uppercase; display: block; margin-top: 3px; }
.header--scrolled .brand__sub { color: var(--color-text-muted); }
/* Footer brand always follows theme text */
.footer .brand { color: var(--color-text); }
.footer .brand__sub { color: var(--color-text-muted); }
.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav__links { display: flex; gap: var(--space-6); }
.nav__links a { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 500; }
.nav__links a:hover { color: var(--color-text); }
.nav__actions { display: flex; align-items: center; gap: var(--space-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 600; padding: 0.65rem 1.25rem; border-radius: var(--radius-full);
  transition: var(--transition-interactive); white-space: nowrap;
}
.btn--primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 24px -8px rgba(90,103,255,0.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(90,103,255,0.7); }
.btn--ghost { border: 1px solid var(--color-border); color: var(--color-text); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--color-border);
  display: grid; place-items: center; color: var(--color-text-muted); flex-shrink: 0;
}
.theme-toggle:hover { color: var(--color-text); border-color: var(--color-primary); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--color-border); place-items: center; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: var(--hero-overlay); }
[data-theme='light'] .hero { color: #EAECF5; }
[data-theme='light'] .hero .hero__eyebrow { color: var(--teal); }
.hero__inner { padding-top: 7rem; padding-bottom: 4rem; }
.hero__eyebrow { color: var(--teal); }
.hero h1 {
  font-size: var(--text-hero); margin-top: var(--space-5); max-width: 16ch; color: #F5F6FF;
}
.hero__accent { display: block; background: var(--brand-gradient-tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: var(--text-lg); color: #C3C9E0; margin-top: var(--space-6); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero__pills { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-12); }
.hero__pill { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #AEB6D4; }
.hero__pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.scroll-hint { position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%); color: #8890b0; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.scroll-hint span { width: 1px; height: 32px; background: linear-gradient(var(--teal), transparent); animation: scrollpulse 2s ease-in-out infinite; }
@keyframes scrollpulse { 0%,100%{opacity:.3; transform: scaleY(.6);} 50%{opacity:1; transform: scaleY(1);} }

/* ============================================================
   Purpose / statement strip
   ============================================================ */
.statement { text-align: center; }
.statement p { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; max-width: 24ch; margin-inline: auto; }
.statement .muted { color: var(--color-text-muted); }
.statement__sub { font-size: var(--text-base); color: var(--color-text-muted); margin-top: var(--space-6); max-width: 56ch; margin-inline: auto; }

/* ============================================================
   Portfolio / ecosystem
   ============================================================ */
.grid-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-12); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }
.venture {
  position: relative; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); overflow: hidden;
  transition: var(--transition-interactive);
}
.venture::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--v-accent, var(--brand-gradient)); opacity: .9; }
.venture:hover { transform: translateY(-4px); box-shadow: var(--card-glow); border-color: transparent; }
.venture__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.venture__icon { width: 46px; height: 46px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--v-bg, rgba(90,103,255,0.12)); color: var(--v-fg, var(--indigo)); }
.venture__status { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.6rem; border-radius: var(--radius-full); }
.status--live { background: rgba(0,212,179,0.14); color: var(--teal); }
[data-theme='light'] .status--live { color: #00876f; }
.status--dev { background: rgba(139,92,246,0.16); color: var(--purple); }
.venture h3 { font-size: var(--text-lg); }
.venture__tag { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: var(--space-1); }
.venture p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-3); }
.venture__link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); margin-top: var(--space-4); }
.venture__link:hover { gap: var(--space-3); }
.ecosystem-note { text-align: center; margin-top: var(--space-12); font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); }

/* ============================================================
   Innovation framework
   ============================================================ */
.framework { background: var(--color-bg-2); border-block: 1px solid var(--color-divider); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-4); margin-top: var(--space-12); counter-reset: step; }
.step { position: relative; padding: var(--space-6) var(--space-5); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h4 { font-size: var(--text-base); margin-top: var(--space-2); }
.step p { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-2); }
.framework__flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-12); font-family: var(--font-display); font-weight: 600; }
.framework__flow span { color: var(--color-text-muted); }
.framework__flow b { color: var(--color-text); font-weight: 700; }
.framework__flow .arrow { color: var(--teal); }

/* ============================================================
   Values
   ============================================================ */
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-4); margin-top: var(--space-12); }
.value { padding: var(--space-6); border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); transition: var(--transition-interactive); }
.value:hover { border-color: var(--color-primary); transform: translateY(-3px); }
.value__icon { width: 42px; height: 42px; color: var(--color-primary); margin-bottom: var(--space-4); }
.value h4 { font-size: var(--text-base); }
.value p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }

/* ============================================================
   Investment / TAM
   ============================================================ */
.invest { position: relative; overflow: hidden; }
.invest__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.tam-total { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; background: var(--brand-gradient-tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tam-total small { display: block; font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.08em; text-transform: uppercase; -webkit-text-fill-color: var(--color-text-muted); margin-top: var(--space-2); }
.tam-list { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.tam-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: baseline; }
.tam-row__label { font-size: var(--text-sm); color: var(--color-text-muted); }
.tam-row__val { font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); }
.tam-bar { grid-column: 1 / -1; height: 6px; border-radius: var(--radius-full); background: var(--color-surface-2); overflow: hidden; }
.tam-bar span { display: block; height: 100%; border-radius: var(--radius-full); background: var(--brand-gradient); }
.buyer-list { display: flex; flex-direction: column; gap: var(--space-4); }
.buyer { display: flex; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); }
.buyer__icon { width: 40px; height: 40px; flex-shrink: 0; color: var(--color-accent); }
.buyer h4 { font-size: var(--text-base); }
.buyer p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

/* ============================================================
   CTA
   ============================================================ */
.cta { position: relative; text-align: center; border-radius: var(--radius-xl); padding: clamp(var(--space-12), 8vw, var(--space-24)); overflow: hidden; background: var(--ink); border: 1px solid var(--color-border); }
.cta__glow { position: absolute; inset: 0; z-index: 0; background: radial-gradient(600px circle at 30% 20%, rgba(90,103,255,0.4), transparent 55%), radial-gradient(500px circle at 80% 90%, rgba(139,92,246,0.35), transparent 55%); }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: var(--text-2xl); color: #F5F6FF; }
.cta h2 .gradient-text { background: var(--brand-gradient-tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta p { color: #C3C9E0; margin-top: var(--space-4); max-width: 48ch; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; margin-top: var(--space-8); }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--color-border); padding-block: var(--space-16) var(--space-8); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-12); }
.footer__brand { max-width: 30ch; }
.footer__brand p { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-4); }
.footer__cols { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.footer__col h5 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-faint); margin-bottom: var(--space-4); }
.footer__col a { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.footer__col a:hover { color: var(--color-text); }
.footer__motto { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); background: var(--brand-gradient-tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); align-items: center; margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--color-divider); font-size: var(--text-xs); color: var(--color-text-faint); }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(0.16,1,0.3,1), transform .7s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay='1'] { transition-delay: .08s; }
.reveal[data-delay='2'] { transition-delay: .16s; }
.reveal[data-delay='3'] { transition-delay: .24s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .menu-btn { display: grid; }
  .nav__actions .btn--primary { display: none; }
  .invest__grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .footer__grid { flex-direction: column; }
  .footer__cols { gap: var(--space-10); }
}
@media (max-width: 520px) {
  .hero__pills { gap: var(--space-2) var(--space-4); }
  .brand__full-sub { display: none; }
}

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 99; background: color-mix(in oklab, var(--color-bg) 96%, transparent); backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-6); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); }
.mobile-menu .btn { margin-top: var(--space-4); }
.mobile-menu__close { position: absolute; top: var(--space-6); right: var(--space-6); width: 44px; height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-full); display: grid; place-items: center; }
