/*
 * SEO pages (PagesController#seo_page; one guide per chá type). Loaded after guest.css and landing.css, only on these
 * pages: the landing's tokens, type, buttons, steps, FAQ, final panel and footer, plus what a long read needs (a
 * breadcrumb, the table of contents, the reading column, the fee example) and one bold moment, the invitation examples
 * as messages in a group chat. Plain CSS, mobile-first, no :has(), no JS, no motion of its own (the landing's button
 * hovers and FAQ only), light and dark through the tokens.
 */

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

:root {
  --seo-measure: 40rem; /* the reading column: about 70 characters at the body size */
  --seo-chat: #f3ece1;
  --seo-bubble: #e2ecdf;
  --seo-bubble-edge: rgba(31, 45, 37, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --seo-chat: #252f2a;
    --seo-bubble: #31443a;
    --seo-bubble-edge: rgba(255, 255, 255, 0.04);
  }
}

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

.seo-hero {
  overflow: hidden;
  padding: 1rem 0 3.5rem;
}

.seo-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  color: var(--lp-ink-2);
  font-size: 0.9375rem;
  list-style: none;
}

.seo-breadcrumb li + li::before {
  content: "/";
  margin: 0 0.625rem;
  color: var(--lp-ink-3);
}

.seo-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--lp-ink-2);
  text-decoration: underline;
  text-decoration-color: var(--lp-line);
  text-decoration-thickness: 1.5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.seo-breadcrumb a:hover {
  color: var(--lp-ink);
  text-decoration-color: currentColor;
}

.seo-hero__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* On phones the scene sits above the headline, small, so the button stays near the fold. */
.seo-hero__visual {
  position: relative;
  order: -1;
  display: flex;
  justify-content: flex-start;
}

.seo-hero__visual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4.5rem;
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--lp-leaf), transparent),
    radial-gradient(closest-side at 70% 30%, rgba(217, 164, 65, 0.14), transparent);
  transform: translate(-50%, -50%);
}

.seo-hero__scene {
  position: relative;
  width: 8.5rem;
}

.seo-hero__title {
  max-width: 16ch;
  font-size: clamp(2.375rem, 1.45rem + 3.9vw, 4.25rem);
  font-stretch: 92%;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.034em;
  word-spacing: 0.06em;
  text-wrap: balance;
}

.seo-hero__lead {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--lp-ink-2);
  font-size: 1.1875rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.seo-hero__actions {
  margin-top: 2rem;
}

.seo-hero__actions .landing-button {
  width: 100%;
}

.seo-hero__note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--lp-ink-2);
  font-size: 0.9375rem;
}

.seo-hero__note .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--lp-matcha);
}

/* ---------- Table of contents and the reading column ---------- */

.seo-body {
  display: grid;
  gap: 3rem;
  padding-bottom: var(--lp-section);
}

.seo-toc {
  padding: 1.25rem 0 0.25rem;
  border-top: 1px solid var(--lp-line);
}

.seo-toc__title {
  color: var(--lp-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.seo-toc__list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.seo-toc__list a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-ink-2);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease;
}

.seo-toc__list a:hover {
  color: var(--lp-matcha);
}

.seo-article {
  min-width: 0;
}

.seo-section + .seo-section {
  margin-top: 4.5rem;
}

.seo-h2 {
  max-width: 22ch;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  font-stretch: 94%;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.026em;
  word-spacing: 0.05em;
  text-wrap: balance;
}

.seo-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.seo-p {
  max-width: var(--seo-measure);
  margin-top: 1.25rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.seo-steps {
  max-width: var(--seo-measure);
  margin-top: 2rem;
}

/* Lead + detail, each after a check. */
.seo-points {
  display: grid;
  gap: 1.125rem;
  max-width: var(--seo-measure);
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.seo-point {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.875rem;
  align-items: start;
}

.seo-point__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--lp-matcha);
}

.seo-point p {
  color: var(--lp-ink-2);
  line-height: 1.6;
}

.seo-point strong {
  color: var(--lp-ink);
  font-weight: 600;
}

/* A range from small to large, side by side on wider screens. */
.seo-tiers {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.seo-tier {
  padding-top: 1rem;
  border-top: 1px solid var(--lp-line);
}

.seo-tier__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.seo-tier p {
  margin-top: 0.25rem;
  color: var(--lp-ink-2);
  line-height: 1.55;
}

/* ---------- The invitation examples: messages sent in a group chat ---------- */

.seo-messages {
  margin-top: 3rem;
}

.seo-messages__list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem calc(var(--lp-gutter) * -1) 0;
  padding: 1.5rem var(--lp-gutter);
  background: var(--seo-chat);
  list-style: none;
}

