/* ============================================================
   Visor marketing site — design system (Kuli-inspired)
   ============================================================ */

:root {
  /* Surfaces */
  --color-bg:            #FFFFFF;
  --color-surface:       #F4F6FB;
  --color-surface-2:     #EAEFF8;

  /* Text */
  --color-text:          #080E1E;
  --color-text-soft:     #182034;
  --color-muted:         #5A6880;
  --color-muted-dark:    #3D4E68;

  /* Lines */
  --color-border:        #DDE4F0;
  --color-border-strong: #C4CEDF;

  /* Teal accent */
  --color-accent:        #3BBFB8;
  --color-accent-hover:  #29A9A2;
  --color-accent-dark:   #0D6E69;
  --color-accent-tint:   #E8F8F7;

  /* Navy (2nd tone) */
  --color-navy:          #0B1526;
  --color-navy-2:        #0F2040;
  --color-navy-3:        #1E3050;

  /* Status */
  --color-success:       #047857;
  --color-success-tint:  #D1FAE5;
  --color-warning-text:  #92400E;
  --color-warning-tint:  #FEF3C7;
  --color-danger:        #B91C1C;
  --color-danger-tint:   #FEE2E2;

  /* Type */
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Fira Code', monospace;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
  --radius-2xl: 24px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(8,14,30,.05);
  --shadow-sm:  0 2px 12px rgba(8,14,30,.07), 0 1px 3px rgba(8,14,30,.04);
  --shadow-md:  0 8px 32px rgba(8,14,30,.10), 0 2px 8px rgba(8,14,30,.04);
  --shadow-lg:  0 20px 60px rgba(8,14,30,.13), 0 6px 18px rgba(8,14,30,.06);
  --shadow-teal: 0 4px 24px rgba(59,191,184,.30);

  /* Easing */
  --ease: cubic-bezier(.2,.8,.3,1);
}

/* ── Base / reset ────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}

/* ── Typography scale ────────────────────────────────────── */
.display-1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.8vw, 82px);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.0;
}

.display-2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.display-3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.65;
  color: var(--color-muted);
}

.serif-accent {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
}

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

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: clamp(64px, 9vw, 110px);
  padding-bottom: clamp(64px, 9vw, 110px);
}

.section-tight {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.section-band {
  background: var(--color-surface);
}

.section-dark {
  background: var(--color-navy);
  color: #ffffff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: #ffffff;
}

/* Cards inside dark sections need their own text color resets */
.section-dark .card {
  color: var(--color-text);
}
.section-dark .card p {
  color: var(--color-muted);
}
.section-dark .card h2,
.section-dark .card h3 {
  color: var(--color-text);
}

.section-dark .lede {
  color: rgba(255, 255, 255, 0.62);
}

/* ── Section divider (Kuli-style sweep) ──────────────────── */
.v-divider {
  position: relative;
  height: 1px;
  background: var(--color-border);
  overflow: hidden;
}

.v-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  transform: translateX(-100%);
}

.v-divider.in-view::after {
  animation: vDividerSweep 1.6s cubic-bezier(.4,0,.2,1) both;
}

@keyframes vDividerSweep {
  to { transform: translateX(100%); }
}

/* ── Grain overlay ───────────────────────────────────────── */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.055;
}

/* ── Sticky nav ──────────────────────────────────────────── */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 21, 38, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(.4,0,.2,1), opacity 320ms cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.sticky-nav.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.sticky-nav-wordmark {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: #fff;
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.hero-dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(59,191,184,.20) 1px, transparent 0),
    radial-gradient(circle at 1px 1px, rgba(59,191,184,.06) 1px, transparent 0);
  background-size: 28px 28px, 7px 7px;
  animation: heroDotDrift 22s linear infinite;
}

@keyframes heroDotDrift {
  to { background-position: 28px 28px, 7px 7px; }
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
}

