/*
  VoltEzy site styles, shared by every page.
  Colors mirror the app's light theme (VoltEzy shared/ui/theme/Color.kt) and
  the lesson-type and section colors used on the course path.
*/

:root {
  --ink: #11132b;
  --text: #3f4468;
  --muted: #666b8f;
  --line: #e6e8f1;
  --line-strong: #d5d8e8;

  --bg: #ffffff;
  --bg-soft: #f4f5fb;
  --bg-tint: #efeafd;
  --dark: #161a36;
  --dark-line: rgba(255, 255, 255, 0.12);

  --accent: #7c4de6;
  --accent-hover: #6d44d9;
  --accent-edge: #532fb0;
  --accent-ink: #5b34c4;

  /* Lesson types */
  --funda: #3da9fc;
  --puzzle: #3ecf8e;
  --quiz: #ffc53d;
  --fix: #ff5c7a;
  --project: #8b5cf6;

  /* Sections (darker shades so white numbers stay legible) */
  --s1: #6d44d9;
  --s2: #2380cc;
  --s3: #0b8a61;
  --s4: #c47c08;
  --s5: #be3379;
  --s6: #0891b2;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1160px;
  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.7rem + 3.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(2rem, 1.55rem + 1.8vw, 3rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(1.6rem, 1.35rem + 0.9vw, 2.1rem);
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

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

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: calc(var(--wrap) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.legacy-anchor {
  position: absolute;
  top: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* ---------- Buttons and store badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font: 600 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

/* Key-cap button, like the app's: a darker bottom edge that presses in. */
.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 3px 0 var(--accent-edge);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--accent-edge);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 178px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 12px;
  text-decoration: none;
}

.store svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
  white-space: nowrap;
}

.store-small {
  font-size: 11px;
  font-weight: 500;
}

.store-big {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.store--play {
  color: #fff;
  background: #000;
  box-shadow: inset 0 0 0 1px #a6a6a6;
}

.store--play .store-small {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store--play:hover {
  background: #1d1d1f;
}

.store--soon {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: default;
}

.store--soon svg {
  fill: currentColor;
}

/* ---------- Phone frame ---------- */

/* Sizing lives on .phone; the frame scales with it through container units. */
.phone {
  container-type: inline-size;
  margin: 0;
}

.phone-body {
  padding: 3.2cqw;
  border-radius: 16.5cqw;
  background: #0e1024;
  box-shadow:
    inset 0 0 0 0.6cqw #2c3052,
    0 44px 70px -34px rgba(17, 19, 43, 0.5),
    0 18px 36px -22px rgba(17, 19, 43, 0.35);
}

.phone-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13.4cqw;
}

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

.hero {
  padding: 64px 0 32px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.hero .lead {
  margin-top: 26px;
  max-width: 33rem;
  font-size: 1.22rem;
  line-height: 1.6;
}

.hero .store-row {
  margin-top: 38px;
}

.fineprint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.hero-media {
  position: relative;
  aspect-ratio: 520 / 620;
  max-width: 540px;
  justify-self: end;
  width: 100%;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 12% 0 6% 6%;
  border-radius: 32px;
  background: var(--bg-tint);
}

.hero-media .phone {
  position: absolute;
}

.hero-media .phone--back {
  left: 3%;
  top: 0;
  width: 45%;
}

.hero-media .phone--front {
  right: 3%;
  top: 11%;
  width: 49%;
}

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

.section {
  padding: 112px 0;
  position: relative;
}

.section--soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 40rem;
}

.section-head p {
  margin-top: 18px;
  font-size: 1.15rem;
}

/* ---------- Feature rows ---------- */

.features {
  margin-top: 72px;
  display: grid;
  gap: 120px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 72px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.feature--flip {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.feature--flip .feature-media {
  order: -1;
}

.type-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
  background: var(--c);
}

.feature h3 {
  margin-top: 16px;
}

.feature-copy > p {
  margin-top: 18px;
  font-size: 1.08rem;
}

.from-course {
  margin-top: 28px;
}

.from-course-label {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.specs li {
  font-size: 15px;
  line-height: 1.5;
}

.specs strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 600;
}

.feature-copy .engine-note {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.feature-media {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 5%;
  height: 560px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--tint);
}

.feature-media .phone {
  width: min(300px, 64%);
  margin-top: 56px;
}

.feature-media--pair .phone {
  width: min(250px, 44%);
}

.feature-media--pair .phone + .phone {
  margin-top: 104px;
}

/* ---------- Course ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.syllabus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.unit {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.unit-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.unit-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--sc);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.unit h3 {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.unit-meta {
  margin-top: 3px;
  color: var(--muted);
  font: 500 13px/1.3 var(--mono);
}

.unit-blurb {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.55;
}

.unit-lessons {
  display: grid;
  gap: 9px;
  margin: auto 0 0;
  padding: 18px 0 0;
  list-style: none;
}

.unit-lessons::before {
  content: "";
  display: block;
  margin: 2px 0 7px;
  border-top: 1px solid var(--line);
}

.unit-lessons li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.4;
}

.unit-lessons .dot {
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  transform: translateY(-1px);
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 64px;
}

.faq-intro {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.faq-intro p {
  margin-top: 18px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--muted);
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list summary:hover {
  color: var(--accent-ink);
}

.faq-a {
  max-width: 42rem;
  padding: 0 36px 24px 0;
}

.faq-a p + p {
  margin-top: 12px;
}

/* ---------- Download ---------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: 104px 0 0;
  background: var(--dark);
  color: #c7cae6;
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: end;
}

.cta-copy {
  padding-bottom: 104px;
}

.cta-icon {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.cta h2 {
  margin-top: 28px;
  color: #fff;
}

.cta-copy > p {
  margin-top: 18px;
  max-width: 30rem;
  font-size: 1.15rem;
}

.cta .store-row {
  margin-top: 36px;
}

.cta .store--soon {
  color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.cta-media {
  display: flex;
  justify-content: center;
  height: 440px;
  overflow: hidden;
}

.cta-media .phone {
  width: 280px;
}

.cta-media .phone-body {
  box-shadow:
    inset 0 0 0 0.6cqw #3a3f6b,
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

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

.site-footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer-brand p {
  max-width: 18rem;
  margin-top: 14px;
  color: var(--muted);
}

.footer-col h2 {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.footer-col ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-col .soon {
  color: var(--muted);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-base p:last-child {
  max-width: 44rem;
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 64px 0 112px;
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
}

.legal-doc h1 {
  font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem);
  letter-spacing: -0.04em;
}

.legal-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.legal-doc h1 + .legal-meta + p {
  margin-top: 36px;
}

.legal-doc h2 {
  margin-top: 48px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.legal-doc h3 {
  margin-top: 30px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.legal-doc p,
.legal-doc li {
  font-size: 16.5px;
  line-height: 1.7;
}

.legal-doc p {
  margin-top: 14px;
}

.legal-doc ul {
  margin: 14px 0 0;
  padding-left: 1.25rem;
}

.legal-doc li + li {
  margin-top: 8px;
}

.legal-doc strong {
  color: var(--ink);
  font-weight: 600;
}

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

@media (max-width: 1080px) {
  .syllabus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature {
    gap: 48px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    padding: 48px 0 16px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero-media {
    justify-self: center;
  }

  .section {
    padding: 88px 0;
  }

  .features {
    margin-top: 56px;
    gap: 88px;
  }

  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .feature--flip .feature-media {
    order: 0;
  }

  .feature-media {
    height: clamp(380px, 100vw, 540px);
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .faq-intro {
    position: static;
  }

  .cta {
    padding-top: 80px;
  }

  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .cta-copy {
    padding-bottom: 56px;
  }

  .cta-media {
    height: 300px;
  }

  .cta-media .phone {
    width: 240px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .hero .lead {
    font-size: 1.1rem;
  }

  .section {
    padding: 72px 0;
  }

  .section-head p {
    font-size: 1.05rem;
  }

  .feature-media {
    border-radius: 22px;
  }

  .feature-media .phone {
    margin-top: 40px;
  }

  .feature-media--pair .phone + .phone {
    margin-top: 72px;
  }

  .specs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .syllabus {
    grid-template-columns: minmax(0, 1fr);
  }

  .unit {
    padding: 22px 20px 20px;
  }

  .faq-list summary {
    padding: 18px 0;
    font-size: 1rem;
  }

  .faq-a {
    padding-right: 0;
  }

  .store {
    flex: 1 1 150px;
    min-width: 0;
    justify-content: center;
    gap: 9px;
    height: 52px;
    padding: 0 14px 0 12px;
  }

  .store svg {
    width: 22px;
    height: 22px;
  }

  .store-big {
    font-size: 17px;
  }

  .store-small,
  .store--play .store-small {
    font-size: 10px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .legal {
    padding: 44px 0 80px;
  }

  .legal-doc p,
  .legal-doc li {
    font-size: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
