:root {
  --brand-width: clamp(140px, 15vw, 200px);
}
body {
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  background: #fff;
  color: #000;
}

.desktop {
  width: 100%;
  background: #fff;
  min-width: 320px;
}

section{
  scroll-margin-top: 100px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  height: 90px;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  width: 100%;
  background: #fff;
  z-index: 1000;
  box-sizing: border-box;
}
#nav-root {
  display: contents;
}
.logo {
  width: 160px;
  height: 160px;
  margin-right: 20px;
  margin-left: 48px;
  flex-shrink: 0;
}
.header .logo {
  width: 80px;
  height: 80px;
}

.header-brand {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 400;
  color: #fff;
  background: #353535;
  width: var(--brand-width);
  min-width: max-content;
  padding: 0 clamp(12px, 1.5vw, 24px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin-left: auto;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.header-brand.visible {
  opacity: 1;
  pointer-events: auto;
}

.name {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.jarmai {
  font-size: 64px;
  font-weight: 400;
  color: #000;
}
.jarmai.white {
  color: #fff;
}

.tagline {
  font-size: 14px;
  color: #000;
}
.tagline.white {
  color: #fff;
}

/* Nav */
.nav {
  display: flex;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: center;
  height: 100%;
  margin-left: clamp(8px, 1.5vw, 24px);
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  font-size: clamp(16px, 1.5vw, 24px);
  color: #000;
  text-decoration: none;
  font-family: 'Roboto Mono', monospace;
  cursor: pointer;
}
.nav-item-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.nav-arrow {
  display: none;
}

/* Nav Dropdowns */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #000;
  padding: 24px 28px;
  width: 340px;
  box-sizing: border-box;
  z-index: 3000;
  box-shadow: 0 4px 16px #0002;
  font-family: 'Roboto Mono', monospace;
}
.nav-dropdown.compact {
  width: 220px;
  padding: 18px 22px;
}
.nav-item:hover .nav-dropdown {
  display: block;
}
.nav-dropdown-classified {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 12px;
}
.nav-dropdown-classified.open {
  color: #75FF79;
}
.nav-dropdown-text {
  font-size: 14px;
  line-height: 1.55;
  color: #000;
}
.nav-dropdown-img {
  width: 100%;
  height: 200px;
  background: #eee;
  border: 1px solid #ddd;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999;
}
.nav-dropdown-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-dropdown .pill {
  color: #75FF79;
  font-size: 14px;
  text-decoration: none;
  font-family: 'Roboto Mono', monospace;
}

/* Content */
.content {
  display: flex;
  flex-direction: column;
}

/* Intro Section */
.intro {
  display: flex;
  position: relative;
  min-height: clamp(350px, 40vw, 529px);
}
.intro-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 60px 40px;
}
.intro-text {
  text-align: center;
  font-size: clamp(14px, 2.8vw, 24px);
  color: #000;
}
.intro-text b {
  font-weight: 700;
}
.intro-cta {
  position: absolute;
  bottom: 40px;
  left: 40px;
  font-family: 'Roboto Mono', monospace;
  font-size: var(--fs-lead);
  color: #000;
  text-decoration: none;
  padding: clamp(6px, 1vw, 12px) clamp(12px, 1.8vw, 18px);
  background: linear-gradient(90deg, #75F1FF 0%, #75FF79 100%);
  line-height: 1.4;
  cursor: pointer;
}
.intro-cta::after {
  content: 'opens a short Google Form for early updates';
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #353535;
  color: #fff;
  font-size: 11px;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.intro-cta:hover::after {
  opacity: 1;
}
.intro-cta:hover {
  opacity: 0.85;
}
.intro-sidebar {
  width: var(--brand-width);
  background: #353535;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.intro-sidebar-tagline {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #fff;
  font-size: clamp(10px, 1.1vw, 14px);
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.05em;
  position: absolute;
  left: clamp(8px, 1vw, 16px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}
.intro-sidebar-brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #fff;
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(60px, 9vw, 120px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Section Blocks (generic) */
.section-block {
  border-top: 1px solid #000;
  padding: 40px clamp(24px, 5vw, 80px) 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.section-block.dark {
  background: #353535;
  color: #fff;
}
.section-texts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 900px;
  width: 100%;
}
.section-text {
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.6;
  text-align: left;
  color: #000;
  background: #fff;
  border: 1px solid #ccc;
  padding: 22px 26px;
}
.section-text b {
  display: block;
  margin-bottom: 8px;
}
.section-block.dark .section-text {
  background: #fff;
  color: #000;
  border-color: #000;
}
.section-title {
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 400;
  text-align: center;
  color: #000;
  padding: 20px 0;
}
.section-title.white {
  color: #fff;
  padding: 20px 0;
}

/* Footer */
.footer {
  background: #000;
  color: #fff;
  padding: 40px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
  justify-content: center;
}
.footer-main {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 0 20px;
}
.footer-links {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.footer-links > div {
  font-size: clamp(13px, 1.2vw, 16px);
  color: #fff;
  font-family: 'Roboto Mono', monospace;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pill {
  color: #75FF79;
}
.pill.muted {
  color: #888;
}
.newsletter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Legal link in footer */
.footer a[href*="legalprivacy"],
.footer a[href*="legalprivacy"]:visited,
.footer a[href*="legalprivacy"]:hover,
.footer a[href*="legalprivacy"]:focus {
  color: #fff;
  text-decoration: none;
}

/* Hamburger Icon */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  margin-left: auto;
}
.hamburger {
  display: block;
  width: 30px;
  height: 3px;
  background: #000;
  position: relative;
  transition: all 0.3s;
}
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background: #000;
  position: absolute;
  transition: all 0.3s;
}
.hamburger::before,
.hamburger::after { left: 0; }
.hamburger::before { top: -10px; }
.hamburger::after { top: 10px; }
.nav-toggle.open .hamburger {
  background: transparent;
}
.nav-toggle.open .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle.open .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3000;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 14px;
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  box-shadow: 0 6px 24px #0003;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.cookie-banner--show {
  opacity: 1;
  transform: translateY(0);
}
.cookie-banner.cookie-banner--show {
  pointer-events: auto;
}
.cookie-banner__text {
  line-height: 1.35;
  margin-right: 10px;
}
.cookie-banner__btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 6px #0002;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}
[hidden] { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .desktop {
    min-width: unset;
    width: 100%;
    overflow-x: clip;
  }
  .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
    overflow: visible;
  }
  .header .logo {
    width: 50px;
    height: 50px;
    margin: 0;
    align-self: center;
    margin-left: 16px;
  }
  .name {
    align-items: center;
  }
  .jarmai { font-size: 32px; }
  .tagline { font-size: 12px; }

  .header-brand {
    display: flex;
    width: auto;
    min-width: 0;
    flex: 1;
    font-size: clamp(20px, 5vw, 32px);
    padding: 0;
    background: none;
    color: #000;
    justify-content: center;
    order: 1;
  }

  .nav-toggle {
    display: block;
    width: 50px;
    margin-left: 0;
    margin-right: 16px;
    order: 2;
  }
  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 50px;
    left: 0;
    width: 100vw;
    background: #fff;
    border: none;
    box-shadow: 0 6px 24px #0001;
    z-index: 2000;
    padding: 0;
    margin: 0;
  }
  .nav.open {
    display: flex;
  }
  .nav-item {
    padding: 18px;
    font-size: 19px;
    border-bottom: 1px solid #eee;
    width: 100%;
    color: #222;
    text-align: center;
    background: none;
    align-self: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
  }
  .nav-item:last-child {
    border-bottom: none;
  }
  .nav-arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: solid #222;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-top: -4px;
  }
  .nav-item.mobile-open .nav-arrow {
    transform: rotate(-135deg);
    margin-top: 4px;
  }
  .nav-dropdown {
    display: none;
    position: static;
    transform: none;
    width: 100%;
    align-self: stretch;
    border: none;
    border-top: 1px solid #eee;
    box-shadow: none;
    padding: 14px 18px;
    background: #f8f8f8;
    box-sizing: border-box;
  }
  .nav-dropdown.compact {
    width: 100%;
  }
  .nav-item:hover .nav-dropdown {
    display: none;
  }
  .nav-item.mobile-open .nav-dropdown {
    display: block;
  }

  section {
    scroll-margin-top: 79px;
  }

  .intro {
    flex-direction: column;
    min-height: auto;
  }
  .intro-main {
    padding: 30px 6vw 80px 6vw;
    min-height: 250px;
  }
  .intro-text {
    font-size: clamp(12px, 2.5vw, 24px);
  }
  .intro-cta {
    bottom: 20px;
    left: 6vw;
  }
  .intro-sidebar {
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 16px 0;
    gap: 4px;
  }
  .intro-sidebar-tagline {
    writing-mode: horizontal-tb;
    position: static;
    transform: none;
    font-size: 11px;
    padding-left: 0;
    text-align: center;
    order: 2;
  }
  .intro-sidebar-brand {
    writing-mode: horizontal-tb;
    font-size: 48px;
    margin-left: 0;
    padding-right: 0;
    text-align: center;
    order: 1;
  }

  .section-block {
    padding: 30px 6vw 40px;
  }

  .footer {
    flex-direction: column;
    gap: 20px;
    padding: 22px 0;
    align-items: center;
  }
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 10px;
  }
  .footer-links > div { gap: 7px; }
  .newsletter {
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: flex-start;
  }

  /* --- New sections: mobile --- */
  .section-block.compact { padding: 22px 6vw 28px; }

  .use-case-card { flex: 0 0 80vw; max-width: 320px; }
  .use-cases-track { padding: 10px 6vw 20px; }
  .use-cases-btn { width: 36px; height: 36px; font-size: 16px; }

  /* Touchup: partner logos slightly closer together on mobile */
  .partners-track { gap: 24px; animation-duration: 30s; }
  .partner { min-width: 108px; height: 50px; padding: 0 6px; }
  .partner-logo { font-size: 15px; }
  img.partner-logo { max-height: 30px; max-width: 90px; }
  .partner::after { font-size: 11px; max-width: 200px; }

  /* Touchup: intro background less wide on mobile */
  .intro-bg-svg { transform: scale(0.72); }
}