.hero-glow-1 {
  top: -180px;
  right: -120px;
  width: 600px;
  height: 600px;
  background: var(--color-accent);
  opacity: 0.12;
}

.hero-glow-2 {
  bottom: -80px;
  left: -160px;
  width: 480px;
  height: 480px;
  background: var(--color-navy-2);
  opacity: 0.60;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero .display-1 {
  color: #fff;
  font-size: clamp(36px, 3.8vw, 58px);
}

.hero .lede {
  color: rgba(255, 255, 255, .62);
}

/* ── Hero two-column grid ───────────────────────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
}

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

.hero-figure {
  min-width: 0;
  margin: 0;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.section-dark .eyebrow {
  color: var(--color-accent);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms,
              box-shadow 150ms, transform 150ms;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-tint);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 8px 32px rgba(59,191,184,.40);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .40);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-surface);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.50;
  pointer-events: none;
}

.btn-arrow::after {
  content: '→';
  opacity: 0.70;
  transition: transform 150ms;
}

.btn-arrow:hover::after {
  transform: translateX(3px);
}

/* ── Inline link ─────────────────────────────────────────── */
.link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.badge-success { color: var(--color-success); }
.badge-warning { color: var(--color-warning-text); }
.badge-danger  { color: var(--color-danger); }
.badge-neutral { color: var(--color-muted-dark); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
}

.platform-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(59, 191, 184, .35);
}

.card-tinted {
  background: var(--color-surface-2);
  border-color: transparent;
}

/* ── Platform support cards ──────────────────────────────── */
.platform-card {
  display: flex;
  flex-direction: column;
}

.platform-card-footer {
  margin-top: auto;
  padding-top: 24px;
}

.text-muted {
  color: var(--color-muted-dark);
}

/* ── About section icons ─────────────────────────────────── */
.about-icon {
  display: block;
  width: 40px;
  height: 40px;
}

.card-tinted:hover {
  border-color: transparent;
}

/* ── Bento grid ──────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bento-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: var(--shadow-xs);
}

.bento-span-2 { grid-column: span 2; }
.bento-span-3 { grid-column: span 3; }

.bento-tinted {
  background: #0B1526;
  border-color: rgba(59, 191, 184, .14);
}

.bento-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.bento-tinted .bento-label {
  color: var(--color-accent);
}

.bento-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--color-text);
}

.bento-tinted h3 {
  color: #ffffff;
}

.bento-card p {
  font-size: 15px;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.55;
}

.bento-tinted p {
  color: rgba(255, 255, 255, .55);
}

@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; }
  .bento-span-2,
  .bento-span-3 { grid-column: span 1; }
}

/* ── Screenshot (hero image) ─────────────────────────────── */
.screenshot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--radius-xl);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .05) inset,
    0 40px 100px rgba(0, 0, 0, .50),
    0 10px 30px rgba(0, 0, 0, .25);
}

/* ── Value cards ─────────────────────────────────────────── */
.value-svg {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.value-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-muted);
  margin-top: 8px;
}

/* ── Forms ───────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.field-input,
.field-select,
.field-textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 150ms, box-shadow 150ms;
  appearance: none;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--color-muted);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 191, 184, .18);
}

/* ── Testimonials ────────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.testimonial-quote {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-soft);
  flex: 1;
}

.testimonial-quote::before {
  content: '\201C';
  display: block;
  font-size: 52px;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: 8px;
  font-family: Georgia, serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.testimonial-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.testimonial-role {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* ── Fade-up entrance ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.09s; }
.fade-up:nth-child(3) { transition-delay: 0.18s; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, .5);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ── Product tour tabs (kept for Alpine compat) ──────────── */
[x-cloak] { display: none !important; }

.tour-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.tour-tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-muted-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 150ms, background 150ms, box-shadow 150ms;
}

.tour-tab:hover {
  color: var(--color-text);
}

.tour-tab-active {
  color: var(--color-text);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
