/* Theme tokens — dark is the default fallback; JS sets data-theme on <html> */
:root {
  --bg: #050506;
  --bg-elevated: #111113;
  --text: #f5f5f7;
  --text-secondary: #9aa0a6;
  --accent: #0a84ff;
  --accent-text: #ffffff;
  --border: #232326;
  --shadow: rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
  --bg: #f8f7f4;
  --bg-elevated: #ffffff;
  --text: #1c1c1e;
  --text-secondary: #5b5f66;
  --accent: #007aff;
  --accent-text: #ffffff;
  --border: #e5e3de;
  --shadow: rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.section-heading {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 0;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  padding: 0.9rem 1.75rem;
  white-space: nowrap;
}

.button--pill {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

.button--large {
  padding: 1.1rem 2rem;
  font-size: 1.05rem;
}

/* Nav */

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  color: var(--accent);
  flex-shrink: 0;
}

.nav__wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.nav__links a:hover {
  color: var(--accent);
}

.nav__links-cta {
  display: none;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

/* Mobile nav: links collapse into a dropdown opened by the hamburger button */

@media (max-width: 859.98px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin-top: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: 0 20px 50px var(--shadow);
  }

  .nav__links.nav__links--open {
    display: flex;
  }

  .nav__links a {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
  }

  .nav__links a:hover {
    background: var(--bg);
  }

  .nav__links-cta {
    display: block;
  }

  .nav__cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.icon-sun,
.icon-moon {
  display: none;
}

:root[data-theme="light"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

/* Hero */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__headline {
  font-size: clamp(2.25rem, 1.4rem + 4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
}

.hero__subhead {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  max-width: 40ch;
  margin: 1.5rem 0 0;
}

.hero .button {
  margin-top: 2rem;
}

.hero__image {
  width: 100%;
  max-width: 720px;
  margin-top: 3.5rem;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 40px 90px var(--shadow);
}

.theme-img--light {
  display: none;
}

.theme-img--dark {
  display: block;
}

:root[data-theme="light"] .theme-img--light {
  display: block;
}

:root[data-theme="light"] .theme-img--dark {
  display: none;
}

/* How it works */

.how-it-works {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 1.5rem 0;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.step {
  background: var(--bg-elevated);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 50px var(--shadow);
}

.step__number {
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
}

.step__title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.75rem 0 0;
}

.step__text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0.5rem 0 0;
}

/* Feature rows */

.feature {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.feature__text {
  max-width: 480px;
}

.feature__body {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.feature__image {
  width: 100%;
  max-width: 460px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px var(--shadow);
}

:root[data-theme="dark"] .feature__image,
:root[data-theme="dark"] .hero__image {
  border-color: rgba(255, 255, 255, 0.06);
}

.feature__text ul {
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 1.25rem;
  margin: 1rem 0 0;
}

.feature__text li + li {
  margin-top: 0.5rem;
}

/* Feature row variants: a full-width single image (source material,
   not an app screen) instead of the side-by-side portrait layout */

.feature--wide .feature__image {
  max-width: 720px;
}

@media (min-width: 860px) {
  .feature--wide {
    flex-direction: column;
  }

  .feature--wide .feature__text {
    max-width: 640px;
  }
}

/* Two small screens side by side — for sections that need a before/after
   (what you type -> what Yadger shows), reused wherever that pattern fits */

.feature__image-pair {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 460px;
}

.feature__image-step {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.feature__image-step .feature__image {
  max-width: none;
}

.feature__image-step figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.feature__image-pair-arrow {
  align-self: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

/* Narrow text sections interspersed between feature rows on content
   pages — same .page look, without the large top/bottom intro padding */

.page.page--section-only {
  padding: 4rem 1.5rem 3rem;
}

/* Quote */

.quote {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 1.5rem 0;
  text-align: center;
}

/* When the quote is the last thing before the footer (no .cta after it
   to supply the bottom gap), it needs its own — and the preceding
   section's own 3rem bottom padding means it doesn't need 6rem on top */

.quote--closing {
  padding: 3rem 1.5rem 5rem;
}

.quote__text {
  font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0;
}

/* CTA */

.cta {
  max-width: 700px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta__headline {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.cta .button {
  margin-top: 2rem;
}

/* Footer */

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.site-footer__brand {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
}

.site-footer__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__copyright {
  margin: 1.5rem 0 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (min-width: 860px) {
  .site-footer__row {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Simple content pages (Support, Pricing, Contact, Privacy, Terms) */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.page__heading {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 0;
}

.page__intro {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1rem 0 0;
  max-width: 60ch;
}

.page__section {
  margin-top: 3.5rem;
}

.page__section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.page p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.page ul,
.page ol {
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 1.25rem;
}

.page li + li {
  margin-top: 0.5rem;
}

.page a {
  color: var(--accent);
}

.page__subsection-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
}

.page__workflow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1.25rem 0 0;
}

.language-list {
  columns: 2;
  column-gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.language-list li {
  break-inside: avoid;
  padding: 0.35rem 0;
}

/* Pricing */

.pricing-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.plan-card {
  background: var(--bg-elevated);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 50px var(--shadow);
}

.plan-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.plan-card__price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 0;
}

.plan-card__price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-card__tokens {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0.75rem 0 0;
}

.pricing-disclaimer {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

@media (min-width: 860px) {
  .pricing-plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Waitlist form */

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
  max-width: 420px;
}

.waitlist-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.waitlist-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}

.waitlist-form__status {
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-height: 1.3em;
  margin: 0;
}

/* FAQ */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0.75rem 0 0;
}

/* Desktop layout */

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature {
    flex-direction: row;
    text-align: left;
  }

  .feature--reverse {
    flex-direction: row-reverse;
  }

  .feature__text {
    flex: 1;
  }

  .feature--reverse .feature__text {
    text-align: right;
  }

  .feature__image {
    flex: 1;
  }
}

/* Docs layout (sidebar + content + on-this-page nav) */

.docs {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.docs__content {
  min-width: 0;
  order: 3;
}

.docs__content .page {
  padding-top: 0;
}

.docs-sidebar,
.docs-page-nav {
  border: none;
  margin: 0 0 0.75rem;
}

.docs-sidebar summary,
.docs-page-nav summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  list-style: none;
}

.docs-sidebar summary::-webkit-details-marker,
.docs-page-nav summary::-webkit-details-marker {
  display: none;
}

.docs-sidebar summary::after,
.docs-page-nav summary::after {
  content: "▾";
  float: right;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.docs-sidebar[open] summary::after,
.docs-page-nav[open] summary::after {
  content: "▴";
}

.docs-sidebar {
  order: 1;
}

.docs-page-nav {
  order: 2;
  margin-bottom: 1.5rem;
}

.docs-sidebar__list,
.docs-page-nav__list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0 0.25rem;
}

.docs-sidebar__list a,
.docs-page-nav__list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

.docs-sidebar__list a:hover,
.docs-page-nav__list a:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.docs-sidebar__link--active,
.docs-page-nav__link--active {
  color: var(--accent) !important;
  font-weight: 600;
}

.docs-sidebar__link--active {
  background: var(--bg-elevated);
}

@media (min-width: 960px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 3rem;
    padding-top: 2.5rem;
    align-items: start;
  }

  .docs__content {
    order: 2;
  }

  .docs-sidebar {
    order: 1;
    position: sticky;
    top: 2rem;
  }

  .docs-page-nav {
    order: 3;
    position: sticky;
    top: 2rem;
  }

  .docs-sidebar summary,
  .docs-page-nav summary {
    pointer-events: none;
    border: none;
    padding: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
  }

  .docs-sidebar summary::after,
  .docs-page-nav summary::after,
  .docs-sidebar[open] summary::after,
  .docs-page-nav[open] summary::after {
    content: none;
  }

  .docs__content .page {
    max-width: none;
    margin: 0;
    padding: 0 0 4rem;
  }
}
