/* KeysToProfit landing — Apple marketing language (2024–2026) */

:root {
  --apple-bg: #f5f5f7;
  --apple-bg-alt: #ffffff;
  --apple-dark: #000000;
  --apple-dark-elevated: #1d1d1f;
  --apple-label: #1d1d1f;
  --apple-secondary: #86868b;
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-active: #006edb;
  --apple-fill: #e8e8ed;
  --apple-hairline: rgba(0, 0, 0, 0.08);
  --apple-hairline-dark: rgba(255, 255, 255, 0.12);
  --nav-height: 48px;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--apple-label);
  background: var(--apple-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--apple-blue);
  text-decoration: none;
}

/* ——— Global Nav (frosted, Apple) ——— */
.globalnav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  height: var(--nav-height);
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.globalnav.is-scrolled {
  border-bottom-color: var(--apple-hairline);
  background: rgba(251, 251, 253, 0.92);
}

.globalnav-content {
  max-width: 980px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.globalnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--apple-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.globalnav-brand img {
  width: 22px;
  height: auto;
  opacity: 0.9;
}

.lang-switch {
  margin-left: auto;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--apple-hairline);
  background: rgba(255, 255, 255, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231d1d1f' d='M1 1l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  border-radius: 980px;
  padding: 4px 24px 4px 10px;
  font: inherit;
  font-size: 12px;
  color: var(--apple-label);
  cursor: pointer;
  line-height: 1.33337;
}

.lang-switch select:focus {
  outline: 2px solid rgba(0, 113, 227, 0.35);
  outline-offset: 2px;
}

.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;
}

.globalnav-links {
  display: none;
  gap: 28px;
  margin-right: 8px;
}

.globalnav-links a {
  color: var(--apple-label);
  font-size: 12px;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.globalnav-links a:hover {
  opacity: 1;
}

/* ——— Buttons ——— */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--apple-blue);
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.17648;
  letter-spacing: -0.022em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.25s var(--ease-spring);
}

.button:hover {
  background: var(--apple-blue-hover);
}

.button:active {
  background: var(--apple-blue-active);
  transform: scale(0.98);
}

.button-nav {
  padding: 4px 11px;
  font-size: 12px;
  line-height: 1.33337;
}

.button-large {
  padding: 12px 22px;
  font-size: 18px;
}

.text-link {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--apple-blue);
  transition: color 0.2s ease;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ——— Typography (Apple scale) ——— */
.eyebrow {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19048;
  letter-spacing: 0.011em;
  color: var(--apple-label);
}

.typography-headline {
  margin: 0;
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--apple-label);
}

.typography-intro {
  margin: 18px 0 0;
  max-width: 520px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.381;
  letter-spacing: 0.011em;
  color: var(--apple-secondary);
}

.typography-section {
  margin: 0;
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 600;
  line-height: 1.07143;
  letter-spacing: -0.005em;
  color: inherit;
}

.typography-subheader {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: 21px;
  line-height: 1.381;
  letter-spacing: 0.011em;
  color: var(--apple-secondary);
}

.unit-dark .typography-subheader {
  color: #a1a1a6;
}

/* ——— Units / sections ——— */
.unit {
  padding: 80px 22px;
  max-width: 980px;
  margin: 0 auto;
}

.unit-light {
  max-width: none;
  background: var(--apple-bg);
  padding-left: 0;
  padding-right: 0;
}

.unit-light > .unit-copy,
.unit-light > .tile-grid,
.unit-light > .routine {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.unit-dark {
  max-width: none;
  background: var(--apple-dark);
  color: #f5f5f7;
  padding: 100px 0;
}

.unit-dark > .unit-copy,
.unit-dark > .split-list {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.unit-copy {
  margin-bottom: 48px;
  text-align: center;
}

.unit-copy .typography-subheader {
  margin-left: auto;
  margin-right: auto;
}

/* ——— Hero ——— */
.hero {
  min-height: calc(100svh - var(--nav-height));
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 113, 227, 0.06), transparent 55%),
    var(--apple-bg-alt);
  max-width: none;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

.cta-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 28px;
}

.hero-stage {
  position: relative;
  width: min(920px, 100%);
  margin-top: clamp(36px, 8vh, 72px);
  padding: 0 12px 24px;
  display: grid;
  place-items: center;
}

.hero-glow {
  position: absolute;
  width: min(70%, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.12) 0%, transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-product {
  position: relative;
  width: min(78%, 560px);
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.12));
  transform: translateZ(0);
}

/* ——— Feature tiles ——— */
.tile-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.tile {
  background: var(--apple-bg-alt);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: left;
}

.tile h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.011em;
  color: var(--apple-label);
}

.tile p {
  margin: 0;
  font-size: 17px;
  color: var(--apple-secondary);
}

/* ——— Dark split list ——— */
.split-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--apple-hairline-dark);
}

.split-list article {
  padding: 28px 0;
  border-bottom: 1px solid var(--apple-hairline-dark);
}

.split-list h3 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.009em;
}

.split-list p {
  margin: 0;
  font-size: 17px;
  color: #a1a1a6;
  max-width: 36em;
}

/* ——— Routine steps ——— */
.routine {
  list-style: none;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  gap: 32px;
  max-width: 720px;
}

.routine li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  text-align: left;
}

.routine-index {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--apple-fill);
  color: var(--apple-label);
  font-size: 17px;
  font-weight: 600;
}

.routine h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.009em;
}

.routine p {
  margin: 0;
  color: var(--apple-secondary);
  font-size: 17px;
}

/* ——— Download CTA ——— */
.unit-cta {
  max-width: none;
  background: var(--apple-bg);
  padding: 100px 22px 120px;
}

.cta-panel {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.cta-icon {
  margin: 0 auto 20px;
  opacity: 0.92;
}

.cta-panel .typography-subheader {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
}

.legal {
  margin: 20px auto 0;
  max-width: 420px;
  font-size: 12px;
  line-height: 1.33337;
  color: var(--apple-secondary);
}

/* ——— Footer ——— */
.footer {
  background: var(--apple-bg);
  border-top: 1px solid var(--apple-hairline);
  padding: 18px 22px 28px;
}

.footer-content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--apple-secondary);
}

.footer-brand {
  color: var(--apple-label);
  font-weight: 600;
}

/* ——— Motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--ease-spring),
    transform 0.9s var(--ease-spring);
  will-change: opacity, transform;
}

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

.hero-copy.reveal {
  transition-delay: 0.05s;
}

.hero-stage.reveal {
  transition-delay: 0.18s;
}

@supports (animation-timeline: view()) {
  .tile,
  .split-list article,
  .routine li {
    animation: rise-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (min-width: 834px) {
  .globalnav-links {
    display: flex;
    margin-left: auto;
  }

  .lang-switch {
    margin-left: 0;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 72px);
  }

  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .split-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: none;
  }

  .split-list article {
    padding: 0 28px;
    border-bottom: none;
    border-left: 1px solid var(--apple-hairline-dark);
  }

  .split-list article:first-child {
    padding-left: 0;
    border-left: none;
  }

  .split-list article:last-child {
    padding-right: 0;
  }

  .unit,
  .unit-light,
  .unit-dark {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .tile,
  .split-list article,
  .routine li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