.seo-message {
  justify-self: end;
  max-width: 92%;
  padding: 0.75rem 1rem 0.875rem;
  border-radius: 1.25rem 1.25rem 0.375rem 1.25rem;
  background: var(--seo-bubble);
  box-shadow: 0 1px 1px var(--seo-bubble-edge);
  color: var(--lp-ink);
  line-height: 1.5;
}

.seo-message__link {
  color: var(--lp-matcha);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.seo-messages__note {
  max-width: var(--seo-measure);
  margin-top: 1rem;
  color: var(--lp-ink-2);
  font-size: 0.9375rem;
}

/* ---------- The chá guides a section links (`guides`): one row each, after its chá's icon ---------- */

.seo-guides {
  max-width: var(--seo-measure);
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--lp-line);
  list-style: none;
}

.seo-guides a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lp-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.seo-guides a:hover {
  color: var(--lp-matcha);
  text-decoration-color: currentColor;
}

.seo-guides .icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--lp-matcha);
}

/* ---------- The fee example (live, from the fee schedule) ---------- */

.seo-fee {
  max-width: 28rem;
  margin-top: 1.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--lp-line);
  border-radius: 1.25rem;
  background: var(--lp-mist);
}

.seo-fee__heading {
  font-weight: 600;
}

.seo-fee__rows {
  margin-top: 0.5rem;
}

.seo-fee__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-ink-2);
}

.seo-fee__row dd {
  color: var(--lp-ink);
  white-space: nowrap;
}

.seo-fee__row--net {
  border-bottom: 0;
  color: var(--lp-ink);
  font-weight: 600;
}

.seo-fee__note {
  margin-top: 0.25rem;
  color: var(--lp-ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---------- A games page: one section per game, and the Bule panel (pages/_seo_games; board F7-10) ---------- */

.seo-game {
  scroll-margin-top: 5rem;
}

.seo-game__head {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  max-width: var(--seo-measure);
}

/* The game's clay picture on the mist tile. */
.seo-game__art {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 1.25rem;
  background: var(--lp-mist);
  object-fit: contain;
}

.seo-game .seo-h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.seo-game__aka {
  margin-top: 0.375rem;
  color: var(--lp-ink-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.seo-game__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  max-width: var(--seo-measure);
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.seo-game__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.625rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  color: var(--lp-ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.seo-game__facts .icon {
  width: 1rem;
  height: 1rem;
  color: var(--lp-matcha);
}

.seo-game .seo-h3 {
  margin-top: 1.75rem;
}

.seo-game__steps {
  max-width: var(--seo-measure);
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.seo-game__steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.875rem;
  align-items: start;
  padding: 0.625rem 0;
  line-height: 1.6;
}

.seo-game__steps li + li {
  border-top: 1px solid var(--lp-line);
}

.seo-game__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.0625rem;
  border-radius: 50%;
  background: var(--lp-leaf);
  color: var(--lp-matcha);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.seo-game__needs {
  margin-top: 0.75rem;
}

/* Once, after the third game: the page's call to make the chá in Bule, on the landing's band green. */
.seo-bule {
  display: grid;
  gap: 1rem;
  max-width: var(--seo-measure);
  margin-top: 4.5rem;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: var(--lp-band);
}

.seo-bule + .seo-section {
  margin-top: 4.5rem;
}

.seo-bule p {
  color: var(--lp-ink-2);
  line-height: 1.6;
}

.seo-bule .seo-bule__title {
  color: var(--lp-ink);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.seo-bule p + p {
  margin-top: 0.375rem;
}

.seo-bule .landing-button {
  justify-self: start;
}

@media (min-width: 45rem) {
  .seo-bule {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1.75rem 2rem;
  }

  .seo-bule .landing-button {
    justify-self: end;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  .seo-hero__actions .landing-button {
    width: auto;
  }

  .seo-messages__list {
    max-width: var(--seo-measure);
    margin-right: 0;
    margin-left: 0;
    padding: 2rem;
    border-radius: 1.75rem;
  }

  .seo-message {
    max-width: 31rem;
  }

  .seo-tiers {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 60rem) {
  .seo-hero {
    padding: 2rem 0 5rem;
  }

  .seo-hero__grid {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 3rem;
    align-items: center;
    margin-top: 1.5rem;
  }

  .seo-hero__visual {
    order: 0;
    justify-content: center;
  }

  .seo-hero__visual::before {
    left: 50%;
    width: 30rem;
    height: 30rem;
  }

  .seo-hero__scene {
    width: 19rem;
  }

  /* The contents stay beside the reading column while it scrolls. */
  .seo-body {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 5rem;
  }

  .seo-toc {
    position: sticky;
    top: 6rem;
    align-self: start;
  }
}
