/* ==========================================================================
   UCLAW — main.css
   Readability-first rewrite. Principles:
     • Large body type (18px base) with 1.7 line-height
     • High contrast: near-black ink on warm cream
     • Max reading width 66ch
     • Generous vertical rhythm (48–96px between sections)
     • One accent colour: crimson. No gradients, no shadows, no animations
       unless they serve comprehension.
     • Single column by default. No grid gymnastics.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */

:root {
  --ink: #1a1510;
  --ink-2: #3f362c;
  --ink-3: #6a5e50;
  --cream: #fbf6ea;
  --cream-2: #f3ebd6;
  --line: #e4d7b8;
  --line-strong: #c8b98d;
  --red: #b4161b;
  --red-deep: #7f0d11;
  --red-soft: rgba(180, 22, 27, 0.08);

  --ff-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --ff-sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial,
    sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  --read: 66ch;   /* comfortable reading column */
  --wide: 1080px; /* for images / galleries */
}

/* --- Reset --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--red-deep); }
strong { color: var(--ink); }
em { color: var(--red-deep); font-style: italic; }

code {
  font-family: var(--ff-mono);
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--red-soft);
  border: 1px solid rgba(180, 22, 27, 0.18);
  color: var(--red-deep);
}
pre code {
  border: none;
  background: transparent;
  padding: 0;
}

/* --- Layout primitives --------------------------------------------------- */

.wrap {
  max-width: var(--read);
  margin: 0 auto;
  padding: 0 28px;
}
.wrap--wide {
  max-width: var(--wide);
}

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 80px 0;
  max-width: var(--read);
  margin-left: auto;
  margin-right: auto;
}

/* --- Header -------------------------------------------------------------- */

.nav {
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.nav__seal {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.nav__title {
  font-family: var(--ff-serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--red-deep);
  display: block;
  line-height: 1;
}
.nav__sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 4px;
}
.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav__links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav__links a:hover {
  color: var(--red);
}
.nav__cta {
  background: var(--red);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.nav__cta:hover {
  background: var(--red-deep);
}

@media (max-width: 740px) {
  .nav__links { display: none; }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding: 100px 28px 80px;
  text-align: center;
}
.hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 24px;
}
.hero__title {
  font-family: var(--ff-serif);
  font-weight: 900;
  font-size: clamp(42px, 6.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 auto 28px;
  max-width: 14ch;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--red-deep);
}
.hero__lede {
  max-width: 58ch;
  margin: 0 auto 36px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-2);
}
.hero__actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}
.btn--primary {
  background: var(--red);
  color: #fff;
}
.btn--primary:hover {
  background: var(--red-deep);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  color: var(--red-deep);
  border-color: var(--red);
}

/* --- Install block ------------------------------------------------------- */

.install {
  max-width: 620px;
  margin: 48px auto 0;
  padding: 24px 28px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 10px;
  text-align: left;
}
.install__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffb199;
  margin: 0 0 10px;
}
.install__cmd {
  display: block;
  font-family: var(--ff-mono);
  font-size: 15px;
  color: #fff;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 175, 160, 0.2);
  border-radius: 6px;
  margin: 0 0 12px;
  word-break: break-all;
}
.install__hint {
  font-size: 13px;
  color: #c7ac95;
  margin: 0;
  line-height: 1.55;
}

/* --- Section helpers ----------------------------------------------------- */

.section {
  padding: 80px 0;
}
.section--alt {
  background: var(--cream-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 14px;
}
.h2 {
  font-family: var(--ff-serif);
  font-weight: 900;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--ink);
}
.lede {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 40px;
  max-width: 64ch;
}

/* --- Prose paragraphs (for long text) ----------------------------------- */

.prose p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0 0 1.2em;
}
.prose p:last-child { margin-bottom: 0; }

/* --- Steps (how-it-works list) ------------------------------------------ */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps > li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.steps > li:last-child {
  border-bottom: 1px solid var(--line);
}
.steps__num {
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  padding-top: 6px;
  letter-spacing: 0.06em;
}
.steps h3 {
  font-family: var(--ff-serif);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.steps p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 56ch;
}

/* --- Demo video ---------------------------------------------------------- */

.demo {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  background: #0b0b0b;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.demo__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #000;
}

/* --- Screenshot gallery (the key new piece) ----------------------------- */

.shots {
  display: grid;
  gap: 72px;
}
.shot {
  max-width: 960px;
  margin: 0 auto;
}
.shot__caption {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.shot__tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  text-transform: uppercase;
}
.shot__title {
  font-family: var(--ff-serif);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}
.shot__img-wrap {
  background: #0b0b0b;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.shot__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.shot__explain {
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 66ch;
}

/* --- Course card (single highlight) ------------------------------------- */

.course {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 40px 28px 0;
}
.course__card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--red);
  color: #fff;
  padding: 44px 52px;
  border-radius: 14px;
  text-decoration: none !important;
}
.course__card:hover {
  background: var(--red-deep);
  color: #fff;
}
.course__code {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  text-transform: uppercase;
}
.course__title {
  font-family: var(--ff-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
  line-height: 1.1;
  color: #fff;
}
.course__sub {
  font-size: 15px;
  opacity: 0.92;
  margin: 0;
  color: #fff;
}
.course__arrow {
  font-family: var(--ff-serif);
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

/* --- Teacher card -------------------------------------------------------- */

.teacher {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: center;
}
.teacher__photo {
  background: #0b0b0b;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.teacher__photo img {
  border-radius: 6px;
  width: 100%;
  height: auto;
}
.teacher__name {
  font-family: var(--ff-serif);
  font-weight: 900;
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}
.teacher__handle {
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--red-deep);
  margin: 0 0 18px;
}
.teacher__body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 20px;
  max-width: 54ch;
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  margin-top: 80px;
  background: var(--ink);
  color: var(--cream);
  padding: 48px 28px;
}
.footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 36px;
  align-items: center;
}
.footer__brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer__brand .nav__seal {
  border-color: rgba(255, 255, 255, 0.1);
}
.footer__title {
  font-family: var(--ff-serif);
  font-weight: 900;
  font-size: 20px;
  color: #ffb199;
  margin: 0;
}
.footer__tag {
  font-size: 13px;
  opacity: 0.75;
  margin: 2px 0 0;
}
.footer__links {
  display: flex;
  gap: 28px;
  justify-content: center;
}
.footer__links a {
  font-size: 14px;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.8;
}
.footer__links a:hover { opacity: 1; color: #fff; }
.footer__copy {
  font-size: 12px;
  opacity: 0.6;
  margin: 0;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .teacher {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .course__card {
    grid-template-columns: 1fr;
    padding: 36px 32px;
    text-align: left;
  }
  .course__arrow { display: none; }
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  .footer__brand { justify-content: center; }
  .footer__links { flex-wrap: wrap; gap: 16px 22px; }
}

@media (max-width: 640px) {
  .hero { padding: 72px 24px 56px; }
  .section { padding: 64px 0; }
  .steps > li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .steps__num { padding: 0; }
}

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