/* ============================================
   CJESSOP COMPANY — DESIGN SYSTEM
   ============================================ */

:root {
  /* Colors — Core Brand */
  --color-dark: #0A0F1E;
  --color-dark-soft: #131929;
  --color-accent: #2D7DD2;
  --color-accent-hover: #2468B5;
  --color-accent-glow: rgba(45, 125, 210, 0.15);
  --color-light-bg: #F4F7FB;
  --color-white: #FFFFFF;
  --color-text-primary: #0A0F1E;
  --color-text-secondary: #5A6478;
  --color-text-muted: #8A95A8;
  --color-text-on-dark: #E0E6ED;
  --color-border: rgba(10, 15, 30, 0.08);
  --color-border-dark: rgba(255, 255, 255, 0.08);

  /* Colors — Product Brands */
  --color-autostack: #1F8505;
  --color-autostack-hover: #1A7004;
  --color-autostack-light: #E8F5E3;
  --color-senior-strength: #70C1E8;
  --color-senior-strength-dark: #112D4E;
  --color-senior-strength-light: #EAF5FB;
  --color-surface-measure: #00C8FF;
  --color-surface-measure-hover: #00b0e0;
  --color-surface-measure-dark: #0A1F3D;
  --color-surface-measure-light: #E0F8FF;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 15, 30, 0.08);
  --shadow-md: 0 4px 16px rgba(10, 15, 30, 0.10);
  --shadow-lg: 0 8px 32px rgba(10, 15, 30, 0.12);
  --shadow-xl: 0 16px 48px rgba(10, 15, 30, 0.16);
  --shadow-accent: 0 4px 20px rgba(45, 125, 210, 0.25);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
}


/* ============================================
   RESET
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, textarea {
  font-family: inherit;
}


/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

p {
  max-width: 65ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
}

.eyebrow--green {
  color: var(--color-autostack);
}

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

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


/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-dark {
  background-color: var(--color-dark);
  color: var(--color-text-on-dark);
  position: relative;
}

.section-light {
  background-color: var(--color-light-bg);
  color: var(--color-text-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--color-accent);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}


/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--green {
  background: var(--color-autostack);
  color: var(--color-white);
  border-color: var(--color-autostack);
}

.btn--green:hover {
  background: var(--color-autostack-hover);
  border-color: var(--color-autostack-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(31, 133, 5, 0.25);
}

.btn--sm {
  font-size: 0.8125rem;
  padding: 0.625rem 1.25rem;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}


/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.btn:focus-visible,
.btn--primary:focus-visible,
.btn--cyan:focus-visible,
.btn--green:focus-visible,
.btn--outline:focus-visible,
.btn--ghost:focus-visible {
  outline-offset: 4px;
  outline-color: var(--color-accent);
}

.section-dark :focus-visible,
.nav :focus-visible,
.footer :focus-visible,
.hero :focus-visible {
  outline-color: #ffffff;
}

.section-dark .btn--primary:focus-visible {
  outline-color: var(--color-white);
}


/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 var(--space-md);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav--scrolled {
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-border-dark);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.nav__logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-white);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  margin-left: var(--space-sm);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
@media (max-width: 767px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
  }

  .nav__links.active {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-white);
  }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-sm);
  }
}


/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid base */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

/* Floating particle layer (CSS-only) */
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero__particles span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 125, 210, 0.55) 0%, rgba(45, 125, 210, 0) 70%);
  animation: heroFloat var(--d) ease-in-out var(--delay) infinite;
  opacity: 0.7;
  will-change: transform, opacity;
}

.hero__particles span:nth-child(3n) {
  background: radial-gradient(circle, rgba(0, 200, 255, 0.45) 0%, rgba(0, 200, 255, 0) 70%);
}

.hero__particles span:nth-child(4n) {
  background: radial-gradient(circle, rgba(31, 133, 5, 0.45) 0%, rgba(31, 133, 5, 0) 70%);
}

@keyframes heroFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50%  { transform: translate3d(14px, -28px, 0) scale(1.25); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
}

