/* TrackmeToday — root landing only (.landing-page) */

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

.landing-page {
  --landing-accent: #0ea5e9;
  --landing-accent-deep: #0284c7;
  --landing-violet: #7c3aed;
  --landing-ink: #0f172a;
  --landing-muted: #64748b;
  --landing-surface: rgba(255, 255, 255, 0.72);
  --landing-glow: rgba(14, 165, 233, 0.35);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--landing-ink);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.landing-page a {
  color: inherit;
  text-decoration: none;
}

.landing-page .landing-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.landing-nav .landing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.landing-logo-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.landing-logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #cbd5e1;
}

.landing-nav-links a:hover {
  color: #fff;
}

.landing-nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--landing-accent) 0%, var(--landing-violet) 100%);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.landing-nav-cta:hover {
  filter: brightness(1.08);
}

@media (max-width: 640px) {
  .landing-nav-links {
    gap: 0.75rem;
    font-size: 0.8125rem;
  }
  .landing-nav-links a[href='#features'],
  .landing-nav-links a[href='#how'] {
    display: none;
  }
}

/* Hero */
.landing-hero {
  position: relative;
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(14, 165, 233, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(124, 58, 237, 0.25), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(14, 165, 233, 0.2), transparent 45%);
  pointer-events: none;
}

.landing-hero-rings {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  pointer-events: none;
}

.landing-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 50%;
  animation: landing-ring-pulse 6s ease-in-out infinite;
}

.landing-ring:nth-child(2) {
  inset: 8%;
  animation-delay: -1.5s;
  opacity: 0.7;
}

.landing-ring:nth-child(3) {
  inset: 16%;
  animation-delay: -3s;
  opacity: 0.45;
}

@keyframes landing-ring-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.85;
  }
}

.landing-hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .landing-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
}

.landing-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #38bdf8;
  margin-bottom: 1rem;
}

.landing-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.landing-hero-lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 36ch;
  margin-bottom: 1.75rem;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--landing-accent) 0%, var(--landing-violet) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 32px var(--landing-glow);
}

.landing-btn-primary:hover {
  filter: brightness(1.06);
}

.landing-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  font-family: inherit;
}

.landing-btn-ghost:hover {
  border-color: #94a3b8;
  color: #fff;
}

/* Hero visual */
.landing-hero-visual {
  position: relative;
  z-index: 2;
  min-height: 280px;
}

.landing-float-stack {
  position: relative;
  height: 320px;
}

.landing-float-card {
  position: absolute;
  background: var(--landing-surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  color: var(--landing-ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: landing-float 5s ease-in-out infinite;
}

.landing-float-card:nth-child(1) {
  top: 8%;
  left: 0;
  width: 58%;
  animation-delay: 0s;
}

.landing-float-card:nth-child(2) {
  top: 38%;
  right: 0;
  width: 62%;
  animation-delay: -1.6s;
}

.landing-float-card:nth-child(3) {
  bottom: 6%;
  left: 12%;
  width: 55%;
  animation-delay: -3.2s;
}

@keyframes landing-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.landing-metrics {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  margin-top: 0.5rem;
}

.landing-metric-bar {
  flex: 1;
  min-width: 6px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #38bdf8 0%, var(--landing-violet) 100%);
  animation: landing-bar-grow 2.4s ease-in-out infinite;
}

.landing-metric-bar:nth-child(1) {
  height: 35%;
  animation-delay: 0s;
}
.landing-metric-bar:nth-child(2) {
  height: 55%;
  animation-delay: 0.15s;
}
.landing-metric-bar:nth-child(3) {
  height: 80%;
  animation-delay: 0.3s;
}
.landing-metric-bar:nth-child(4) {
  height: 50%;
  animation-delay: 0.45s;
}
.landing-metric-bar:nth-child(5) {
  height: 65%;
  animation-delay: 0.6s;
}
.landing-metric-bar:nth-child(6) {
  height: 45%;
  animation-delay: 0.75s;
}
.landing-metric-bar:nth-child(7) {
  height: 90%;
  animation-delay: 0.9s;
}

@keyframes landing-bar-grow {
  0%, 100% {
    transform: scaleY(1);
    opacity: 0.85;
  }
  50% {
    transform: scaleY(1.12);
    opacity: 1;
  }
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.landing-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.15);
  color: #0369a1;
}

/* Sections */
.landing-section {
  position: relative;
  padding: 4rem 0;
}

.landing-section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.landing-section-sub {
  text-align: center;
  color: #94a3b8;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.landing-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-features .landing-feature.landing-reveal:nth-child(1) {
  transition-delay: 0s;
}
.landing-features .landing-feature.landing-reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.landing-features .landing-feature.landing-reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.landing-features .landing-feature.landing-reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.landing-steps .landing-step.landing-reveal:nth-child(1) {
  transition-delay: 0s;
}
.landing-steps .landing-step.landing-reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.landing-steps .landing-step.landing-reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.landing-features {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .landing-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .landing-features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.landing-feature {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.landing-feature:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-4px);
}

.landing-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%);
}

.landing-feature h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.landing-feature p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #94a3b8;
}

/* How it works */
.landing-steps {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .landing-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.landing-step {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  position: relative;
}

.landing-step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--landing-accent), var(--landing-violet));
  color: #fff;
  font-weight: 800;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--landing-glow);
}

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

.landing-step p {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .landing-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.65rem;
    width: 1.25rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(124, 58, 237, 0.5));
    transform: translateY(-50%);
    pointer-events: none;
  }
}

/* Contact form */
#contact.landing-section {
  padding-bottom: 3rem;
}

.landing-contact-card {
  max-width: 440px;
  margin: 0 auto;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.landing-contact-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.landing-contact-card .landing-contact-sub {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.landing-contact-success {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  font-size: 0.9375rem;
  text-align: center;
  line-height: 1.45;
}

.landing-contact-success.is-visible {
  display: block;
}

.landing-page .landing-form .form-group label {
  color: #e2e8f0;
  font-weight: 500;
}

.landing-page .landing-form input[type='text'],
.landing-page .landing-form input[type='tel'] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
  font-size: 1rem;
}

.landing-page .landing-form input[type='text']::placeholder,
.landing-page .landing-form input[type='tel']::placeholder {
  color: #64748b;
}

.landing-page .landing-form input[type='text']:focus,
.landing-page .landing-form input[type='tel']:focus {
  outline: none;
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.landing-page .landing-form .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--landing-accent) 0%, var(--landing-violet) 100%);
  color: #fff;
  font-size: 1rem;
}

.landing-page .landing-form .btn-primary:hover {
  filter: brightness(1.06);
}

.landing-page .error-message {
  margin-top: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.landing-footer-hint {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
  line-height: 1.55;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.landing-footer-hint code {
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.12);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #cbd5e1;
}

/* Footer */
.landing-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

.landing-footer-brand {
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

/* Safari-only typography spacing adjustments */
@supports (-webkit-touch-callout: none) {
  .landing-logo-text,
  .landing-hero h1,
  .landing-section-title,
  .landing-feature h3,
  .landing-contact-card h2 {
    letter-spacing: normal;
  }

  .landing-eyebrow {
    letter-spacing: 0.08em;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .landing-ring,
  .landing-float-card,
  .landing-metric-bar {
    animation: none !important;
  }

  .landing-float-card {
    transform: none;
  }

  .landing-metric-bar {
    animation: none !important;
    transform: none;
  }

  .landing-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .landing-feature:hover {
    transform: none;
  }
}
