/* ==========================================================================
   HEAR ME — MAIN STYLESHEET
   Premium emotional support platform landing page
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES (DESIGN TOKENS)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-secondary: #7C3AED;
  --color-success: #22C55E;

  /* Neutrals */
  --color-bg: #F8FAFC;
  --color-text: #111827;
  --color-gray: #6B7280;
  --color-white: #FFFFFF;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);

  /* Typography */
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes */
  --fs-xs: 0.875rem;
  --fs-sm: 1rem;
  --fs-base: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.75rem;

  /* Spacing */
  --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: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 2rem;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.12);
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.25);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --container-width: 1200px;
  --navbar-height: 84px;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
}

/* Respect reduced motion preference */
@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;
  }
}

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: var(--fs-4xl); font-weight: 700; }
h2 { font-size: var(--fs-3xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); }

p {
  color: var(--color-gray);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-3xl);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
}

.section-header p {
  margin-top: var(--space-sm);
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  will-change: transform;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1.5px solid rgba(17, 24, 39, 0.12);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(17, 24, 39, 0.2);
}

.btn-lg {
  padding: 1.15rem 2.5rem;
  font-size: var(--fs-base);
}

/* --------------------------------------------------------------------------
   6. NAVBAR (STICKY GLASS)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(248, 250, 252, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  transition: background-color var(--transition-base), box-shadow var(--transition-base), height var(--transition-base);
}

.navbar.scrolled {
  background: rgba(248, 250, 252, 0.9);
  box-shadow: var(--shadow-sm);
  height: 72px;
}

.navbar__inner {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text);
}

.navbar__logo img {
  height: 34px;
  width: auto;
}

.navbar__logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding-block: 0.4rem;
  transition: color var(--transition-fast);
}

.navbar__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.navbar__link:hover {
  color: var(--color-primary);
}

.navbar__link:hover::after {
  width: 100%;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.navbar__cta {
  padding: 0.7rem 1.5rem;
  font-size: var(--fs-xs);
}

/* Hamburger Toggle (mobile) */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  z-index: 1100;
}

.navbar__toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.navbar__toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile dropdown menu */
.navbar__mobile-menu {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: 100%;
  background: rgba(248, 250, 252, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  gap: var(--space-sm);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
  z-index: 999;
}

.navbar__mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
}

.navbar__mobile-menu .navbar__link {
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.navbar__mobile-menu .btn {
  margin-top: var(--space-xs);
  width: 100%;
}

/* --------------------------------------------------------------------------
   6B. HERO SECTION (signature: "listening rings")
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--navbar-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-2xl);
}

.hero__content {
  max-width: 560px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-md);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid rgba(17, 24, 39, 0.08);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.hero__badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, var(--fs-4xl));
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
}

.hero h1 em {
  font-style: normal;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.hero__sub {
  font-size: var(--fs-lg);
  color: var(--color-gray);
  margin-bottom: var(--space-lg);
  max-width: 480px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --- Signature element: Listening Rings --- */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.listening-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listening-rings span {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  animation: listen-pulse 4.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.listening-rings span:nth-child(1) { width: 60%; height: 60%; animation-delay: 0s; }
.listening-rings span:nth-child(2) { width: 78%; height: 78%; animation-delay: 1.1s; }
.listening-rings span:nth-child(3) { width: 96%; height: 96%; animation-delay: 2.2s; }
.listening-rings span:nth-child(4) { width: 114%; height: 114%; animation-delay: 3.3s; }

@keyframes listen-pulse {
  0% { transform: scale(0.85); opacity: 0; }
  15% { opacity: 0.9; }
  70% { opacity: 0.15; }
  100% { transform: scale(1.15); opacity: 0; }
}

.hero__image-frame {
  position: relative;
  width: 78%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  animation: float-y 6s ease-in-out infinite;
}

.hero__image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .listening-rings span,
  .hero__image-frame {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   7. SCROLL REVEAL ANIMATION CLASSES (JS toggled)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal--left {
  transform: translateX(-50px);
}

.reveal.reveal--zoom {
  transform: scale(0.9);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}