/* Subtle gradient overlay for depth */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(45, 125, 210, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: var(--space-sm);
  white-space: nowrap;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.6;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hero__eyebrow {
    font-size: 0.6875rem;
    gap: 0.5rem;
  }

  .hero__eyebrow::before,
  .hero__eyebrow::after {
    width: 16px;
  }
}

.hero__title {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  line-height: 1.05;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--color-text-muted);
  margin: 0 auto var(--space-lg);
  max-width: 560px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.hero__trust {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__trust span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hero__trust .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-muted);
  display: inline-block;
}

/* App icon row below hero CTAs */
.hero__app-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  margin-top: var(--space-lg);
  animation: fadeIn 0.6s ease both;
  animation-delay: 750ms;
}

.hero__app-icons img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0.85;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.hero__app-icons img:hover {
  opacity: 1;
  transform: translateY(-3px);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero__scroll-icon {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  position: relative;
}

.hero__scroll-icon::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* Hero entrance animations */
.hero__eyebrow { animation: fadeInUp 0.6s ease both; animation-delay: 0ms; }
.hero__title { animation: fadeInUp 0.6s ease both; animation-delay: 150ms; }
.hero__subtitle { animation: fadeInUp 0.6s ease both; animation-delay: 300ms; }
.hero__actions { animation: fadeInUp 0.6s ease both; animation-delay: 450ms; }
.hero__trust { animation: fadeIn 0.6s ease both; animation-delay: 600ms; }
.hero__scroll { animation: fadeIn 0.8s ease both; animation-delay: 900ms; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ============================================
   SECTION COMMON
   ============================================ */

.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__header .eyebrow {
  margin-bottom: var(--space-xs);
}

.section__header h2 {
  margin-bottom: var(--space-sm);
}

.section__header p {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  margin: 0 auto;
}


/* ============================================
   APPS SHOWCASE
   ============================================ */

.apps {
  padding: var(--space-3xl) 0;
}

.app-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(45, 125, 210, 0.18);
}

.app-card + .app-card {
  margin-top: var(--space-lg);
}

.app-card__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* App card content */
.app-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.app-card__badge--live {
  background: rgba(31, 133, 5, 0.1);
  color: var(--color-autostack);
}

.app-card__badge--free {
  background: var(--color-senior-strength-light);
  color: var(--color-senior-strength-dark);
}

.app-card__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.app-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  object-fit: cover;
}

.app-card__name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.app-card__tagline {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.app-card__tagline--green {
  color: var(--color-autostack);
}

.app-card__tagline--blue {
  color: var(--color-senior-strength-dark);
}

.app-card__description {
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
}

/* Feature pills */
.app-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: var(--space-sm);
}

.feature-pill {
  display: inline-block;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
}

.feature-pill--green {
  background: var(--color-autostack-light);
  color: var(--color-autostack);
}

.feature-pill--blue {
  background: var(--color-senior-strength-light);
  color: var(--color-senior-strength-dark);
}

/* Store buttons */
.app-card__stores {
  display: flex;
  gap: 0.625rem;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  transition: all var(--transition-base);
}

.store-btn:hover {
  background: var(--color-dark-soft);
  transform: translateY(-1px);
}

.store-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-btn__label {
  font-size: 0.625rem;
  opacity: 0.7;
}

.store-btn__name {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Links row */
.app-card__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.app-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-accent);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.app-card__link:hover {
  gap: 0.625rem;
}

.app-card__link--green {
  color: var(--color-autostack);
}

/* Social icons */
.app-card__socials {
  display: flex;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-light-bg);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.social-icon svg {
  width: 16px;
  height: 16px;
}

/* Phone mockup */
.app-card__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-card__phone {
  max-width: 280px;
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* Autostack marketing screen — clean contained render */
.app-card__phone--marketing {
  object-fit: contain;
  background: linear-gradient(145deg, #0d1f38 0%, #1a3356 100%);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
}

/* Feature list (Senior Strength) */
.app-card__checklist {
  margin-bottom: var(--space-sm);
}

.app-card__checklist li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.app-card__checklist li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-senior-strength-light);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23112D4E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.app-card__note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}