/* ========================================================== */
/* ===== Additions: use-cases, partners, intro background ===== */
/* ========================================================== */

/* Auto-white title in any dark section */
.section-block.dark .section-title { color: #fff; }

/* Subtitle under any .section-title */
.section-subtitle {
  font-size: clamp(13px, 1.1vw, 15px);
  color: #555;
  text-align: center;
  max-width: 600px;
  margin-top: -16px;
  line-height: 1.5;
}
.section-block.dark .section-subtitle { color: #fff; }

/* Compact modifier — tighter "punctuation" sections */
.section-block.compact {
  padding: 28px clamp(24px, 5vw, 80px) 36px;
  gap: 14px;
}
.section-block.compact .section-title { padding: 6px 0; }
.section-block.compact .section-subtitle { margin-top: 0; }

/* ===== Use Cases Carousel ===== */
.use-cases-carousel {
  width: 100%;
  max-width: 1200px;
  position: relative;
}
.use-cases-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.use-cases-track::-webkit-scrollbar { display: none; }

.use-case-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ccc;
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.use-case-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #75F1FF 0%, #75FF79 100%);
}
.use-case-quote {
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.6;
  text-align: left;
  color: #000;
  flex: 1;
  position: relative;
  padding-left: 18px;
}
.use-case-quote::before {
  content: '"';
  position: absolute;
  left: -2px;
  top: -8px;
  font-size: 40px;
  line-height: 1;
  color: #75FF79;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
}
.use-case-attribution {
  border-top: 1px solid #eee;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.use-case-attribution-name { font-weight: 700; color: #000; }
.use-case-attribution-role { color: #666; }

/* Carousel controls */
.use-cases-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  padding: 4px 4px 0;
  box-sizing: border-box;
}
.use-cases-btn {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #000;
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.use-cases-btn:hover:not(:disabled) { background: #000; color: #fff; }
.use-cases-btn:disabled { opacity: 0.25; cursor: default; }

/* Carousel buttons on dark sections */
.section-block.dark .use-cases-btn {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.section-block.dark .use-cases-btn:hover:not(:disabled) {
  background: #fff;
  color: #000;
}

/* ===== Partners Marquee ===== */
.partners-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 10px 0 60px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex;
  gap: 100px;
  width: max-content;
  animation: partners-scroll 40s linear infinite;
}
.partners-marquee:hover .partners-track { animation-play-state: paused; }
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.partner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  min-width: 160px;
  padding: 0 12px;
  position: relative;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.25s ease;
}
.partner:hover { transform: scale(1.1); }

/* Text logos (default) — replace with <img class="partner-logo"> when you have assets */
.partner-logo {
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  letter-spacing: -0.3px;
}
svg.partner-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
/* Real partner logos are normalized to a uniform bounding box so badges
   of different shapes/aspect ratios read at a consistent visual size.
   Wide badges hit the width cap, squarer ones hit the height cap;
   aspect ratio is always preserved (object-fit: contain). */
img.partner-logo {
  max-height: 70px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.section-block.dark .partner-logo { color: #fff; }

img.partner-logo[src*="tether" i] {
  background: #f4f4f4;
  padding: 4px 8px;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Partner tooltip */
.partner::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #353535;
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  font-family: 'Roboto Mono', monospace;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}
.partner::before {
  content: '';
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #353535;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}
.partner:hover::after,
.partner:hover::before { opacity: 1; }

/* Partner tooltip inverted on dark sections */
.section-block.dark .partner::after {
  background: #fff;
  color: #000;
}
.section-block.dark .partner::before {
  border-bottom-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
}

/* ===== Intro background (video + animated SVG fallback) ===== */
.intro-main { overflow: hidden; }

.intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.intro-bg-svg,
.intro-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.intro-bg-svg { z-index: 0; }
.intro-bg-video { z-index: 1; object-fit: cover; }

/* Keep intro text + CTA above the background */
.intro-text { position: relative; z-index: 3; }
.intro-cta  { z-index: 3; }

/* Optional readability scrim — uncomment if a future video runs busy/dark:
.intro-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255,255,255,0.35);
}
*/

/* SVG "articulated web" — centered, non-rotating */
.intro-bg-svg .ik-art { transform-box: view-box; }
.intro-bg-svg .ik-a1 { animation: ik-swing   9s  ease-in-out infinite alternate; }
.intro-bg-svg .ik-a2 { animation: ik-swing-w 11s ease-in-out infinite alternate; animation-delay: -3s; }
.intro-bg-svg .ik-a3 { animation: ik-swing   8s  ease-in-out infinite alternate; animation-delay: -2s; }
.intro-bg-svg .ik-a4 { animation: ik-swing-w 12s ease-in-out infinite alternate; animation-delay: -5s; }
.intro-bg-svg .ik-a5 { animation: ik-swing   10s ease-in-out infinite alternate; animation-delay: -1s; }
.intro-bg-svg .ik-a6 { animation: ik-swing   13s ease-in-out infinite alternate; animation-delay: -6s; }

.intro-bg-svg .ik-fade1 { animation: ik-fade 13s ease-in-out infinite; }
.intro-bg-svg .ik-fade2 { animation: ik-fade 17s ease-in-out infinite; animation-delay: -6s; }
.intro-bg-svg .ik-fade3 { animation: ik-fade 15s ease-in-out infinite; animation-delay: -10s; }

.intro-bg-svg .ik-pulse1 { animation: ik-pulse 5.5s ease-in-out infinite; }
.intro-bg-svg .ik-pulse2 { animation: ik-pulse 7s   ease-in-out infinite; animation-delay: -2s; }
.intro-bg-svg .ik-pulse3 { animation: ik-pulse 6.2s ease-in-out infinite; animation-delay: -4s; }

@keyframes ik-swing   { from { transform: rotate(-9deg); }  to { transform: rotate(9deg); } }
@keyframes ik-swing-w { from { transform: rotate(-13deg); } to { transform: rotate(13deg); } }
@keyframes ik-fade  { 0%,100% { opacity: 0.08; } 50% { opacity: 0.6; } }
@keyframes ik-pulse { 0%,100% { opacity: 0.4; }  50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .intro-bg-svg [class*="ik-"] { animation: none; }
}


/* ========================================================== */
/* ===== v5 additions: video intro, rotating intro line,  ===== */
/* ===== tiles (task creation + exploration)              ===== */
/* ========================================================== */

/* ----- Intro video: hidden until it can play; SVG stays underneath ----- */
.intro-bg-video {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.intro-bg-video.ready { opacity: 1; }
.intro-bg.has-video .intro-bg-svg { opacity: 0; }
.intro-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255,255,255,0.67);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.intro-bg.has-video::after { opacity: 1; }



/* ----- Rotating intro line: "jarm" stays, the rest swaps ----- */
.intro-text {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  column-gap: 0.55em;
  align-items: start;
  text-align: left;
  max-width: 100%;
}
.intro-fixed {
  font-weight: 700;
  white-space: nowrap;
}
.intro-rotator {
  position: relative;
  display: block;
  min-width: 0;
}
/* invisible copy of the longest statement: sets width + height so nothing jumps */
.intro-sizer {
  display: block;
  visibility: hidden;
}
.intro-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  transform: translateY(0.45em);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.intro-line.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.intro-line.leaving {
  opacity: 0;
  transform: translateY(-0.45em);
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .intro-line { transition: none; }
}

/* ----- Tiles (shared by task creation + exploration) ----- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 40px);
  row-gap: 24px;
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
}
.tile {
  position: relative;
  min-height: clamp(240px, 24vw, 330px);   /* height only: never widens past its column */
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid #000;
  background: #eee;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}
.tile-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}
.tile:hover .tile-bg img { transform: scale(1.07); }
/* readable text over any image */
.tile-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 42%, rgba(0,0,0,0.05) 75%);
}
/* striped placeholder when no image is set */
.tile-bg.placeholder {
  background: repeating-linear-gradient(135deg, #e6e6e6 0 14px, #ededed 14px 28px);
}
.tile-bg.placeholder::after { display: none; }
.tile:has(.tile-bg.placeholder) { color: #000; }

/* top-left tag: step number (task creation) or "example task" (exploration) */
.tile-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(90deg, #75F1FF 0%, #75FF79 100%);
  padding: 5px 9px;
}
.tile-body {
  position: relative;
  z-index: 2;
  padding: 18px 20px 20px;
}
.tile-title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.tile-text {
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.5;
  min-height: 6em;     /* four lines, so every tile's text block matches */
  overflow-wrap: break-word;
}
.tile a { color: #75FF79; text-decoration: none; }
.tile a:hover { text-decoration: underline; }
.tile:has(.tile-bg.placeholder) a { color: #000; }

/* Note under tiles */
.tiles-note {
  font-size: clamp(13px, 1.1vw, 15px);
  color: #555;
  text-align: center;
  max-width: 680px;
  line-height: 1.55;
}
.section-block.dark .tiles-note { color: #ccc; }

/* Dark-section variant (exploration): white frame, gradient hairline on top */
.section-block.dark .tile { border-color: #fff; background: #222; }
.section-block.dark .tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, #75F1FF 0%, #75FF79 100%);
}
/* Bright-section variant (task creation): step numbers are a different shape */
.section-block:not(.dark) .tile-tag.step {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  min-width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Staggered slide-in from the right on first scroll (both sections):
   the whole row slides, each tile fades in a beat later with a small extra
   offset that stays below the gap width, so tiles never overlap mid-motion */
.tiles.reveal {
  transform: translateX(64px);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tiles.reveal .tile {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tiles.reveal .tile:nth-child(2) { transition-delay: 0.16s; }
.tiles.reveal .tile:nth-child(3) { transition-delay: 0.32s; }
.tiles.reveal.in { transform: translateX(0); }
.tiles.reveal.in .tile { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .tiles.reveal, .tiles.reveal .tile { opacity: 1; transform: none; transition: none; }
  .tile-bg img { transition: none; }
}

/* CTA tile (exploration, third): rotating example image/label */
.tile.tile-cta .tile-rotator .tile-bg { opacity: 0; transition: opacity 0.8s ease; }
.tile.tile-cta .tile-rotator .tile-bg.active { opacity: 1; }
.tile.tile-cta .tile-tag { transition: opacity 0.3s ease; }

/* ----- Exploration copy ----- */
.explore-intro {
  max-width: 680px;
  text-align: center;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.6;
  color: #fff;
}
.explore-cta {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(14px, 1.5vw, 20px);
  color: #000;
  text-decoration: none;
  padding: clamp(5px, 1vw, 8px) clamp(12px, 1.8vw, 18px);
  background: linear-gradient(90deg, #75F1FF 0%, #75FF79 100%);
  line-height: 1.4;
  margin-top: -4px;
}
.explore-cta:hover { opacity: 0.85; }
.explore-cta:focus-visible,
.intro-cta:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.section-block.dark .explore-cta:focus-visible { outline-color: #fff; }

/* ----- Mobile ----- */
@media (max-width: 800px) {
  .tiles { grid-template-columns: 1fr; row-gap: 20px; }
  .tile-text { min-height: 0; }
  .tile { min-height: clamp(200px, 56vw, 320px); }
  .tiles.reveal { transform: translateX(32px); }
  .section-texts { grid-template-columns: 1fr; gap: 16px; }
  .intro-text { width: 100%; grid-template-columns: auto minmax(0, 1fr); }
}


/* ========================================================== */
/* ===== Type scale: fewer sizes, used consistently       ===== */
/* ========================================================== */
:root {
  --fs-lead:  clamp(14px, 1.3vw, 17px);  /* body copy: section texts, intro paragraphs, CTAs */
  --fs-small: clamp(13px, 1.1vw, 15px);  /* subtitles, tile descriptions, notes */
  --fs-tag:   11px;                      /* corner tags */
  --fs-tile:  clamp(18px, 1.7vw, 22px);  /* tile titles */
}

.section-text,
.explore-intro,
.explore-cta          { font-size: var(--fs-lead); }

.section-subtitle,
.tile-text,
.tiles-note           { font-size: var(--fs-small); }

.tile-title           { font-size: var(--fs-tile); }

.tile-tag,
.section-block:not(.dark) .tile-tag.step { font-size: var(--fs-tag); }


