/* ═══════════════════════════════════════════════════════════════════════════
   Pipe-Eye — Public demo page
   Monochrome professional theme with brand-blue accent (matches the app).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Neutrals */
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --surface-inverse: #0a0a0a;
  --surface-inverse-2: #141414;

  /* Text */
  --text: #0a0a0a;
  --text-secondary: #424242;
  --text-muted: #5f5f5f;
  --text-inverse: #ffffff;
  --text-inverse-secondary: #c9c9c9;

  /* Borders */
  --border: #d9d9dc;
  --border-strong: #2a2a2a;

  /* Accent */
  --accent: #1a8fd4;
  --accent-strong: #0b6fa8;
  --accent-soft: #e7f2fa;
  --accent-glow: rgba(26, 143, 212, 0.35);
  --focus-ring: 0 0 0 3px rgba(26, 143, 212, 0.5);

  /* Shape */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.16);

  --shell: 1200px;
  --header-h: 76px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Sora", "Manrope", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

img,
video {
  max-width: 100%;
  display: block;
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 999;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 143, 212, 0.28);
}
.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 143, 212, 0.34);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.brand-name {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-inverse);
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-inverse-secondary);
  transition: color 0.2s ease;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.site-nav a:hover {
  color: var(--text-inverse);
}
.site-nav a:hover::after {
  width: 100%;
}

.header-cta {
  flex-shrink: 0;
}

/* ── Language toggle ──────────────────────────────────────────────────────── */

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.lang-btn {
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-inverse-secondary);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-inverse);
}

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.lang-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text-inverse);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-nav a {
  padding: 0.7rem 0;
  font-weight: 600;
  color: var(--text-inverse-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-nav a.btn {
  margin-top: 0.75rem;
  border-bottom: none;
  color: #fff;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 4.5rem 0 3rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-copy > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 1.1rem;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.grad {
  display: block;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-strong) 60%, #0a4f78 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 34rem;
  margin-bottom: 1.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-points {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.hero-points li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-points strong {
  color: var(--text);
}

/* Media frames */
.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  aspect-ratio: 16 / 9;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image frames keep the screenshot's natural aspect ratio (no cropping) */
.media-frame--img {
  aspect-ratio: auto;
  background: var(--surface-alt);
}
.media-frame--img img {
  height: auto;
  object-fit: contain;
}

.hero-media {
  min-width: 0;
}
.hero-media figcaption,
.split-media figcaption,
.gallery-item figcaption,
.report-media figcaption {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 3.5rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
}
.stat dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.stat dd {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
.section-dark h2,
.section-dark h3 {
  color: var(--text-inverse);
}
.section-dark .section-lead {
  color: var(--text-inverse-secondary);
}
.section-dark .eyebrow {
  color: #6cc0ee;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ── Steps ────────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-media {
  min-width: 0;
  background: #000;
  aspect-ratio: 16 / 9;
}
.step-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-body {
  padding: 1.5rem 1.6rem 1.75rem;
  position: relative;
}

.step-num {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.step-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Split (analysis) ─────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.5rem;
  align-items: center;
}

.split-copy,
.split-media {
  min-width: 0;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 1.75rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
}

.feature-list h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-list p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Gallery (findings) ───────────────────────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.gallery-item {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-item .media-frame {
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--border);
}

.gallery-item figcaption {
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
}

.gallery-item figcaption p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.gallery-item-wide {
  grid-column: 1 / -1;
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

/* ── Report ───────────────────────────────────────────────────────────────── */

.report-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: start;
}

.report-media {
  min-width: 0;
}
.report-media .media-frame {
  border-color: rgba(255, 255, 255, 0.12);
}
.report-media figcaption {
  color: var(--text-inverse-secondary);
}

.report-cards {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.report-card {
  background: var(--surface-inverse-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.35rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.report-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.report-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.report-card p {
  color: var(--text-inverse-secondary);
  font-size: 0.92rem;
}

/* ── Tech grid ────────────────────────────────────────────────────────────── */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}
.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.tech-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 1rem;
}

.tech-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.tech-card p {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* ── CTA ──────────────────────────────────────────────────────────────────── */

.cta {
  background: linear-gradient(120deg, var(--accent-strong) 0%, var(--accent) 55%, #2aa7e8 100%);
  color: #fff;
  padding: 3.5rem 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 34rem;
}

.cta .btn-primary {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}
.cta .btn-primary:hover {
  background: #f0f8fd;
  color: var(--accent-strong);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text);
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: center;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.footer-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0.85;
}
.footer-partner:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-partner img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-disclaimer {
  font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-media {
    order: -1;
  }
  .split,
  .report-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-nav,
  .header-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .mobile-nav:not([hidden]) {
    display: flex;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .lang-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
  }
  .header-tools {
    gap: 0.6rem;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 1.25rem;
  }
  .hero {
    padding: 3rem 0 2rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .tech-grid {
    grid-template-columns: 1fr;
  }
  .footer-partner img {
    height: 44px;
  }
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Keep the header on one line: drop the long kicker, tighten spacing */
  .header-inner {
    gap: 0.75rem;
  }
  .brand {
    gap: 0.6rem;
  }
  .brand-logo {
    width: 36px;
  }
  .brand-kicker {
    display: none;
  }
  .brand-name {
    font-size: 1.15rem;
  }
}

@media (max-width: 420px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
  .footer-partner img {
    height: 38px;
  }
}

/* ── Scroll reveal ────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Forced colors / high contrast */
@media (forced-colors: active) {
  .btn,
  .media-frame,
  .step,
  .gallery-item,
  .tech-card,
  .report-card {
    border: 1px solid CanvasText;
  }
}