/* ============================================
   SCREENSHOT CAROUSEL
   ============================================ */

.carousel {
  position: relative;
  margin: var(--space-sm) 0;
  padding: var(--space-xs) 0;
  user-select: none;
}

.carousel__viewport {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-xs) 0;
}

.carousel__img {
  width: 180px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Arrows */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  z-index: 2;
  padding: 0;
}

.carousel__arrow:hover {
  background: var(--color-autostack-light);
  border-color: var(--color-autostack);
  color: var(--color-autostack);
}

.carousel__arrow--prev { left: -4px; }
.carousel__arrow--next { right: -4px; }

.carousel__arrow svg {
  width: 16px;
  height: 16px;
}

/* Dots */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.carousel__dot--active {
  background: var(--color-autostack);
  width: 20px;
  border-radius: var(--radius-pill);
}


/* ============================================
   ABOUT / STORY
   ============================================ */

.about {
  padding: var(--space-3xl) 0;
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.about__statement {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
}

.about__statement .text-accent {
  display: block;
}

.about__story p {
  color: var(--color-text-on-dark);
  line-height: 1.8;
  margin-bottom: var(--space-md);
  opacity: 0.85;
}

.about__story p:last-child {
  margin-bottom: 0;
}

.about__cta {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-dark);
}

.about__cta a {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--transition-fast);
}

.about__cta a:hover {
  gap: 0.75rem;
}


/* ============================================
   CONTACT
   ============================================ */

.contact {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.contact__content {
  max-width: 600px;
  margin: 0 auto;
}

.contact .eyebrow {
  margin-bottom: var(--space-xs);
}

.contact h2 {
  margin-bottom: var(--space-sm);
}

.contact__subtitle {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 600;
  color: var(--color-accent);
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
  max-width: 100%;
  word-break: break-all;
}

.contact__email:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.contact__socials .social-icon {
  background: rgba(10, 15, 30, 0.06);
}


/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--space-2xl) 0 0;
  border-top: 1px solid var(--color-border-dark);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer__brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
}

.footer__copyright {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.footer__link {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-white);
}

/* Footer bottom bar */
.footer__bottom {
  border-top: 1px solid var(--color-border-dark);
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer__bottom-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer__bottom-socials {
  display: flex;
  gap: 0.5rem;
}

.footer__bottom-socials .social-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
}

.footer__bottom-socials .social-icon:hover {
  background: var(--color-accent);
  color: var(--color-white);
}


/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.animate-on-scroll:nth-child(3) { transition-delay: 200ms; }
.animate-on-scroll:nth-child(4) { transition-delay: 300ms; }


/* ============================================
   PRIVACY POLICY PAGE
   ============================================ */

.policy {
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-3xl);
  min-height: 100vh;
}

.policy__content {
  max-width: 720px;
  margin: 0 auto;
}

.policy__content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.policy__date {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-xl);
}

.policy__content h2 {
  font-size: 1.375rem;
  color: var(--color-text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.policy__content p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
  max-width: none;
}

.policy__content ul {
  list-style: disc;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.policy__content ul li {
  color: var(--color-text-secondary);
  line-height: 1.8;
  padding: 0.125rem 0;
}

.policy__content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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


/* ============================================
   404 PAGE
   ============================================ */

.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  opacity: 0.2;
  margin-bottom: var(--space-sm);
}

.error-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.error-page p {
  color: var(--color-text-muted);
  margin: 0 auto var(--space-lg);
  max-width: 420px;
}


/* ============================================
   RESPONSIVE — TABLET (768px+)
   ============================================ */

@media (min-width: 768px) {
  .app-card__inner {
    grid-template-columns: 1fr 1fr;
  }

  .app-card--reverse .app-card__inner {
    direction: rtl;
  }

  .app-card--reverse .app-card__inner > * {
    direction: ltr;
  }

  .about__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
  }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .carousel__slide {
    flex: 0 0 33.333%;
  }

  .carousel__img {
    width: 140px;
  }

  .carousel__arrow--prev { left: -18px; }
  .carousel__arrow--next { right: -18px; }
}


