/* The front page of analyze.dhat.news (src/http/landing-page.ts), on top of
   site.css: the same white page, Roboto, near-black text and YouTube's blue
   as the one accent (docs/plans/site-look.md), laid out as one long page
   with room to breathe. No script. Motion only for readers who allow it. */

:root {
  --landing-width: 1120px;
  --landing-narrow: 720px;
  --accent: var(--blue);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 64px -24px rgba(0, 0, 0, 0.28);
}

.landing-body {
  font: 400 16px/26px var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- header */

.landing-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--head-height);
  padding: 0 24px 0 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(12px);
}

.landing-head .brand {
  justify-self: auto;
}

.landing-nav {
  display: flex;
  gap: 28px;
}

.landing-nav a {
  color: var(--text-2);
  font: 500 14px/20px var(--font);
}

.landing-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ------------------------------------------------------------ layout */

.landing {
  max-width: var(--landing-width);
  margin: 0 auto;
  padding: 0 24px;
}

.landing-section {
  padding: 96px 0 0;
}

.landing h1,
.landing h2,
.landing h3 {
  color: var(--text);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.landing h2 {
  max-width: var(--landing-narrow);
  font: 700 40px/46px var(--font);
}

.landing h3 {
  font: 600 20px/28px var(--font);
  letter-spacing: -0.01em;
}

.landing p {
  margin: 0;
}

.landing-label {
  margin: 0 0 12px;
  color: var(--accent);
  font: 600 13px/20px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-sub {
  max-width: var(--landing-narrow);
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

.landing-fine {
  color: var(--text-2);
  font-size: 14px;
  line-height: 22px;
  text-wrap: pretty;
}

.landing-fine a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-fine a:hover {
  color: var(--text);
}

/* The two buttons: the one black pill, and its quiet twin inside a hairline */
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-button,
.landing-button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  font: 500 16px/48px var(--font);
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.landing-button {
  background: var(--text);
  color: #fff;
}

.landing-button:hover,
.landing-button:focus-visible {
  background: #272727;
  text-decoration: none;
}

.landing-button-quiet {
  border: 1px solid #ccc;
  background: #fff;
  color: var(--text);
}

.landing-button-quiet:hover,
.landing-button-quiet:focus-visible {
  border-color: var(--text);
  background: #f8f8f8;
  text-decoration: none;
}

/* A picture of a real dat, in a thin frame with a soft shadow */
.landing-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.landing-shot {
  display: block;
  width: 100%;
  height: auto;
}

/* A picture cut short at its foot fades out there: the page goes on below the frame */
.landing-figure-cut::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 96px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

/* ------------------------------------------------------------- hero */

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 0 0;
  text-align: center;
}

.landing-eyebrow {
  margin: 0 0 20px;
  color: var(--text-2);
  font: 500 14px/20px var(--font);
  letter-spacing: 0.02em;
}

.landing-hero h1 {
  max-width: 880px;
  margin: 0;
  font: 700 64px/68px var(--font);
  letter-spacing: -0.03em;
}

.landing-lead {
  max-width: var(--landing-narrow);
  margin: 28px 0 0;
  color: var(--text-2);
  font-size: 20px;
  line-height: 32px;
  text-wrap: pretty;
}

.landing-lead strong {
  color: var(--text);
  font-weight: 500;
}

.landing-hero .landing-actions {
  justify-content: center;
  margin: 36px 0 0;
}

.landing-hero .landing-fine {
  margin: 16px 0 0;
}

.landing-hero-figure {
  width: 100%;
  margin: 64px 0 0;
}

/* ------------------------------------------------------------ steps */

/* The second step is wider: it holds the picture of the button */
.landing-steps {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.landing-step {
  position: relative;
  padding: 32px 32px 32px 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.landing-step-n {
  position: absolute;
  top: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font: 600 20px/1 var(--font);
}

.landing-step p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 26px;
  text-wrap: pretty;
}

/* Where the button is: the row under a video, as YouTube draws it, at its own size */
.landing-step-figure {
  max-width: 420px;
  margin: 20px 0 0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -16px rgba(0, 0, 0, 0.24);
}

/* ------------------------------------------------- what a dat holds */

.landing-parts {
  display: flex;
  flex-direction: column;
  gap: 96px;
  margin: 64px 0 0;
}

/* The words at one edge, the panel at its own size flush with the other */
.landing-part {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 64px;
}

.landing-part-text {
  max-width: 480px;
}

/* Every other part puts its picture at the left, so the eye goes down the page in a zigzag */
.landing-part:nth-child(even) {
  grid-template-columns: auto minmax(0, 1fr);
}

.landing-part:nth-child(even) .landing-part-text {
  order: 2;
  justify-self: end;
}

.landing-part h3 {
  font: 700 28px/34px var(--font);
  letter-spacing: -0.02em;
}

.landing-part p {
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 18px;
  line-height: 30px;
  text-wrap: pretty;
}

/* The panel at its own size, never blown up, and no taller than a screen */
.landing-part-figure {
  width: 100%;
  max-width: 404px;
  max-height: 600px;
}

/* ------------------------------------------------------------ kinds */

.landing-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.landing-kind a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.landing-kind a:hover {
  text-decoration: none;
}

.landing-kind-head {
  display: block;
  margin: 0 0 16px;
}

.landing-kind-name {
  display: block;
  color: var(--text);
  font: 600 18px/26px var(--font);
  letter-spacing: -0.01em;
}

.landing-kind-line {
  display: block;
  color: var(--text-2);
  font-size: 15px;
  line-height: 22px;
  text-wrap: pretty;
}

.landing-kind-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e5e5;
}

.landing-kind-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.landing-kind a:hover .landing-kind-thumb img {
  transform: scale(1.03);
}

.landing-kind-title {
  display: -webkit-box;
  margin: 12px 0 2px;
  overflow: hidden;
  color: var(--text);
  font: 500 16px/22px var(--font);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.landing-kind a:hover .landing-kind-title {
  color: var(--accent);
}

.landing-kind-meta {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  line-height: 20px;
}

.landing-kind-gist {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 14px;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.landing-more {
  display: flex;
  justify-content: center;
  margin: 48px 0 0;
}

/* ------------------------------------------------------------ price */

.landing-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 40px 0 24px;
}

.landing-plan {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.landing-plan-pro {
  border-color: var(--text);
}

.landing-plan h3 {
  color: var(--text-2);
  font: 600 14px/20px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-amount {
  margin: 12px 0 16px;
  font: 700 44px/48px var(--font);
  letter-spacing: -0.03em;
}

.landing-amount span {
  color: var(--text-2);
  font: 400 18px/28px var(--font);
  letter-spacing: 0;
}

.landing-plan p:last-child {
  color: var(--text-2);
  font-size: 16px;
  line-height: 26px;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- get */

.landing-get {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 96px 0 0;
  padding: 72px 24px;
  border-radius: 24px;
  background: var(--box);
  text-align: center;
}

.landing-get h2 {
  font-size: 44px;
  line-height: 50px;
}

.landing-get > p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

.landing-get .landing-actions {
  justify-content: center;
  margin: 28px 0 0;
}

.landing-get .landing-fine {
  margin: 32px 0 0;
  font-size: 14px;
  line-height: 22px;
}

/* -------------------------------------------------------------- foot */

.landing-foot {
  max-width: var(--landing-width);
  margin: 64px auto 0;
  padding: 32px 24px 48px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}

.landing-foot p {
  margin: 0 0 4px;
}

.landing-foot a {
  color: var(--text-2);
}

.landing-foot a:hover {
  color: var(--text);
}

/* --------------------------------------------------- smaller screens */

@media (max-width: 1000px) {
  .landing-nav {
    display: none;
  }

  .landing-section {
    padding-top: 72px;
  }

  .landing-hero {
    padding-top: 64px;
  }

  .landing-hero h1 {
    font-size: 48px;
    line-height: 52px;
  }

  .landing h2 {
    font-size: 32px;
    line-height: 38px;
  }

  .landing-part,
  .landing-part:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .landing-part:nth-child(even) .landing-part-text {
    order: 0;
    justify-self: start;
  }

  .landing-parts {
    gap: 64px;
  }

  .landing-kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-head {
    padding: 0 16px;
  }

  .landing {
    padding: 0 16px;
  }

  .landing-section {
    padding-top: 56px;
  }

  .landing-hero {
    padding-top: 40px;
    text-align: left;
    align-items: flex-start;
  }

  .landing-eyebrow {
    margin-bottom: 14px;
  }

  .landing-hero h1 {
    font-size: 38px;
    line-height: 42px;
    letter-spacing: -0.025em;
  }

  .landing-lead {
    margin-top: 20px;
    font-size: 17px;
    line-height: 27px;
  }

  .landing-hero .landing-actions {
    justify-content: flex-start;
    margin-top: 28px;
    width: 100%;
  }

  .landing-hero .landing-actions a {
    flex: 1 1 auto;
  }

  /* The panel alone (the picture's phone source), no taller than a screen */
  .landing-hero-figure {
    max-width: 404px;
    max-height: 560px;
    margin-top: 40px;
  }

  .landing h2 {
    font-size: 28px;
    line-height: 34px;
  }

  .landing-sub {
    font-size: 16px;
    line-height: 25px;
  }

  .landing-steps {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  .landing-step {
    padding: 24px 20px 24px 80px;
  }

  .landing-step-n {
    top: 22px;
    left: 20px;
  }

  /* The picture takes the card's whole width, under the number */
  .landing-step-figure {
    margin-left: -60px;
  }

  .landing-parts {
    gap: 48px;
    margin-top: 40px;
  }

  .landing-part-figure {
    max-height: 520px;
  }

  .landing-part h3 {
    font-size: 24px;
    line-height: 30px;
  }

  .landing-part p {
    margin-top: 10px;
    font-size: 16px;
    line-height: 26px;
  }

  .landing-kinds {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 32px;
  }

  .landing-plans {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  .landing-plan {
    padding: 24px;
  }

  .landing-amount {
    font-size: 36px;
    line-height: 40px;
  }

  .landing-get {
    margin-top: 56px;
    padding: 48px 20px;
    border-radius: 16px;
  }

  .landing-get h2 {
    font-size: 32px;
    line-height: 38px;
  }

  .landing-get > p {
    font-size: 16px;
    line-height: 26px;
  }

  .landing-get .landing-actions {
    width: 100%;
  }

  .landing-get .landing-actions a {
    flex: 1 1 auto;
  }

  .landing-foot {
    margin-top: 40px;
    padding: 24px 16px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-button,
  .landing-button-quiet,
  .landing-kind-thumb img {
    transition: none;
  }

  .landing-kind a:hover .landing-kind-thumb img {
    transform: none;
  }
}
