/*
 * Example lists (ExampleListsController; one made-up list per chá type). Loaded after guest.css, landing.css and
 * seo_page.css, only on these pages: the hero's words, and the list as its guests see it, the guest page's own
 * components (guest.css) on their own paper in a page frame, with what the list shows, the chá's guides and the other
 * examples beside it. One bold moment: the frame lifted off a soft leaf glow. Plain CSS, mobile-first, no :has(), no
 * JS, no motion of its own; light and dark through the tokens.
 */

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

:root {
  --ex-glow: rgba(217, 164, 65, 0.12); /* honey, behind the frame */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ex-glow: rgba(227, 180, 94, 0.08);
  }
}

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

/* The closing panel's own padding spaces it from the list. */
.example {
  padding-top: 1rem;
}

/* Phones and tablets: the words, the list, then what it shows. Wide screens: the words over what the list shows
   (which stays in view), the list beside them. */
.example__grid {
  display: grid;
  grid-template-areas: "intro" "frame" "side";
  gap: 2.5rem;
}

.example__intro {
  grid-area: intro;
}

.example__frame {
  grid-area: frame;
}

.example__side {
  grid-area: side;
  display: grid;
  gap: 2.5rem;
  align-content: start;
}

/* ---------- The words ---------- */

.example__title {
  max-width: 17ch;
  margin-top: 0.5rem;
  font-size: clamp(2.25rem, 1.55rem + 2.9vw, 3.5rem);
  font-stretch: 92%;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
  word-spacing: 0.06em;
  text-wrap: balance;
}

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

.example__actions {
  margin-top: 1.75rem;
}

.example__actions .landing-button {
  width: 100%;
}

/* ---------- The frame: the guest page on its own paper ---------- */

.example-frame {
  position: relative;
  isolation: isolate;
  margin: 0 -0.75rem; /* near the phone's edges, like the page it stands for */
}

/* The soft light it stands on: decoration. */
.example-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2rem;
  right: 0; /* within the frame: never wider than the page */
  left: 0;
  height: 32rem;
  background:
    radial-gradient(closest-side, var(--lp-leaf), transparent),
    radial-gradient(closest-side at 75% 35%, var(--ex-glow), transparent);
}

.example-frame__screen {
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 24px;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-body);
  line-height: 1.5;
  box-shadow: var(--lp-shadow-float);
}

.example-frame__header {
  max-width: none;
  border-bottom: 1px solid var(--border);
}

.example-frame__page {
  padding: var(--space-4) var(--gutter) var(--space-8);
}

/* The answers look as they do on a live list; they only don't answer here. */
.example-frame .rsvp-card__answer-link:disabled {
  opacity: 1;
  cursor: default;
}

/* ---------- "Ao tocar num presente": the choose-amount step ---------- */

.example-step {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1.5px dashed var(--border-strong);
}

.example-step__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.example-step__title .icon {
  flex: none;
  color: var(--primary);
}

.example-step__lead {
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 1.45;
}

/* The sheet as it rises on a phone, its grab handle on top. */
.example-sheet {
  position: relative;
  margin-top: var(--space-4);
  padding: var(--space-6) var(--space-4) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

/* No close button on this one: the head's title takes its column. */
.example-sheet .sheet-head--lead {
  grid-template-columns: 3.5rem minmax(0, 1fr);
}

.example-sheet::before {
  content: "";
  position: absolute;
  top: var(--space-2);
  left: 50%;
  width: 2.5rem;
  height: 5px;
  margin-left: -1.25rem;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

/* Where the sheet goes on to pay: the ribbon's look, so it reads as the example speaking. */
.example-pay {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px dashed var(--gold-strong);
  border-radius: var(--radius-card);
  background: var(--gold-soft);
}

.example-pay__title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--gold-strong);
  font-weight: 600;
  line-height: 1.35;
}

.example-pay__title .icon {
  flex: none;
  margin-top: 0.1em;
}

.example-pay__body {
  margin-top: var(--space-2);
  font-size: var(--text-small);
  line-height: 1.45;
}

.example-pay .button {
  margin-top: var(--space-4);
}

/* ---------- Beside the list ---------- */

.example-side__title {
  color: var(--lp-ink);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.example-points__list,
.example-more__list,
.example-others__list {
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.example-points__list {
  display: grid;
  gap: 0.875rem;
}

.example-points__item {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.75rem;
  color: var(--lp-ink-2);
  line-height: 1.5;
}

.example-points__item .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--lp-matcha);
}

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

.example-more__link {
  display: flex;
  align-items: center;
  min-height: 3rem;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-ink);
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.example-more__list li:first-child .example-more__link {
  border-top: 1px solid var(--lp-line);
}

.example-more__link:hover {
  color: var(--lp-matcha);
}

.example-others__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.example-others__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  color: var(--lp-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.example-others__link:hover {
  border-color: var(--lp-matcha);
  color: var(--lp-matcha);
}

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

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

  .example-frame {
    justify-self: center;
    width: 100%;
    max-width: 40rem;
    margin: 0;
  }

  .example-frame__screen {
    border-radius: var(--radius-sheet);
  }

  .example-sheet {
    padding: var(--space-5) var(--space-6) var(--space-6);
  }

  .example-sheet::before {
    display: none;
  }
}

@media (min-width: 60rem) {
  .example {
    padding-top: 2rem;
  }

  .example__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
    grid-template-rows: auto 1fr;
    grid-template-areas: "intro frame" "side frame";
    column-gap: 4.5rem;
    row-gap: 3rem;
    align-items: start;
  }

  .example-frame {
    justify-self: end;
    margin-top: 1rem;
  }

  .example-frame::before {
    top: 4rem;
    height: 40rem;
  }

  .example__side {
    position: sticky;
    top: 6rem;
  }
}