/* ============================================
   RESPONSIVE — DESKTOP (1024px+)
   ============================================ */

@media (min-width: 1024px) {
  .app-card {
    padding: var(--space-lg);
  }

  .app-card__name {
    font-size: 1.75rem;
  }

  .app-card__phone {
    max-width: 300px;
  }

  .about__inner {
    align-items: center;
  }
}


/* ============================================
   RESPONSIVE — WIDE (1440px+)
   ============================================ */

@media (min-width: 1440px) {
  :root {
    --max-width: 1280px;
  }
}




/* ============================================
   APP CARD — PHONE GROUP (Senior Strength 3-screen)
   ============================================ */

.app-card__phone-group {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.app-card__phone-group .app-card__phone {
  max-width: 95px;
  border-radius: var(--radius-lg);
  opacity: 0.9;
}

.app-card__phone-group .app-card__phone--center {
  max-width: 115px;
  transform: translateY(-16px);
  opacity: 1;
  box-shadow: 0 20px 50px rgba(17, 45, 78, 0.25);
}

@media (min-width: 768px) {
  .app-card__phone-group .app-card__phone { max-width: 105px; }
  .app-card__phone-group .app-card__phone--center { max-width: 125px; }
}

@media (min-width: 1024px) {
  .app-card__phone-group .app-card__phone { max-width: 125px; }
  .app-card__phone-group .app-card__phone--center { max-width: 155px; }
}


/* ============================================
   ABOUT — PRODUCT LOGO CLUSTER
   ============================================ */

.about__logos {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-dark);
}

.about__logos img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
}


/* ============================================
   SURFACEMEASURE — PRODUCT CARD STYLES
   ============================================ */

/* Badge */
.app-card__badge--sm {
  background: rgba(0, 200, 255, 0.12);
  color: var(--color-surface-measure);
}

/* Tagline */
.app-card__tagline--cyan {
  color: var(--color-surface-measure);
}

/* Feature pills */
.feature-pill--cyan {
  background: var(--color-surface-measure-light);
  color: var(--color-surface-measure-dark);
}

/* Link color */
.app-card__link--cyan {
  color: var(--color-surface-measure);
}

/* Primary CTA button */
.btn--cyan {
  background: var(--color-surface-measure);
  color: var(--color-dark);
  border-color: var(--color-surface-measure);
  font-weight: 700;
}

.btn--cyan:hover {
  background: var(--color-surface-measure-hover);
  border-color: var(--color-surface-measure-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.3);
}

/* Browser-frame mockup for web app screenshot */
.browser-frame {
  background: var(--color-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-dark);
  width: 100%;
  max-width: 480px;
}

.browser-frame__bar {
  background: var(--color-dark-soft);
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--color-border-dark);
  flex-shrink: 0;
}

.browser-frame__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.browser-frame__dot:first-child { background: rgba(255, 96, 96, 0.5); }
.browser-frame__dot:nth-child(2) { background: rgba(255, 189, 64, 0.5); }
.browser-frame__dot:nth-child(3) { background: rgba(40, 200, 80, 0.5); }

.browser-frame__screen {
  width: 100%;
  overflow: hidden;
  max-height: 340px;
}

.browser-frame__screen img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top;
}

/* SurfaceMeasure card visual centering */
.app-card--sm .app-card__visual {
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .app-card--sm .app-card__visual {
    justify-content: center;
  }
}


/* ============================================
   FOOTER — PRODUCT LOGOS ROW
   ============================================ */

.footer__products {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: var(--space-sm);
}

.footer__product-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.footer__product-logo:hover {
  opacity: 1;
}


/* ============================================
   MOBILE POLISH (max 767px)
   ============================================ */

