/* ==========================================================================
   Freta — shared site styles
   Palette mirrors the app's DesignSystem/Color+Freta.swift
   ========================================================================== */

:root {
  /* Neutral surfaces (app dark mode) */
  --bg: #121212;
  --surface: #2e2e2e;
  --surface-light: #3d3d3d;
  --text: #ffffff;
  --text-secondary: #a6a6a6;

  /* Brand accents (constant across modes, same as the app) */
  --green: #58cc02;
  --green-light: #89e219;
  --green-dark: #45a603;
  --purple: #9e5cf5;
  --purple-dark: #703db8;
  --orange: #f5803d;
  --orange-dark: #b35724;
  --blue: #338cf2;
  --blue-dark: #2161ad;
  --pink: #f0619e;
  --pink-dark: #ad3d70;
  --red: #f04f59;
  --red-dark: #ad333d;
  --wood: #382117;
  --wood-dark: #24140f;
  --string: #dbd1ad;

  --radius: 20px;
  --radius-sm: 14px;
  --max-width: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Baloo 2", -apple-system, "SF Pro Rounded", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--surface);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

/* The generic .nav-links a color must not wash out the CTA button */
.nav-links a.btn-green,
.nav-links a.btn-green:hover { color: #10310a; }

/* --------------------------------------------------------------------------
   Chunky 3D buttons — same "depth rim" trick as the app's lesson nodes
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  color: #fff;
  padding: 14px 30px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

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

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent !important;
}

.btn-green   { background: var(--green);  box-shadow: 0 4px 0 var(--green-dark); color: #10310a; }
.btn-purple  { background: var(--purple); box-shadow: 0 4px 0 var(--purple-dark); }
.btn-outline {
  background: var(--surface);
  box-shadow: 0 4px 0 #1c1c1c;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(158, 92, 245, 0.42), transparent 68%),
    radial-gradient(800px 460px at 8% 108%, rgba(88, 204, 2, 0.16), transparent 65%),
    linear-gradient(180deg, #2a1552 0%, #1b1035 55%, var(--bg) 100%);
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #e6d9ff;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero h1 .hl-green  { color: var(--green-light); }
.hero h1 .hl-purple { color: #c9a1ff; }

.hero p.lede {
  font-size: 1.2rem;
  color: #d8ccf2;
  max-width: 34rem;
  margin-bottom: 32px;
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #b6a8d8;
  font-weight: 600;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(340px, 78vw);
  border-radius: 56px;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.35),
    0 34px 80px rgba(0, 0, 0, 0.5);
  transform: rotate(3deg);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section { padding: 84px 0; scroll-margin-top: 78px; }

.section-kicker {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 40rem;
  font-weight: 500;
}

.center { text-align: center; }
.center .section-sub { margin: 0 auto; }

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 5px 0 #1c1c1c;
  border: 2px solid #383838;
  transition: transform 0.15s ease;
}

.card:hover { transform: translateY(-4px); }

.card .icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  font-weight: 500;
}

.icon-green  { background: var(--green); }
.icon-purple { background: var(--purple); }
.icon-orange { background: var(--orange); }
.icon-blue   { background: var(--blue); }
.icon-pink   { background: var(--pink); }
.icon-red    { background: var(--red); }

/* Lesson path chips */
.path-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.chip {
  font-weight: 800;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
}

.chip-green  { background: var(--green); box-shadow: 0 4px 0 var(--green-dark); color: #10310a; }
.chip-purple { background: var(--purple); box-shadow: 0 4px 0 var(--purple-dark); }
.chip-blue   { background: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }
.chip-pink   { background: var(--pink); box-shadow: 0 4px 0 var(--pink-dark); }
.chip-red    { background: var(--red); box-shadow: 0 4px 0 var(--red-dark); }
.chip-orange { background: var(--orange); box-shadow: 0 4px 0 var(--orange-dark); }

/* Ranks ladder */
.ranks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 46px;
}

.rank {
  background: var(--surface);
  border: 2px solid #383838;
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 0 #1c1c1c;
  padding: 22px 12px;
  text-align: center;
}

.rank .emoji { font-size: 2rem; }

.rank h4 {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 800;
}

.rank span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Pro section */
.pro {
  background:
    radial-gradient(900px 420px at 50% -20%, rgba(158, 92, 245, 0.3), transparent 70%),
    var(--surface);
  border-radius: 28px;
  border: 2px solid #3a3a3a;
  box-shadow: 0 6px 0 #1c1c1c;
  padding: 60px 40px;
  text-align: center;
}

.price-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 34px 0 10px;
}

.price-card {
  background: var(--bg);
  border: 2px solid #3a3a3a;
  border-radius: var(--radius);
  box-shadow: 0 5px 0 #000;
  padding: 26px 34px;
  min-width: 220px;
  position: relative;
}

.price-card.best { border-color: var(--green); }

.price-card .tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #10310a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-card .amount {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-card .amount small {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.price-card .per {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
}

.pro-note {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 18px;
}

/* Final CTA */
.cta-final {
  text-align: center;
  padding: 90px 0 110px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  border-top: 2px solid var(--surface);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-inner nav {
  display: flex;
  gap: 22px;
}

.footer-inner a {
  text-decoration: none;
  color: var(--text-secondary);
}

.footer-inner a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Legal pages (terms / privacy)
   -------------------------------------------------------------------------- */
.legal-hero {
  background:
    radial-gradient(900px 380px at 70% -30%, rgba(158, 92, 245, 0.35), transparent 70%),
    linear-gradient(180deg, #241245 0%, var(--bg) 100%);
  padding: 72px 0 48px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal-hero p {
  color: #c9bce6;
  font-weight: 600;
  margin-top: 8px;
}

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}

.legal-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
  scroll-margin-top: 90px;
}

.legal-body h2:first-of-type { margin-top: 0; }

.legal-body h2 .num {
  color: var(--purple);
  margin-right: 6px;
}

.legal-body p, .legal-body li {
  color: #cfcfcf;
  font-size: 1.02rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.legal-body ul { padding-left: 24px; margin-bottom: 14px; }

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

.legal-body strong { color: var(--text); }

.legal-body a { color: #c9a1ff; }

.callout {
  background: var(--surface);
  border: 2px solid #3a3a3a;
  border-left: 6px solid var(--green);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 #1c1c1c;
  padding: 18px 22px;
  margin: 24px 0;
}

.callout p { margin: 0; }

.callout.purple { border-left-color: var(--purple); }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-card {
  background: var(--surface);
  border: 2px solid #3a3a3a;
  border-radius: var(--radius);
  box-shadow: 0 5px 0 #1c1c1c;
  padding: 32px 30px;
  margin: 28px 0 24px;
  text-align: center;
}

.contact-label {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.contact-email-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.contact-email {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  user-select: all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface-light);
  border: none;
  border-radius: 12px;
  box-shadow: 0 3px 0 #1c1c1c;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.copy-btn:hover { background: #474747; }

.copy-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 transparent;
}

.copy-btn.copied {
  background: var(--green);
  color: #10310a;
  box-shadow: 0 3px 0 var(--green-dark);
}

.contact-mail-btn { display: inline-block; }

.legal-body .contact-mail-btn,
.legal-body .contact-mail-btn:hover { color: #10310a; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { width: min(240px, 60vw); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .ranks { grid-template-columns: repeat(3, 1fr); }
  .path-strip { justify-content: center; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .ranks { grid-template-columns: 1fr 1fr; }
  .nav-links { gap: 14px; font-size: 0.85rem; }
  .pro { padding: 44px 22px; }
  section { padding: 64px 0; }
}
