:root {
  --background: #ffffff;
  --foreground: #111111;
  --muted: #4e4e4e;
  --purple: #a072bd;
  --border: #dddddd;
  --font-geist-sans: "Geist";
  --font-instrument-serif: "Instrument Serif";
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.display-font {
  font-family: var(--font-instrument-serif), Georgia, serif;
  font-weight: 400;
}

.hero-glow {
  background:
    radial-gradient(circle at 58% 46%, rgb(208 185 222 / 74%) 0, rgb(208 185 222 / 34%) 18%, transparent 39%),
    radial-gradient(circle at 39% 48%, rgb(255 199 199 / 72%) 0, rgb(255 199 199 / 31%) 18%, transparent 40%),
    #fff;
}

.hero-section {
  display: flex;
  min-height: 1232px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 64px 24px 96px;
}

.primary-nav {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 34px;
  transform: translateX(-50%);
  border: 1px solid #dedede;
  border-radius: 999px;
  background: rgb(255 255 255 / 76%);
  padding: 10px 24px;
  box-shadow: 0 8px 28px rgb(50 39 57 / 0%);
  font-size: 16px;
  backdrop-filter: blur(18px);
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.primary-nav.is-scrolled {
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 8px 28px rgb(50 39 57 / 13%);
}

.nav-spacer {
  width: 1px;
  height: 56px;
  flex: 0 0 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.tama-mark {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.tama-mark > span {
  position: absolute;
  top: 10px;
  left: 3px;
  display: grid;
  grid-template-columns: repeat(6, 5px);
  grid-template-rows: repeat(3, 5px);
}

.tama-mark i {
  width: 5px;
  height: 5px;
  background: var(--muted);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 300;
}

.nav-links a,
footer nav a {
  transition: color 150ms ease;
}

.nav-links a:hover,
footer nav a:hover {
  color: var(--purple);
}

.hero-copy {
  display: flex;
  max-width: 1050px;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(3rem, 4.35vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-title span {
  display: block;
}

.hero-copy p {
  max-width: 850px;
  margin: 0;
  font-size: 20px;
  font-weight: 300;
}

.button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 24px;
  text-align: center;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.dialog-close:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

.button-primary {
  border-color: var(--purple);
  background: var(--purple);
  color: white;
}

.button-secondary {
  border-color: #dddddd;
  background: #ffffff;
  color: var(--muted);
}

.download-picker {
  display: flex;
  width: fit-content;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.download-platforms {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
}

.hero-section > .download-picker {
  margin-top: 40px;
}

.hero-section > .download-picker > .button {
  min-height: 62px;
  padding-inline: 28px;
  font-size: 20px;
}

.hero-shot {
  width: min(100%, 960px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-top: 40px;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: white;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#features {
  scroll-margin-top: 64px;
}

.feature-section {
  padding: 0 24px;
}

.feature-grid {
  display: grid;
  width: 100%;
  max-width: 1200px;
  grid-template-columns: minmax(0, 1fr) 500px;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  margin: 0 auto;
  padding: 32px;
}

.feature-copy {
  max-width: 600px;
}

.feature-title {
  margin: 0;
  font-size: clamp(3rem, 4.35vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.feature-subtitle {
  margin: 34px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.feature-description {
  max-width: 590px;
  margin: 22px 0 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
}

.feature-shot {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 26.667px;
  justify-self: end;
}

.feature-image {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
}

.feature-shot-standard .feature-image {
  top: 7.2%;
  left: 7.3%;
  width: 170.3%;
}

.flashcards-window {
  position: absolute;
  top: 8.83%;
  left: 8.17%;
  width: 130.67%;
  height: 99.5%;
  overflow: hidden;
  border-radius: 12.5px;
}

.feature-shot-flashcards .feature-image {
  top: -17.91%;
  left: -34.62%;
  width: 130.32%;
}

.pricing-section {
  scroll-margin-top: 32px;
  padding: 96px 24px 80px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
}

.section-heading p {
  margin: 30px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  max-width: 732px;
  grid-template-columns: repeat(2, minmax(0, 350px));
  gap: 32px;
  margin: 64px auto 0;
}

.pricing-card {
  min-height: 530px;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 32px 28px;
}

.pricing-card h3 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
}

.pricing-description {
  min-height: 72px;
  margin: 30px 0 18px;
  font-weight: 700;
  line-height: 1.35;
}

.pricing-card > .button,
.pricing-card > .pricing-cta,
.pricing-card > .download-picker,
.pricing-card > .download-picker > .button {
  width: 100%;
}

.pricing-card .download-platforms {
  font-size: 12px;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-list img {
  flex: 0 0 20px;
}

.faq-section {
  padding: 40px 24px 96px;
}

.faq-list {
  width: 100%;
  max-width: 600px;
  margin: 56px auto 0;
}

.faq-list details {
  border-bottom: 1px solid #d9d9d9;
}

.faq-list summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  font-size: 16px;
  list-style: none;
}

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

.faq-chevron {
  flex: 0 0 12px;
  transition: transform 150ms ease;
}

.faq-list details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-list details p {
  margin: 0;
  padding: 0 32px 20px 0;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}

footer {
  display: flex;
  max-width: 820px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.footer-main {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  font-weight: 300;
}

.footer-legal {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
}

.footer-legal a,
.faq-list details p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal a:hover,
.faq-list details p a:hover {
  color: var(--purple);
}

.beta-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 32px), 640px);
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 1px solid #dfd4e6;
  border-radius: 28px;
  padding: 32px;
  background: #fff;
  box-shadow: 0 28px 100px rgb(61 42 72 / 24%);
}

.beta-dialog::backdrop {
  background: rgb(28 21 32 / 46%);
  backdrop-filter: blur(5px);
}

.beta-dialog.download-dialog {
  width: min(calc(100% - 32px), 960px);
}

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

.platform-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
  border: 1px solid #ddd7e1;
  border-radius: 20px;
  padding: 20px;
}

.platform-card.is-recommended {
  border-color: var(--purple);
  box-shadow: inset 0 0 0 1px var(--purple);
  background: #fcf9fd;
}

.platform-heading {
  display: flex;
  min-height: 58px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.platform-heading h3 {
  margin: 0;
  font-size: 21px;
}

.platform-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.platform-heading > span {
  border-radius: 999px;
  background: #eee1f5;
  padding: 4px 8px;
  color: #76518c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.platform-card > .button {
  width: 100%;
  min-height: 48px;
  padding-block: 10px;
}

.alternative-downloads {
  display: flex;
  min-height: 44px;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 13px;
}

.alternative-downloads > span {
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alternative-downloads a,
.all-releases-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.download-loading {
  border-radius: 18px;
  background: #f7f2f9;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.download-fallback {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 18px;
  background: #f7f2f9;
  padding: 24px;
}

.download-fallback p {
  margin: 0;
}

.all-releases-link {
  display: block;
  width: fit-content;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dialog-eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-header h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
}

.dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: white;
  font-size: 25px;
  line-height: 1;
}

.dialog-intro {
  max-width: 510px;
  margin: 24px 0;
  color: var(--muted);
}

.beta-form,
.form-success {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.beta-form label:not(.checkbox-label) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 16px;
}

.beta-form input[type='email'],
.beta-form select,
.beta-form textarea {
  width: 100%;
  border: 1px solid #d7d0db;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font-weight: 400;
}

.beta-form textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 3px;
  accent-color: var(--purple);
}

.form-error {
  margin: 0;
  color: #a62626;
}

.form-submit {
  width: 100%;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-success {
  border-radius: 18px;
  background: #f8f3fa;
  padding: 24px;
}

.form-success p {
  margin: 0;
  font-size: 18px;
}

.legal-page {
  min-height: 100vh;
  padding: 48px 24px 96px;
}

.legal-page > header,
.legal-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.legal-content {
  margin-top: 72px;
}

.legal-content h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 7vw, 64px);
  line-height: 1;
}

.legal-content h2 {
  margin: 40px 0 12px;
  font-size: 28px;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1080px) {
  .hero-section {
    min-height: auto;
    padding-top: 32px;
  }

  .feature-section {
    padding-block: 0;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 600px);
    justify-content: center;
    padding-block: 64px;
  }

  .feature-shot {
    grid-row: 2;
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .hero-section {
    padding-inline: 16px;
  }

  .primary-nav {
    top: 16px;
    width: min(420px, calc(100% - 32px));
    justify-content: center;
    gap: 24px;
    padding-inline: 20px;
  }

  .nav-links {
    gap: 18px;
    font-size: 14px;
  }

  .hero-copy {
    margin-top: 56px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .feature-section {
    padding-inline: 16px;
  }

  .feature-grid {
    gap: 40px;
    padding-inline: 0;
  }

  .feature-subtitle {
    margin-top: 24px;
    font-size: 18px;
  }

  .feature-description {
    font-size: 16px;
  }

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

  .pricing-grid {
    max-width: 420px;
    grid-template-columns: 1fr;
  }

  .pricing-card {
    min-height: auto;
  }

  .form-row {
    flex-direction: column;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-heading {
    min-height: auto;
  }

  .footer-main {
    flex-direction: column;
    gap: 18px;
  }

  footer nav {
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .tama-mark {
    width: 30px;
    height: 32px;
    flex-basis: 30px;
  }

  .tama-mark > span {
    left: 0;
  }

  .primary-nav {
    width: min(330px, calc(100% - 32px));
    gap: 18px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .brand {
    gap: 2px;
  }

  .nav-links {
    gap: 12px;
    font-size: 14px;
  }

  .hero-title,
  .feature-title {
    font-size: 43px;
  }

  .hero-section > .download-picker {
    width: 100%;
  }

  .hero-section > .download-picker > .button {
    width: 100%;
    font-size: 16px;
  }

  .section-heading h2 {
    font-size: 52px;
  }

  .pricing-card h3 {
    font-size: 42px;
  }

  .beta-dialog {
    padding: 24px 20px;
  }

  .dialog-header h2 {
    font-size: 40px;
  }
}

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

  * {
    transition: none !important;
  }
}
