/* ============================================================
   Study Crutch marketing site
   Shares the palette of the product so the site looks like the app.
   ============================================================ */

:root {
  --bg: #0b1020;
  --bg-soft: #101733;
  --panel: rgba(23, 31, 58, 0.72);
  --panel-solid: #171f3a;
  --panel-2: #1d2647;
  --line: rgba(148, 163, 214, 0.16);
  --line-strong: rgba(148, 163, 214, 0.3);
  --text: #eef1fb;
  --text-soft: #b6bfe0;
  --text-dim: #8b95bd;
  --accent: #7c9cff;
  --accent-2: #56e0c4;
  --accent-3: #f0a4ff;
  --warn: #ffcb6b;
  --ok: #58d9a3;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(4, 8, 22, 0.55);
  --shadow-sm: 0 6px 18px rgba(4, 8, 22, 0.35);
  --font: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-read: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --max: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(124, 156, 255, 0.16), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, rgba(86, 224, 196, 0.12), transparent 60%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 650;
}

h3 {
  font-size: 1.08rem;
  font-weight: 650;
}

p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0a0f22;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 650;
}

.skip-link:focus {
  left: 0;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: none;
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 550;
  transition: var(--transition);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--panel-2);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #6d8cf7);
  border-color: transparent;
  color: #0a0f22;
}

.btn.accent {
  background: linear-gradient(135deg, var(--accent-2), #3fd0b2);
  border-color: transparent;
  color: #05231d;
}

.btn.ghost {
  background: transparent;
}

.btn.large {
  padding: 15px 26px;
  font-size: 1.02rem;
}

/* A button that cannot do anything yet says so, and looks it. */
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn[disabled]:hover,
.btn[aria-disabled='true']:hover {
  transform: none;
  border-color: var(--line-strong);
}

/* ---------------- sections ---------------- */

section {
  padding: 84px 0;
}

section.tight {
  padding: 56px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.12rem;
  color: var(--text-soft);
}

/* ---------------- hero ---------------- */

.hero {
  padding: 76px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero p.lead {
  font-size: 1.18rem;
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.84rem;
  color: var(--text-soft);
  font-weight: 550;
}

/* mock app window */

.mock {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a5580;
}

.mock-title {
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.mock-body {
  display: grid;
  grid-template-columns: 128px 1fr;
  min-height: 320px;
}

.mock-side {
  border-right: 1px solid var(--line);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(16, 23, 51, 0.6);
}

.mock-side span {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 6px 9px;
  border-radius: 8px;
}

.mock-side span.on {
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
}

.mock-page {
  padding: 18px 20px;
  font-family: var(--font-read);
  font-size: 0.92rem;
  color: var(--text-soft);
}

.mock-page .line {
  padding: 3px 5px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.mock-page .line.spoken {
  background: rgba(255, 203, 107, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.5) inset;
  color: var(--text);
}

.mock-page .line.cited {
  background: rgba(86, 224, 196, 0.2);
  border-left: 3px solid var(--accent-2);
}

.mock-figure {
  margin-top: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------------- grids and cards ---------------- */

.grid {
  display: grid;
  gap: 18px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card .glyph {
  font-size: 1.7rem;
  display: block;
  margin-bottom: 12px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card.feature h3 {
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.16);
  color: var(--accent);
  border: 1px solid rgba(124, 156, 255, 0.3);
}

.badge.ok {
  background: rgba(88, 217, 163, 0.16);
  color: var(--ok);
  border-color: rgba(88, 217, 163, 0.32);
}

.badge.warn {
  background: rgba(255, 203, 107, 0.16);
  color: var(--warn);
  border-color: rgba(255, 203, 107, 0.32);
}

/* problem / solution split */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 24px;
  background: var(--panel);
}

.panel.bad {
  border-color: rgba(255, 122, 122, 0.28);
  background: rgba(255, 122, 122, 0.05);
}

.panel.good {
  border-color: rgba(88, 217, 163, 0.3);
  background: rgba(88, 217, 163, 0.05);
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ticks li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

.ticks li::before {
  content: '✔️';
  flex: none;
}

.ticks.crosses li::before {
  content: '✖️';
}

/* steps */

.steps {
  counter-reset: step;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* engine comparison table */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 0.94rem;
}

th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}

th {
  color: var(--text);
  font-weight: 650;
  background: var(--panel-2);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

td strong {
  color: var(--text);
}

/* quote */

.quote {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 28px;
  font-family: var(--font-read);
  font-size: 1.1rem;
  color: var(--text);
}

.quote footer {
  margin-top: 14px;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* faq */

.faq {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: none;
}

.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: '–';
}

.faq summary:hover {
  background: var(--panel-2);
}

.faq .answer {
  padding: 0 22px 20px;
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* cta */

.cta {
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  padding: 52px 40px;
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 156, 255, 0.2), transparent 70%),
    var(--panel-solid);
  box-shadow: var(--shadow);
}

.cta h2 {
  margin-bottom: 10px;
}

.cta .hero-actions {
  justify-content: center;
}

/* footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 34px;
  background: rgba(11, 16, 32, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 0.8fr);
  gap: 28px;
  margin-bottom: 30px;
}

.footer-grid h4 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  padding: 4px 0;
}

.footer-grid a {
  color: var(--text-soft);
  font-size: 0.93rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.87rem;
  color: var(--text-dim);
}

/* ---------------- pricing ---------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* Two plans read better centred and a little wider than a three-up grid. */
.plans.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 780px;
  margin: 0 auto;
}

.plan {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 26px;
  position: relative;
}

.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow);
}

.plan-flag {
  position: absolute;
  top: -12px;
  left: 26px;
}

.plan h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.plan .who {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.price .amount {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.price .per {
  font-size: 0.92rem;
  color: var(--text-dim);
}

.plan .ticks {
  margin: 18px 0 22px;
  flex: 1;
}

.plan .ticks li {
  font-size: 0.92rem;
  padding: 5px 0;
}

.plan .btn {
  width: 100%;
  justify-content: center;
}

/* Optional note under the plans, e.g. a limited-time offer. */
.pricing-callout {
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 203, 107, 0.06);
  padding: 20px 24px;
  margin-top: 26px;
  font-size: 0.95rem;
  color: var(--text-soft);
  text-align: center;
}

.pricing-callout strong {
  color: var(--text);
}

/* ---------------- forms ---------------- */

.site-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  /* Form fields are always black text on white, in every state, so typed text is never faint. */
  background: #ffffff;
  color: #000000;
  -webkit-text-fill-color: #000000;
  caret-color: #000000;
  color-scheme: light;
  font-family: inherit;
  font-size: 0.98rem;
  transition: var(--transition);
}

.site-input::placeholder {
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
  opacity: 1;
}

.site-input:hover,
.site-input:focus {
  background: #ffffff;
  color: #000000;
}

.site-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.18);
}