@media (max-width: 767px) {
  /* Hero */
  .hero {
    padding-bottom: var(--space-xl);
  }

  .hero__app-icons {
    gap: 0.625rem;
  }

  .hero__app-icons img {
    width: 44px;
    height: 44px;
  }

  /* Touch targets */
  .nav__link,
  .btn,
  .store-btn {
    min-height: 44px;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  /* App cards — no horizontal overflow */
  .app-card {
    padding: var(--space-sm) var(--space-sm);
  }

  .app-card__inner {
    gap: var(--space-md);
  }

  /* Browser frame on mobile */
  .browser-frame {
    max-width: 100%;
  }

  /* Contact email wrap fix */
  .contact__email {
    font-size: 1rem;
    padding: var(--space-sm) var(--space-md);
  }

  /* Section padding tighter on mobile */
  .section {
    padding: var(--space-2xl) 0;
  }

  .about {
    padding: var(--space-2xl) 0;
  }
}


/* ============================================
   SKIP LINK (accessibility)
   ============================================ */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}


/* ============================================
   REDUCED MOTION
   ============================================ */

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .hero__particles { display: none; }
}


/* ============================================
   COUNTER (animated stat in hero trust row)
   ============================================ */

.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-white);
  min-width: 1ch;
}


/* ============================================
   ACCENT SOFT (inline product names in About)
   ============================================ */

.text-accent-soft {
  color: var(--color-white);
  font-weight: 600;
}


/* ============================================
   HERO APP ICONS — links + green Autostack bg
   ============================================ */

.hero__app-icons a {
  display: inline-block;
  border-radius: 12px;
  transition: transform var(--transition-fast);
}

.hero__app-icons a:hover img {
  transform: translateY(-3px);
  opacity: 1;
}


/* ============================================
   SM CARD — VIDEO IN BROWSER FRAME
   ============================================ */

.browser-frame__screen--video {
  max-height: none;
  aspect-ratio: 16 / 10;
  background: #000;
}

.browser-frame__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* ============================================
   PRODUCT PAGE LAYOUT (/surfacemeasure, /autostack, /senior-strength)
   ============================================ */

.product-hero {
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-md) var(--space-xl);
  background: var(--color-dark);
  color: var(--color-text-on-dark);
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
}

.product-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.product-hero__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.product-hero__eyebrow {
  margin-bottom: var(--space-sm);
}

.product-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.product-hero__tagline {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--color-text-on-dark);
  opacity: 0.85;
  margin-bottom: var(--space-md);
  max-width: 540px;
  line-height: 1.6;
}

.product-hero__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.product-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

@media (min-width: 1024px) {
  .product-hero__inner {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-2xl);
  }
}

/* Feature grid (product pages) */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-2xl) 0;
}

@media (min-width: 600px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-glow);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.feature-card__icon svg { width: 20px; height: 20px; }

.feature-card h3 {
  font-size: 1.0625rem;
  font-family: var(--font-display);
  color: var(--color-text-primary);
  margin-bottom: 0.375rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* Product visual block on light section */
.product-visual {
  padding: var(--space-2xl) 0;
}

.product-visual__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 900px) {
  .product-visual__inner { grid-template-columns: 1fr 1fr; }
}

/* Product CTA band */
.product-cta {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.product-cta h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.product-cta p {
  color: var(--color-text-muted);
  margin: 0 auto var(--space-lg);
  max-width: 520px;
}

.product-cta__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Product page accent variants */
.product-hero--cyan .product-hero__title .accent { color: var(--color-surface-measure); }
.product-hero--green .product-hero__title .accent { color: #6BD64C; }
.product-hero--blue .product-hero__title .accent { color: var(--color-senior-strength); }


/* ============================================
   PRODUCT PAGE — CAROUSEL VARIANT (SS / SM)
   ============================================ */

.carousel--blue .carousel__dot--active { background: var(--color-senior-strength); }
.carousel--blue .carousel__arrow:hover {
  background: var(--color-senior-strength-light);
  border-color: var(--color-senior-strength);
  color: var(--color-senior-strength-dark);
}

.carousel--cyan .carousel__dot--active { background: var(--color-surface-measure); }
.carousel--cyan .carousel__arrow:hover {
  background: var(--color-surface-measure-light);
  border-color: var(--color-surface-measure);
  color: var(--color-surface-measure-dark);
}

/* SM screenshot tiles (landscape) */
.carousel--landscape .carousel__img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .carousel--landscape .carousel__slide { flex: 0 0 100%; }
}
