/* LearnLocker marketing site. Palette matches the iOS design system. */

:root {
  --brand: #289163;
  --brand-deep: #14532d;
  --brand-soft: #e8f5ee;
  --ink: #0f1a14;
  --ink-muted: #4a5c52;
  --paper: #f3f7f4;
  --surface: #ffffff;
  --line: rgba(15, 26, 20, 0.1);
  --radius: 28px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-deep);
}

/* ----- Layout ----- */

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: 22px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.wordmark:hover {
  color: #fff;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

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

/* Legal pages use dark header on paper */

.page-legal .site-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.page-legal .wordmark,
.page-legal .nav-links a {
  color: var(--ink);
}

.page-legal .nav-links a:hover {
  color: var(--brand);
}

/* ----- Hero ----- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
  padding: 110px 0 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='rgba(255,255,255,0.16)'/%3E%3C/svg%3E");
  background-size: 28px 28px;
  opacity: 0.7;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 34rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 20px;
}

.hero-line {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 14px;
  color: #fff;
}

.hero-support {
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 28rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  color: inherit;
}

.btn-primary {
  background: #fff;
  color: var(--brand);
}

.btn-primary:hover {
  color: var(--brand-deep);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #fff;
}

/* Phone visual */

.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 900px;
}

.phone {
  width: min(280px, 78vw);
  aspect-ratio: 9 / 17.5;
  background: #10251b;
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(8, 30, 20, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transform: rotateY(-8deg) rotateX(4deg);
  animation: phone-in 1s ease both;
}

.phone-screen {
  height: 100%;
  border-radius: 26px;
  background: #163528;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  overflow: hidden;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: 700;
}

.phone-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}

.phone-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.app-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.app-icon {
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  animation: icon-breathe 3.2s ease-in-out infinite;
}

.app-icon:nth-child(2) { animation-delay: 0.2s; }
.app-icon:nth-child(3) { animation-delay: 0.4s; }
.app-icon:nth-child(4) { animation-delay: 0.6s; }

.app-icon.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(8, 24, 16, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-icon.locked::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 3px 3px 2px 2px;
  box-shadow: 0 -5px 0 -2px #fff;
}

.study-card {
  margin-top: auto;
  background: var(--brand);
  border-radius: 18px;
  padding: 14px;
  animation: study-rise 0.9s 0.35s ease both;
}

.study-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.study-card span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
  animation: fill-bar 2.4s 0.8s ease forwards;
}

/* ----- Sections ----- */

.section {
  padding: 88px 0;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 12px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 14px;
  max-width: 18ch;
}

.section-lead {
  margin: 0;
  color: var(--ink-muted);
  max-width: 36rem;
  font-size: 1.08rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 48px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
  border-top: 2px solid var(--brand);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brand);
  margin-bottom: 12px;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
}

.mode {
  padding: 8px 0;
}

.mode h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.mode p {
  margin: 0;
  color: var(--ink-muted);
}

.mode-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.pricing {
  padding-top: 0;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 44px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(20, 83, 45, 0.12);
}

.price-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.price {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.price span {
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--ink-muted);
}

.price-alt {
  margin: 0 0 22px;
  color: var(--ink-muted);
  font-weight: 700;
}

.price-card ul {
  margin: 22px 0 0;
  padding-left: 1.1rem;
}

.price-card li {
  margin-bottom: 10px;
  color: var(--ink-muted);
}

.price-card li::marker {
  color: var(--brand);
}

.trust {
  background: var(--brand-deep);
  color: #fff;
}

.trust h2 {
  color: #fff;
  max-width: 22ch;
}

.trust .section-lead {
  color: rgba(255, 255, 255, 0.78);
}

.trust-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.trust-points h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.trust-points p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.closing {
  text-align: center;
  padding: 96px 0;
}

.closing h2 {
  margin-inline: auto;
  max-width: 16ch;
}

.closing .section-lead {
  margin: 0 auto 28px;
}

.closing .cta-row {
  justify-content: center;
}

.closing .btn-ghost {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.closing .btn-ghost:hover {
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

/* ----- Footer ----- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  background: var(--surface);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--brand);
}

/* ----- Legal docs ----- */

.legal {
  width: min(720px, calc(100% - 40px));
  margin: 40px auto 80px;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.legal .meta {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0 0 28px;
}

.legal .summary {
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  padding: 16px 18px;
  margin: 0 0 36px;
  color: var(--ink);
  font-size: 1rem;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
  margin: 36px 0 12px;
}

.legal p,
.legal li {
  color: var(--ink);
}

.legal ul {
  padding-left: 1.2rem;
  margin: 0 0 12px;
}

.legal li {
  margin-bottom: 8px;
}

.legal li::marker {
  color: var(--brand);
}

/* ----- Motion ----- */

@keyframes phone-in {
  from {
    opacity: 0;
    transform: rotateY(-8deg) rotateX(4deg) translateY(24px);
  }
  to {
    opacity: 1;
    transform: rotateY(-8deg) rotateX(4deg) translateY(0);
  }
}

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

@keyframes fill-bar {
  to {
    width: 78%;
  }
}

@keyframes icon-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.97);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ----- Responsive ----- */

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-support {
    margin-inline: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone {
    transform: none;
    width: min(240px, 70vw);
  }

  .steps,
  .modes,
  .price-grid,
  .trust-points {
    grid-template-columns: 1fr;
  }

  .section h2 {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .nav-links a:not(.nav-keep) {
    display: none;
  }

  .hero {
    padding-top: 96px;
  }
}