/* Browser autofill paints its own colours; a white inset shadow and a text fill keep it black on white. */
.site-input:-webkit-autofill,
.site-input:-webkit-autofill:hover {
  -webkit-text-fill-color: #000000;
  caret-color: #000000;
  box-shadow: 0 0 0 1000px #ffffff inset;
}

.site-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #000000;
  border-color: var(--accent);
  box-shadow:
    0 0 0 1000px #ffffff inset,
    0 0 0 3px rgba(124, 156, 255, 0.18);
}

.site-input:disabled {
  background: #f3f4f6;
  color: #374151;
  -webkit-text-fill-color: #374151;
  cursor: not-allowed;
}

textarea.site-input {
  resize: vertical;
  min-height: 120px;
}

select.site-input {
  cursor: pointer;
}

/* Long-form legal and about pages read better with roomier headings. */
main h2 + p,
main h2 + ul {
  margin-top: 0;
}

/* ---------------- accounts ---------------- */

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  max-width: 900px;
}

.auth-wrap.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 480px;
}

.auth-card {
  padding: 30px;
}

.auth-aside {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(16, 23, 51, 0.6);
  padding: 26px;
}

.auth-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.auth-steps li {
  padding: 5px 0;
}

.auth-message {
  min-height: 1.4em;
  font-size: 0.92rem;
  margin: 4px 0 12px;
  color: var(--text-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text);
}

.field .help {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.divider {
  height: 1px;
  background: var(--line);
}

.license-key {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-2);
}

.license-key code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  word-break: break-all;
}

.device-row {
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9em;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row.between {
  justify-content: space-between;
}

.col {
  display: flex;
  flex-direction: column;
}

.small {
  font-size: 0.9rem;
}

.muted {
  color: var(--text-dim);
}

/* ---------------- responsive ---------------- */

@media (max-width: 940px) {
  .hero-grid,
  .cols-4,
  .cols-3,
  .steps,
  .plans,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cols-2,
  .split,
  .plans.two,
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  section {
    padding: 60px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav .btn {
    justify-content: center;
    margin-top: 8px;
  }

  .mock-body {
    grid-template-columns: 1fr;
  }

  .mock-side {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}
