/* Fullmark landing — matches fullmark-teal.html / platform tokens */

:root {
  --primary: #41838b;
  --primary-dark: #346a71;
  --primary-light: #6aadb4;
  --primary-dim: #bfd5d0;
  --secondary: #1ecbe1;
  --accent: #e0ca1d;
  --surface: #f5f8f8;
  --card: #ffffff;
  --text: #1a2628;
  --text-muted: #5a7275;
  --border: #d8eaeb;
  --radius: 14px;
  --header-h: 64px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
}

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

html {
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

/* ── Snap sections — exact viewport height ───────────────── */

.snap-section {
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snap-section__inner {
  width: min(1120px, 100%);
  padding: 0 1.5rem;
  max-height: calc(100svh - 2rem);
  overflow: hidden;
}

/* ── Carousel sections — full viewport layout ────────────── */

.snap-section.problem,
.snap-section.how {
  display: block;
  padding: 0;
}

.section-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  padding: calc(var(--header-h) + 1.25rem) 1.5rem 0;
  pointer-events: none;
}

.section-header .eyebrow { pointer-events: auto; }
.section-header h2       { pointer-events: auto; }

/* ── Nav ─────────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ── Section scroll cue (bottom arrow) ───────────────────── */

.section-scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  animation: bounce 2s ease-in-out infinite;
  transition: opacity 0.15s ease;
}

.section-scroll-cue:hover {
  opacity: 1;
}

.section-scroll-cue:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
  border-radius: 8px;
}

.section-scroll-cue span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .section-scroll-cue span,
.problem .section-scroll-cue span,
.showcase .section-scroll-cue span,
.how .section-scroll-cue span {
  color: var(--text-muted);
}

.section-scroll-cue svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.section-footer {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
}

.section-footer .carousel-dots {
  margin: 0;
  pointer-events: auto;
}

.section-footer .section-scroll-cue {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: auto;
  padding: 0.25rem 0.75rem;
  pointer-events: auto;
  animation-name: bounce-y;
}

.hero .section-scroll-cue svg,
.problem .section-scroll-cue svg,
.showcase .section-scroll-cue svg,
.how .section-scroll-cue svg {
  stroke: var(--primary);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateX(-50%) translateY(8px);
    opacity: 1;
  }
}

@keyframes bounce-y {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

.logo {
  display: block;
  line-height: 0;
}

.logo img {
  display: block;
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #fff;
}

.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: color-mix(in srgb, white 16%, transparent);
}

.nav-lang:hover {
  color: #fff;
  background: color-mix(in srgb, white 22%, transparent);
}

.nav-lang svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.nav-lang svg circle,
.nav-lang svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[dir="rtl"] .nav-lang {
  flex-direction: row-reverse;
}

.nav-cta {
  background: var(--accent);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}

.nav-cta:hover {
  opacity: 0.9;
}

[data-auth-only] {
  display: none;
}

html.is-authed .cta-row [data-auth-link] {
  display: none !important;
}

html.is-authed .cta-row [data-auth-only] {
  display: inline-flex !important;
}

.account-menu-wrap {
  position: relative;
  display: none;
}

.account-dashboard-mobile {
  display: none;
}

.account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid color-mix(in srgb, white 28%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, white 10%, transparent);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.account-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-end: 0;
  width: max-content;
  min-width: 172px;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  display: none;
  z-index: 420;
}

.account-menu.is-open {
  display: grid;
  gap: 0.3rem;
}

.account-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
}

.account-item--cta {
  background: var(--accent);
  border-color: transparent;
}

@media (max-width: 1024px) {
  .site-nav {
    padding-inline: 0.7rem;
  }

  .logo img {
    height: 24px;
  }

  .nav-links {
    gap: 0.45rem;
  }

  .nav-lang {
    padding: 0.35rem 0.5rem;
  }

  .nav-lang span {
    display: none;
  }

  [data-auth-desktop] {
    display: none !important;
  }

  .account-menu-wrap {
    display: block;
  }

  .account-dashboard-mobile {
    display: none;
  }
}

/* ── Typography ──────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, white);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, white);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

h1,
h2 {
  margin: 0 0 0.85rem;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

h1 em,
h2 em {
  font-style: normal;
  color: var(--primary);
}

.lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.text-center .lead {
  margin-inline: auto;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  background: var(--surface);
}

.hero-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.hero-logo {
  display: block;
  height: clamp(2rem, 5vw, 2.6rem);
  width: auto;
  margin: 0 auto 0.65rem;
}

.hero-tagline {
  margin: 0;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.hero-body {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

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

.problem {
  background: var(--card);
}

.problem .carousel--full .carousel-slide:nth-child(2) { background: var(--surface); }
.problem .carousel--full .carousel-slide:nth-child(3) { background: color-mix(in srgb, var(--primary-dim) 18%, var(--card)); }

.how .carousel--full .carousel-slide:nth-child(1) { background: var(--card); }
.how .carousel--full .carousel-slide:nth-child(2) { background: var(--surface); }
.how .carousel--full .carousel-slide:nth-child(3) { background: color-mix(in srgb, var(--primary-dim) 18%, var(--card)); }

/* ── Showcase (quiz card from brand reference) ───────────── */

