/* Inkword Flashcards — shared design tokens (exact palette) */
:root {
  --primary: #6D28D9;
  --on-primary: #FFFFFF;
  --secondary: #8B5CF6;
  --on-secondary: #0F172A;
  --accent: #DB2777;
  --on-accent: #FFFFFF;
  --background: #EEF2FF;
  --foreground: #1E1B4B;
  --card: #F6F2FD;
  --card-foreground: #1E1B4B;
  --muted: #EBEEF8;
  --muted-foreground: #5A687D;
  --border: #C7D2FE;
  --destructive: #DC2626;
  --on-destructive: #FFFFFF;
  --ring: #6D28D9;

  /* Primary lightness scale (one hue) */
  --primary-900: #4C1D95;
  --primary-700: #6D28D9;
  --primary-500: #8B5CF6;
  --primary-300: #C4B5FD;
  --primary-100: #EDE9FE;
  --primary-50: #F5F3FF;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Nunito Sans", sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1024px;
  /* Negative spread keeps the drop BELOW the card — without it the 40px blur leaks a
     halo above the top edge that reads as a thick top border (measured, 28px). */
  --shadow-soft: 0 16px 40px -14px color-mix(in srgb, var(--primary) 22%, transparent);
  --transition-press: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--foreground);
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, var(--primary-100), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, color-mix(in srgb, var(--primary-300) 45%, var(--background)), transparent 50%),
    var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  color: var(--primary-900);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--foreground);
}

p {
  color: var(--foreground);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* —— Focus / a11y —— */
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.btn:focus-visible,
.navbar__link:focus-visible,
.navbar__cta:focus-visible,
.navbar__toggle:focus-visible,
.app-badge:focus-visible,
.footer__link:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform var(--transition-press),
    background-color var(--transition-press),
    border-color var(--transition-press),
    box-shadow var(--transition-press);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn--primary:hover {
  background: var(--primary-900);
  color: var(--on-primary);
  border-color: var(--primary-900);
}

/* Accent = one job only: the hero conversion CTA */
.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn--accent:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--accent) 88%, #000);
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--secondary:hover {
  background: var(--primary-100);
  color: var(--primary-900);
}

.btn--block {
  width: 100%;
}

.friction {
  margin-top: 0.65rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* —— Navbar —— */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--background) 88%, #fff);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-900);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.navbar__brand span {
  color: var(--primary);
}

.navbar__toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navbar__links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.navbar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
}

.navbar__link:hover,
.navbar__link[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-100);
}

.navbar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid var(--primary);
  transition: transform var(--transition-press), background-color var(--transition-press);
}

.navbar__cta:hover {
  background: var(--primary-900);
  border-color: var(--primary-900);
  color: var(--on-primary);
}

.navbar__cta:active {
  transform: scale(0.97);
}

@media (max-width: 760px) {
  .navbar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
  }

  .navbar__menu.is-open {
    display: flex;
  }

  .navbar__links {
    flex-direction: column;
  }

  .navbar__cta {
    width: 100%;
  }
}

/* —— Hero —— */
.hero {
  padding: 2.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero__plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--primary-100) 0%, transparent 42%),
    linear-gradient(200deg, color-mix(in srgb, var(--primary-300) 35%, transparent), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero__brand {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-900);
  margin-bottom: 0.75rem;
}

.hero__brand span {
  color: var(--primary);
}

.hero__title {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.85rem;
  max-width: 28ch;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--muted-foreground);
  max-width: 40ch;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start; /* buttons share a TOP line — the friction line under the primary must not sink the secondary (center would align it to the column middle) */
}

.hero__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__visual {
  justify-self: center;
  width: 100%;
  max-width: 420px;
}

.hero-mock {
  width: 100%;
  filter: drop-shadow(0 24px 48px color-mix(in srgb, var(--primary) 22%, transparent));
  animation: float-in 700ms ease both;
}

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

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

.reveal {
  animation: soft-rise 600ms ease both;
}

.reveal--delay-1 { animation-delay: 80ms; }
.reveal--delay-2 { animation-delay: 160ms; }
.reveal--delay-3 { animation-delay: 240ms; }

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

  .hero__title,
  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__actions,
  .hero__cta-wrap {
    align-items: center;
    justify-content: center;
  }

  .hero__visual {
    max-width: 340px;
    order: -1;
  }
}

/* —— Sections —— */
.section {
  padding: 3.25rem 0;
}

.section__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.6rem;
}

.section__subtitle {
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

.section--muted {
  background: color-mix(in srgb, var(--muted) 70%, transparent);
  border-block: 1px solid var(--border);
}

/* —— Bento feature grid —— */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.bento__card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
  transition: transform var(--transition-press), box-shadow var(--transition-press);
}

.bento__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.bento__card--wide {
  grid-column: span 3;
}

.bento__card--tall {
  grid-column: span 2;
}

.bento__card--full {
  grid-column: 1 / -1;
}

.bento__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-100);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento__icon svg {
  width: 26px;
  height: 26px;
}

.bento__title {
  font-size: 1.15rem;
}

.bento__body {
  color: var(--muted-foreground);
  font-size: 0.98rem;
  flex: 1;
}

.bento__media {
  margin-top: 0.25rem;
  border-radius: var(--radius);
  background: var(--primary-50);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .bento__card--wide,
  .bento__card--tall,
  .bento__card--full {
    grid-column: span 1;
  }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .bento__card--wide {
    grid-column: span 3;
  }

  .bento__card--tall {
    grid-column: span 2;
  }
}

/* —— Download / badges —— */
.download {
  text-align: center;
}

.download__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  background: var(--foreground);
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--foreground);
  transition: transform var(--transition-press), opacity var(--transition-press);
}

.app-badge:hover {
  opacity: 0.92;
  color: #fff;
  transform: translateY(-1px);
}

.app-badge:active {
  transform: scale(0.97);
}

.app-badge__meta {
  text-align: left;
  line-height: 1.2;
}

.app-badge__meta small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 500;
}

.app-badge__meta strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.app-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* —— Pricing —— */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 820px;
  margin-inline: auto;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.price-card--featured {
  border-color: var(--primary-300);
  background: linear-gradient(180deg, var(--primary-50), var(--card));
  box-shadow: var(--shadow-soft);
}

.price-card__label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.price-card__title {
  font-size: 1.4rem;
}

.price-card__price {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-900);
}

.price-card__price span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.price-card__body {
  color: var(--muted-foreground);
  flex: 1;
}

.price-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.25rem 0 0.75rem;
}

.price-card__list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--foreground);
  font-size: 0.95rem;
}

.price-card__list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}

/* —— Legal pages —— */
.legal {
  padding: 2.5rem 0 4rem;
}

.legal__inner {
  max-width: 720px;
  margin-inline: auto;
}

.legal h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.legal .effective {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.legal h2 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal li {
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.legal ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

/* —— Footer —— */
.footer {
  margin-top: auto;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-900);
  text-decoration: none;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer__link:hover {
  color: var(--primary);
}

.footer__copyright {
  width: 100%;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

main {
  flex: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
