/* =========================================
   Layout Primitives
   Page-level sizing and shared flex shells
   ========================================= */

.container {
  width: var(--container);
  margin: 0 auto;
}

[data-reveal-section] {
  position: relative;
}

.site-header {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 10, 10, 0.84);
  backdrop-filter: blur(16px);
}

.nav-shell,
.proof-layout,
.hero-layout,
.contact-layout,
.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 200px;
  height: 53px;
  overflow: hidden;
  background-image: url("logos/new_logo.svg");
  background-position: -148px -211px;
  background-repeat: no-repeat;
  background-size: 479px 479px;
}

.nav-shell {
  min-height: 96px;
}

/* =========================================
   Buttons / Calls To Action
   ========================================= */

.nav-cta,
.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.nav-cta {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.nav-cta:hover,
.nav-cta:focus-visible,
.primary-cta:hover,
.primary-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgb(var(--accent-rgb) / 0.24),
    0 16px 30px rgb(var(--accent-rgb) / 0.22);
}

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 96px);
  padding: 48px 0 56px;
  overflow: clip;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(var(--accent-rgb) / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--accent-rgb) / 0.07) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 90%);
  pointer-events: none;
}

.hero-layout {
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 560px;
  animation: hero-fade 700ms ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

h1 {
  max-width: 10.5ch;
  font-size: clamp(3rem, 8vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h1 span {
  color: var(--accent);
}

.hero-subtitle,
.section-heading p {
  color: var(--text-secondary);
}

.hero-subtitle {
  max-width: 33rem;
  margin-top: 22px;
  font-size: clamp(1rem, 1.9vw, 1.15rem);
}

.hero-tagline {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
}

.hero-actions {
  margin-top: 34px;
}

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.hero-trust img {
  display: block;
  width: auto;
  height: 20px;
  opacity: 0.9;
}

.hero-visual {
  width: min(500px, 100%);
  flex: 0 1 500px;
}

.blob-shell {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.blob-frame {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* =========================================
   Social Proof
   ========================================= */

.proof-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #111111;
}

.proof-layout {
  min-height: 78px;
}

.proof-layout p {
  font-size: 0.98rem;
}

.proof-layout p span {
  color: var(--accent);
}

.proof-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 56px;
  padding: 10px 18px;
}

.proof-logos img {
  display: block;
  width: auto;
  height: 30px;
  max-width: 160px;
  opacity: 0.88;
  filter: brightness(0) invert(1);
}

.proof-logos .proof-logo-mit img {
  height: 46px;
  max-width: 160px;
}

.proof-logos .proof-logo-yc img {
  height: 34px;
  max-width: 168px;
  opacity: 0.94;
  filter: none;
}

.section-heading {
  max-width: 700px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin-top: 16px;
  max-width: 38rem;
}

/* =========================================
   Solution Section
   Unified steps + value outcomes
   ========================================= */

.solution-section {
  padding: 110px 0;
  background:
    radial-gradient(circle at 78% 28%, rgb(var(--accent-rgb) / 0.08), transparent 20%),
    linear-gradient(180deg, #090909 0%, #0c0c0c 100%);
}

.contact-layout {
  align-items: flex-start;
  gap: 56px;
}

.solution-stack {
  display: grid;
  gap: 72px;
}

.solution-top,
.solution-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
}

.solution-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin-left: 0;
  padding: 0;
  background: transparent;
}

.solution-steps {
  max-width: 520px;
}

.solution-panel {
  width: 100%;
}

.solution-panel-embed {
  min-height: 560px;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.contact-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pipe-network-frame {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  background: transparent;
}

.dashboard-panel {
  width: 100%;
  min-height: 680px;
  overflow: hidden;
  border-radius: 24px;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.dashboard-frame {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: 0;
  background: transparent;
}

/* =========================================
   Contact
   ========================================= */

.contact-section {
  padding: 100px 0 112px;
}

.contact-copy {
  width: min(720px, 100%);
  max-width: 720px;
  text-align: center;
}

.contact-blurb {
  margin-top: 22px;
  margin-inline: auto;
  max-width: 520px;
  text-align: center;
  color: var(--text-secondary);
}

.contact-card {
  width: min(640px, 100%);
  padding: 30px;
}

.contact-layout {
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-span-full {
  grid-column: 1 / -1;
}

.contact-form label {
  display: grid;
  gap: 9px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #0b0b0b;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: 0;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgb(var(--accent-rgb) / 0.62);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.12);
}

.contact-form textarea {
  height: auto;
  min-height: 120px;
  padding-block: 14px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  resize: vertical;
}

.primary-cta-wide {
  width: 100%;
  margin-top: 22px;
}

.form-note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-note.is-success {
  color: var(--accent-bright);
}

.form-note.is-error {
  color: #ff9f9f;
}

/* =========================================
   Footer
   ========================================= */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 28px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-shell {
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.site-footer p,
.footer-social a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  transition: color 160ms ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--accent);
}

/* =========================================
   Debug Theme Card
   Floating debug controls for accent tuning
   ========================================= */

.theme-debug {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(268px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(11, 11, 11, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.theme-debug__eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.theme-debug h3 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.theme-debug__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.theme-debug__toggle {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.theme-debug__toggle:hover,
.theme-debug__toggle:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.36);
  background: rgba(255, 255, 255, 0.07);
}

.theme-debug p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.theme-debug.is-collapsed {
  width: auto;
  min-width: 0;
}

.theme-debug.is-collapsed .theme-debug__body {
  display: none;
}

.theme-debug__fields {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.theme-debug__field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.theme-debug__field span {
  display: block;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.theme-debug__field code {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.theme-debug__field input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: transparent;
}

.theme-debug__field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.theme-debug__field input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.theme-debug__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.theme-debug__button {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-debug__button:hover,
.theme-debug__button:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.36);
  background: rgba(255, 255, 255, 0.07);
}


@keyframes hero-fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.has-scroll-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(44px) scale(0.985);
    filter: blur(8px);
    transition:
      opacity 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
      transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1),
      filter 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(var(--reveal-delay, 0) * 90ms);
    will-change: opacity, transform, filter;
  }

  body.has-scroll-reveal [data-reveal-section].is-visible [data-reveal] {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  body.has-scroll-reveal .proof-strip [data-reveal] {
    transform: translateY(24px) scale(0.99);
  }

  body.has-scroll-reveal .proof-strip.is-visible .proof-logos li {
    transform: translateY(0) scale(1);
  }
}

/* =========================================
   Responsive Breakpoints
   ========================================= */

@media (max-width: 1080px) {
  .hero-layout,
  .contact-layout {
    flex-direction: column;
    align-items: center;
  }

  .hero-layout {
    gap: 32px;
  }

  .hero-visual {
    flex-basis: auto;
  }

  .solution-top,
  .solution-bottom {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual,
  .solution-panel,
  .dashboard-panel,
  .contact-card {
    width: 100%;
  }

  .hero-copy {
    max-width: 100%;
  }

  .solution-copy,
  .solution-steps {
    max-width: 100%;
    margin-left: 0;
    padding: 0;
  }
}

@media (max-width: 768px) {
  .nav-shell {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 76px;
  }

  .brand {
    width: 220px;
    height: 58px;
    background-position: -163px -233px;
    background-size: 528px 528px;
  }

  .nav-cta {
    display: none;
  }

  .proof-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-copy,
  .solution-copy,
  .solution-steps,
  .contact-copy {
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
  }

  h1 {
    margin-inline: auto;
    text-align: center;
  }

  .hero-visual {
    width: min(420px, 100%);
    margin-inline: auto;
  }

  .hero-layout {
    flex-direction: column;
  }

  .hero-visual {
    order: -1;
  }

  .hero-actions,
  .hero-trust,
  .proof-logos {
    justify-content: center;
  }

  .eyebrow,
  .section-kicker {
    justify-content: center;
  }

  .proof-layout {
    gap: 16px;
  }

  .proof-layout {
    padding: 18px 0;
  }

  .solution-section,
  .contact-section {
    padding-block: 78px;
  }

  .solution-stack,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .solution-top {
    gap: 24px;
  }

  .solution-top .solution-copy {
    order: -1;
  }

  .solution-bottom {
    gap: 28px;
  }

  .solution-panel-embed,
  .pipe-network-frame {
    min-height: 340px;
  }

  .dashboard-panel,
  .dashboard-frame {
    min-height: 420px;
  }

  .proof-logos {
    width: 100%;
  }

  .proof-logos li {
    min-width: 0;
    flex: 1 1 140px;
  }

  .contact-layout {
    align-items: center;
  }

  .theme-debug {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  :root {
    --container: min(1140px, calc(100vw - 28px));
  }

  .hero-visual {
    width: min(280px, 82vw);
  }

  .nav-shell {
    min-height: 72px;
    gap: 10px;
  }

  .brand {
    width: 184px;
    height: 48px;
    background-position: -136px -194px;
    background-size: 440px 440px;
  }

  h1 {
    max-width: 8.8ch;
    font-size: clamp(2.45rem, 10.8vw, 3.1rem);
    margin-inline: auto;
    text-align: center;
  }

  .eyebrow {
    margin-bottom: 6px;
  }

  .hero-subtitle {
    max-width: 100%;
    font-size: 0.98rem;
    text-align: center;
  }

  .contact-card {
    padding: 0;
    border-radius: 0;
    margin-inline: auto;
    text-align: center;
  }

  .contact-form {
    max-width: 420px;
    margin-inline: auto;
  }

  .field-grid {
    max-width: 420px;
    margin-inline: auto;
  }

  .form-note {
    text-align: center;
  }

  .solution-panel-embed,
  .pipe-network-frame {
    min-height: 280px;
  }

  .dashboard-frame,
  .dashboard-panel {
    min-height: 360px;
  }

  .proof-logos {
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .proof-logos li {
    flex: 1 1 0;
    min-width: 72px;
    min-height: 42px;
    padding: 6px 8px;
  }

  .proof-logos img {
    height: 22px;
    max-width: 100%;
    margin-inline: auto;
  }

  .proof-logos .proof-logo-mit img {
    height: 32px;
  }

  .proof-logos .proof-logo-yc img {
    height: 24px;
  }

  .theme-debug {
    right: 10px;
    bottom: 10px;
    width: min(240px, calc(100vw - 20px));
    padding: 14px;
  }

  .theme-debug p {
    font-size: 0.78rem;
  }

  .theme-debug__field {
    grid-template-columns: 1fr 40px;
  }
}