.showcase {
  background: var(--surface);
}

.showcase-layout {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 900px) {
  .showcase-layout {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.quiz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: 0 8px 40px color-mix(in srgb, var(--primary) 12%, transparent);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.quiz-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quiz-progress {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 40%;
  background: var(--primary);
  border-radius: 2px;
}

.demo-q {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.demo-options {
  display: grid;
  gap: 0.45rem;
}

.demo-opt {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  background: var(--surface);
  text-align: start;
}

.demo-opt--on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, white);
  animation: pick-opt 7s ease-in-out infinite;
}

.demo-feedback {
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #166534;
  background: color-mix(in srgb, #22c55e 14%, white);
  opacity: 0;
  animation: show-feedback 7s ease-in-out infinite;
}

@keyframes pick-opt {
  0%,
  35% {
    border-color: var(--border);
    background: var(--surface);
  }
  42%,
  100% {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, white);
  }
}

@keyframes show-feedback {
  0%,
  48% {
    opacity: 0;
    transform: translateY(4px);
  }
  55%,
  92% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
  }
}

/* ── How it works ─────────────────────────────────────────── */

.slide-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.step-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.65rem;
  line-height: 1;
}

.how {
  background: var(--card);
}

/* ── Sign up ─────────────────────────────────────────────── */

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

.signup .eyebrow {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.signup .eyebrow::before {
  background: var(--accent);
}

.signup h2 {
  color: #fff;
}

.signup .lead {
  color: rgba(255, 255, 255, 0.82);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-accent {
  background: var(--accent);
  color: var(--text);
}

.btn-accent:hover {
  opacity: 0.92;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.signup-footer {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

.signup-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Carousel ────────────────────────────────────────────── */

.carousel:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Full-viewport carousel (problem + how sections) */
.carousel--full {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
}

.carousel--full .carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
}

.carousel--full .carousel-track:active { cursor: grabbing; }

.carousel--full .carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: calc(var(--header-h) + 7rem) 1.5rem 5rem;
  text-align: center;
}

/* Card-style carousel (showcase section) */
.carousel {
  position: relative;
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-y;
  user-select: none;
}

.carousel--card {
  max-width: 440px;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.carousel-slide h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
}

.carousel-slide p {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 28rem;
}

.carousel-slide--step .step-num {
  font-size: 3rem;
  margin-bottom: 0;
}

.carousel-slide--step h3 {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.carousel-slide--step p {
  max-width: 28rem;
}

/* Showcase: quiz-card inside slide has no extra box-shadow */
.carousel--card .carousel-slide {
  padding: 0;
  border: none;
  background: transparent;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--primary);
  transform: scale(1.35);
}

.signup .carousel-dot {
  background: rgba(255, 255, 255, 0.3);
}

.signup .carousel-dot.is-active {
  background: var(--accent);
}

/* Showcase section layout */
.showcase-layout {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 900px) {
  .showcase-layout {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .carousel--card {
    max-width: 100%;
  }
}

/* ── Report slide ────────────────────────────────────────── */

.report-rows {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

.report-row--correct {
  background: color-mix(in srgb, #22c55e 10%, white);
  color: #166534;
}

.report-row--wrong {
  background: color-mix(in srgb, #ef4444 10%, white);
  color: #991b1b;
}

.report-badge {
  font-weight: 700;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.report-badge--correct { background: #22c55e; color: #fff; }
.report-badge--wrong   { background: #ef4444; color: #fff; }

/* ── Catalog slide ───────────────────────────────────────── */

.catalog-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.catalog-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: start;
}

.catalog-item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.catalog-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.catalog-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: var(--secondary);
}

/* ── Reduced motion ──────────────────────────────────────── */

@media (max-width: 768px) {
  .section-scroll-cue,
  .demo-opt--on,
  .demo-feedback {
    animation: none !important;
  }
}

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

  .scroll-cue,
    .section-scroll-cue,
    .demo-opt--on,
    .demo-feedback,
    .carousel-track,
    .carousel--full .carousel-track,
    .carousel-dot {
    animation: none !important;
    transition: none !important;
  }
}
