/*
 * MyTutorOS landing page (landing/). One stylesheet, no framework, no external fonts.
 * Colours follow the "mytutor" theme in monolith/application/web/shared/design/themes/
 * mytutor.theme.json. The app's Lexend/Nunito files are not in this repository (only their
 * licences are), so the page uses the system font stack; Lexend and Nunito are used only
 * when already installed on the viewer's machine.
 */

:root {
  color-scheme: light;
  --font-sans: "Lexend", "Nunito", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --canvas: #faf9ff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --border-strong: #94a3b8;

  --brand: #7c3aed;
  --brand-hover: #6d28d9;
  --brand-foreground: #ffffff;
  --brand-text: #7c3aed;
  --brand-soft: #f5f3ff;
  --brand-soft-border: #ddd6fe;
  --brand-soft-text: #5b21b6;

  --teal: #0f766e;
  --teal-soft: #f0fdfa;
  --teal-soft-text: #115e59;

  --notice-bg: #fffbeb;
  --notice-border: #fde68a;
  --notice-text: #92400e;

  --focus: #7c3aed;

  --hero-from: #ede9fe;
  --hero-mid: #f5f3ff;
  --hero-to: #ccfbf1;

  --radius-card: 16px;
  --radius-btn: 12px;
  --gutter: 16px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --canvas: #020617;
    --surface: #0f172a;
    --surface-muted: #1e293b;
    --text: #f8fafc;
    --text-muted: #cbd5e1;
    --border: #1e293b;
    --border-strong: #475569;

    --brand: #7c3aed;
    --brand-hover: #6d28d9;
    --brand-foreground: #ffffff;
    --brand-text: #c4b5fd;
    --brand-soft: #2e1065;
    --brand-soft-border: #5b21b6;
    --brand-soft-text: #ddd6fe;

    --teal: #2dd4bf;
    --teal-soft: #042f2e;
    --teal-soft-text: #99f6e4;

    --notice-bg: #271c05;
    --notice-border: #78350f;
    --notice-text: #fde68a;

    --focus: #a78bfa;

    --hero-from: #1e1b4b;
    --hero-mid: #0f172a;
    --hero-to: #042f2e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --canvas: #020617;
  --surface: #0f172a;
  --surface-muted: #1e293b;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --border: #1e293b;
  --border-strong: #475569;

  --brand: #7c3aed;
  --brand-hover: #6d28d9;
  --brand-foreground: #ffffff;
  --brand-text: #c4b5fd;
  --brand-soft: #2e1065;
  --brand-soft-border: #5b21b6;
  --brand-soft-text: #ddd6fe;

  --teal: #2dd4bf;
  --teal-soft: #042f2e;
  --teal-soft-text: #99f6e4;

  --notice-bg: #271c05;
  --notice-border: #78350f;
  --notice-text: #fde68a;

  --focus: #a78bfa;

  --hero-from: #1e1b4b;
  --hero-mid: #0f172a;
  --hero-to: #042f2e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--brand-text);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-foreground);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* Notice strip */
.notice {
  background: var(--notice-bg);
  color: var(--notice-text);
  border-bottom: 1px solid var(--notice-border);
  font-size: 0.9375rem;
}

.notice .wrap {
  padding-block: 10px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 64px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.9375rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Hero */
.hero {
  background: linear-gradient(105deg, var(--hero-from) 0%, var(--hero-mid) 45%, var(--hero-to) 100%);
  border-bottom: 1px solid var(--border);
}

.hero .wrap {
  padding-block: 56px 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--brand-soft-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-soft-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero h1 {
  max-width: 18ch;
  margin: 16px 0;
  font-size: clamp(2rem, 1.25rem + 3.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 42rem;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

.audiences {
  display: grid;
  gap: 12px;
  max-width: 42rem;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.audience {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.audience-label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audience-learners .audience-label {
  color: var(--teal);
}

.audience-creators .audience-label {
  color: var(--brand-text);
}

/* Buttons and links */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-foreground);
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-text);
  font-weight: 600;
}

/* Sections */
.section {
  padding-block: 56px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-intro {
  max-width: 42rem;
  margin: 0 0 28px;
  color: var(--text-muted);
}

/* Feature cards */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-soft-text);
}

.card-icon-teal {
  background: var(--teal-soft);
  color: var(--teal-soft-text);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Coming soon: dashed borders and no hover, so they do not read as links */
.soon-list {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.soon-item {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface-muted);
}

.soon-item h3 {
  margin: 10px 0 6px;
  font-size: 1.0625rem;
}

.soon-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-soft-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  padding-block: 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-text);
  font-weight: 600;
}

/* Privacy and terms pages */
.doc {
  padding-block: 40px 56px;
}

.doc h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  line-height: 1.2;
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.doc p,
.doc ul {
  max-width: 46rem;
}

.doc ul {
  padding-left: 1.25rem;
}

.placeholder-note {
  margin: 0 0 8px;
  padding: 12px 16px;
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 0.9375rem;
}

/* Wider screens */
@media (min-width: 640px) {
  .audiences {
    grid-template-columns: 1fr 1fr;
  }

  .cards,
  .soon-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
