/* Landing page for tytrate.com (T-172, rebuilt in T-173 for a student audience).
   Plain CSS, no build step, no CDN: the folder is uploaded to the shared host as it is.
   Colours and radii are the app's design tokens (ADR-034) so the site and the app match. */

:root {
  --brand-50: #effcf9;
  --brand-100: #d2f5ee;
  --brand-300: #6fd6c6;
  --brand-600: #148075;
  --brand-700: #0f6b62;
  --brand-800: #0e554f;
  --brand-900: #0c4541;
  --accent-100: #fdf0c7;
  --accent-400: #f5b83d;
  --accent-600: #b77708;
  --canvas: #f6f7f6;
  --surface: #ffffff;
  --surface-muted: #f1f3f2;
  --ink: #17201e;
  --ink-muted: #56625f;
  --border: #d9dfdd;
  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #b3261e;
  --danger-soft: #fde8e6;
  --radius-card: 1rem;
  --radius-control: 0.75rem;
  --shadow-card:
    0 1px 2px rgb(15 35 32 / 0.06), 0 4px 16px rgb(15 35 32 / 0.06);
  --shadow-raised: 0 12px 40px rgb(15 35 32 / 0.18);
  --tap: 2.75rem;
  /* Noto Sans Bengali ships with most Android and Windows devices; the stack degrades quietly. */
  --font:
    "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* `display` on a class beats the browser's own rule for the hidden attribute, and .btn sets
   inline-flex — so say it explicitly or hidden buttons stay on screen. */
[hidden] {
  display: none !important;
}

/* Before the app was live, <body class="prelaunch"> swapped every link into the app for a
   "coming soon" badge or an email. Removing that one class restores all of them.

   Both rules have to out-specify `.btn` and `.badge-soon`, which set `display: inline-flex`
   further down this file. `.when-soon { display: none }` on its own lost that cascade — same
   specificity, later in the file — so taking the class off the body showed the live buttons
   *and* the coming-soon ones. Only the prelaunch state had ever been looked at. */
body:not(.prelaunch) .when-soon {
  display: none;
}

.prelaunch .when-live {
  display: none;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.9rem;
  border-radius: var(--radius-control);
  background: var(--accent-100);
  border: 1px solid var(--accent-400);
  color: var(--accent-600);
  font-size: 0.85rem;
  font-weight: 700;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Bangla runs taller than Latin. */
html[lang="bn"] body {
  line-height: 1.8;
}

.wrap {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.wrap.narrow {
  max-width: 44rem;
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-700);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 20;
}

.skip:focus {
  left: 0;
}

a {
  color: var(--brand-700);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5rem;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

.small {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 0.35rem;
}

html[lang="bn"] .kicker {
  text-transform: none;
  letter-spacing: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.lang-btn {
  min-height: 2.25rem;
  padding: 0 0.7rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.lang-btn.is-on {
  background: var(--brand-700);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 1.1rem;
  border-radius: var(--radius-control);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s ease-out,
    background-color 0.15s ease-out;
}

.btn:active {
  transform: scale(0.98);
}

.btn-lg {
  min-height: 3.25rem;
  padding: 0 1.6rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--brand-700);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  background: var(--brand-800);
}

.btn-accent {
  background: var(--accent-400);
  color: #3d2a04;
  border: 0;
  box-shadow: var(--shadow-card);
}

.btn-accent:hover {
  background: #ecac2b;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand-700);
}

.btn-ghost:hover {
  background: var(--brand-50);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(48rem 26rem at 88% -15%, var(--brand-100), transparent 62%),
    radial-gradient(36rem 22rem at -5% 0%, var(--accent-100), transparent 58%);
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 62rem) {
  .hero-inner {
    grid-template-columns: 1.15fr 1fr;
    gap: 3rem;
    align-items: center;
  }
}

.pill {
  display: inline-block;
  background: var(--brand-700);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 34rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0 1.5rem;
}

/* The arrow points at wherever the question card actually is. page.js measures the card and
   sets data-arrow; the default below covers the no-script case, where the card is under the
   button on a phone and beside it on a wide screen. Drawn with ::after so the language switch,
   which rewrites the button's text, cannot lose it. */
.cta-try::after {
  content: "↓";
  margin-inline-start: 0.45rem;
}

@media (min-width: 62rem) {
  .cta-try::after {
    content: "→";
  }
}

.cta-try[data-arrow="down"]::after {
  content: "↓";
}

.cta-try[data-arrow="right"]::after {
  content: "→";
}

.cta-try[data-arrow="left"]::after {
  content: "←";
}

.proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.proof strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}

.proof span {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* The playable question */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
  padding: 1.25rem;
  scroll-margin-top: 5rem;
}

.quiz-ask {
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.chip {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition:
    border-color 0.12s ease-out,
    background-color 0.12s ease-out;
}

.chip:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  color: var(--brand-700);
}

.chip.is-on {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}

.quiz-body {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.quiz-count {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.quiz-stem {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.quiz-options {
  display: grid;
  gap: 0.5rem;
}

.quiz-option {
  width: 100%;
  min-height: var(--tap);
  text-align: start;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.12s ease-out,
    background-color 0.12s ease-out;
}

.quiz-option:hover:enabled {
  border-color: var(--brand-300);
  background: var(--brand-50);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.is-right {
  border-color: var(--success);
  background: var(--success-soft);
  font-weight: 700;
}

.quiz-option.is-wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.quiz-feedback {
  margin: 0.85rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-muted);
}

.quiz-feedback.is-right {
  color: var(--success);
}

.quiz-feedback.is-wrong {
  color: var(--danger);
}

/* Bands */
.band {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.band-quiet {
  background: var(--surface-muted);
}

.band-dark {
  background: linear-gradient(160deg, var(--brand-800), var(--brand-900));
  color: #eaf5f2;
}

.band-dark .kicker {
  color: var(--brand-300);
}

.band-dark h2 {
  color: #fff;
}

.band-cta {
  background: linear-gradient(160deg, var(--brand-700), var(--brand-900));
  color: #eaf5f2;
}

.band-cta h2 {
  color: #fff;
}

.band-cta .note a {
  color: var(--brand-300);
}

.band-cta .note {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.4s ease-out,
    opacity 0.4s ease-out;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.97rem;
}

.card-ico {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.reveal.is-hidden {
  opacity: 0;
  transform: translateY(12px);
}

/* Dark band: habit and streak */
.two-col {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 52rem) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.two-col p {
  color: var(--ink-muted);
}

.band-dark .two-col p {
  color: #cfe6e1;
}

.ticks {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.ticks li {
  padding-inline-start: 1.75rem;
  position: relative;
  color: #d8eae6;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent-400);
  font-weight: 800;
}

.phone {
  justify-self: center;
  width: min(19rem, 100%);
  background: #0b3a36;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 1.75rem;
  padding: 0.85rem;
  box-shadow: var(--shadow-raised);
}

.phone-screen {
  background: #fff;
  color: var(--ink);
  border-radius: 1.25rem;
  padding: 1rem;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.phone-flame {
  font-size: 1.7rem;
}

.phone-row strong {
  display: block;
  font-size: 1.05rem;
}

.phone-row small {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

/* Label above the track, not inside it: a 41% bar cannot hold "Production 41%", and the
   Bangla labels are longer again. */
.bar-label {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.bar {
  background: var(--surface-muted);
  border-radius: 999px;
  height: 0.55rem;
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--brand-600), var(--brand-300));
  border-radius: 999px;
}

.phone-note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition:
    transform 0.4s ease-out,
    opacity 0.4s ease-out;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

/* FAQ */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.6rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}

.faq p {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #e7ecea;
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.site-footer a {
  color: #bfe9e2;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

.copyright {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #9fb0ac;
}

/* The phone-only sticky call to action */
.sticky-cta {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  border-radius: var(--radius-control);
  background: var(--accent-400);
  color: #3d2a04;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-raised);
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}

.sticky-cta.is-gone {
  opacity: 0;
  transform: translateY(120%);
  pointer-events: none;
}

@media (min-width: 48rem) {
  .sticky-cta {
    display: none;
  }
}

/* The sticky bar would otherwise sit on top of the last lines of the page. */
@media (max-width: 47.99rem) {
  .site-footer {
    padding-bottom: 5.5rem;
  }
}

:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
}
