/*
 * Marketing sections built from core blocks (home, why, pricing).
 *
 * Type, colours and buttons come from theme.json presets; these classes only
 * add what blocks cannot express. Vocabulary (see README.md):
 *   um-band            full-width section (alignfull group); background via preset
 *   um-band-hero       first band: extra top space
 *   um-band-dark       dark band (backgroundColor "main")
 *   um-lead            intro paragraph under a page heading
 *   um-eyebrow         small uppercase label above a heading
 *   um-section-intro   centred line under a section heading
 *   um-note            small muted line
 *   um-card            white card (group); um-card-featured adds a green border
 *   um-tag             pill label inside a card
 *   um-step-number     numbered circle
 *   um-checklist       list with check marks
 *   um-price           price line in a card
 *   um-person          avatar and name row
 *   um-compare-table   comparison table; second column highlighted
 *   um-faq             group of details blocks
 */

/* Bands sit edge to edge without the post-content block gap between them. */
.wp-block-post-content > .um-band,
.entry-content > .um-band {
  margin-block: 0;
}

.um-band {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.um-band-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3rem, 6vw, 4.5rem);
}

.um-band > .wp-block-heading + * {
  margin-top: 14px;
}

.um-band > .wp-block-columns,
.um-band > .um-grid,
.um-band > .wp-block-table,
.um-band > .um-faq {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.um-grid {
  gap: 28px;
}

.um-band .wp-block-columns {
  gap: 28px;
}

.um-hero-columns.wp-block-columns {
  gap: clamp(2rem, 6vw, 5rem);
}

.um-hero-columns .wp-block-heading {
  text-wrap: balance;
}

.um-hero-columns .wp-block-buttons {
  margin-top: 28px;
}

.um-band > .wp-block-heading.has-text-align-center,
.um-band > .um-section-intro {
  margin-inline: auto;
  max-width: 760px;
  text-wrap: balance;
}

.um-band-dark .wp-block-heading,
.um-band-dark .um-lead {
  color: var(--wp--preset--color--base);
}

.um-band-dark .um-lead,
.um-band-dark .um-note {
  color: rgba(255, 255, 255, 0.8);
}

.um-eyebrow {
  color: var(--wp--preset--color--um-green-text);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.um-band-dark .um-eyebrow {
  color: var(--wp--preset--color--um-green);
}

.um-lead {
  color: #3d3d3d;
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.55;
  max-width: 640px;
  text-wrap: pretty;
}

.has-text-align-center.um-lead {
  margin-inline: auto;
}

.um-section-intro {
  color: #555555;
  font-size: 1.125rem;
  line-height: 1.55;
}

.um-note {
  color: var(--wp--preset--color--um-muted);
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 500;
}

.um-hero-price {
  color: #3d3d3d;
  font-weight: 500;
}

.um-hero-price .tgc-price-now,
.um-price .tgc-price-now {
  color: var(--wp--preset--color--um-green-text);
  font-weight: 700;
}

/* Cards */
.um-card {
  background: var(--wp--preset--color--base);
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  color: #3d3d3d;
  height: 100%;
  padding: 28px;
}

.um-card > * {
  margin-block: 0;
}

.um-card > * + * {
  margin-block-start: 10px;
}

.um-card .wp-block-heading {
  font-size: var(--wp--preset--font-size--medium);
}

.um-card p {
  color: #555555;
}

.um-card-featured {
  border: 2px solid var(--wp--preset--color--um-green);
}

.um-card.is-layout-flex,
.um-card.is-layout-flow {
  display: flex;
  flex-direction: column;
}

.um-card > .wp-block-buttons {
  margin-block-start: auto;
  padding-top: 18px;
}

.um-tag {
  align-self: flex-start;
  background: rgba(150, 181, 86, 0.18);
  border-radius: 999px;
  color: var(--wp--preset--color--um-green-text);
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 12px;
  width: fit-content;
}

.um-price {
  color: #3d3d3d;
  font-size: 1.0625rem;
  font-weight: 500;
}

.um-price .tgc-price-now {
  font-size: 1.5em;
}

/* Numbered steps */
.um-step-number {
  align-items: center;
  background: var(--wp--preset--color--um-green);
  border-radius: 999px;
  color: var(--wp--preset--color--um-ink);
  display: inline-flex;
  font-size: 1.125rem;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  line-height: 1;
  margin-inline: auto;
  width: 44px;
}

.um-steps .wp-block-column {
  text-align: center;
}

.um-steps .wp-block-column p:not(.um-step-number) {
  color: #555555;
  margin-inline: auto;
  max-width: 300px;
}

/* Check-mark list */
.um-checklist {
  list-style: none;
  padding-left: 0;
}

.um-checklist li {
  padding: 5px 0 5px 28px;
  position: relative;
}

.um-checklist li::before {
  color: var(--wp--preset--color--um-green-text);
  content: "✓";
  font-weight: 700;
  left: 4px;
  position: absolute;
}

/* Testimonials */
.um-person.wp-block-group {
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
}

.um-person > * {
  margin: 0;
}

.um-person a {
  text-decoration: none;
}

.um-person .wp-block-image img {
  border-radius: 999px;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.um-person p,
.um-person a {
  color: var(--wp--preset--color--um-green-text);
  font-weight: 600;
}

/* Tables: um-table is a white card table; um-compare-table also highlights
   column 2; um-table-last-row highlights the last row (our offer). */
.um-table,
.um-compare-table {
  background: var(--wp--preset--color--base);
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  color: #3d3d3d;
  font-size: var(--wp--preset--font-size--small);
  overflow-x: auto;
  /* Contain absolutely positioned screen-reader text inside the scroll box. */
  position: relative;
}

.um-table table,
.um-compare-table table {
  border-collapse: collapse;
  min-width: 640px;
  width: 100%;
}

.um-table :is(th, td),
.um-compare-table :is(th, td) {
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
}

.um-table thead,
.um-compare-table thead {
  border-bottom: 0;
}

.um-table th,
.um-compare-table th {
  background: #fafafa;
  color: var(--wp--preset--color--um-ink);
  font-weight: 600;
}

.um-table tr:last-child td,
.um-compare-table tr:last-child td {
  border-bottom: 0;
}

.um-table td:first-child,
.um-compare-table td:first-child {
  color: var(--wp--preset--color--um-ink);
  font-weight: 500;
}

.um-compare-table th:nth-child(2),
.um-compare-table td:nth-child(2),
.um-table-last-row tbody tr:last-child td {
  background: rgba(150, 181, 86, 0.1);
  color: var(--wp--preset--color--um-green-text);
  font-weight: 600;
}

/* FAQ */
.um-faq .wp-block-details {
  border-bottom: 1px solid #e2e2e2;
  padding: 18px 0;
}

.um-faq summary {
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
}

.um-faq .wp-block-details p {
  color: #555555;
  margin-top: 10px;
}

@media (max-width: 781px) {
  .um-band .wp-block-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .um-band .wp-block-buttons .wp-block-button,
  .um-band .wp-block-buttons .wp-block-button__link {
    width: 100%;
  }
}

/* Tight vertical rhythm inside steps, cards and lists (the global block gap is for sections). */
.um-steps .wp-block-column > *,
.um-checklist > li {
  margin-block: 0;
}

.um-steps .wp-block-column > * + * {
  margin-block-start: 12px;
}

.um-steps .wp-block-column > .um-step-number + * {
  margin-block-start: 18px;
}

/* Dark bands (pricing hero, comparison, final band). */
.um-band-dark .um-section-intro {
  color: rgba(255, 255, 255, 0.8);
}

.um-band-dark .um-note {
  color: rgba(255, 255, 255, 0.6);
}

.um-band-dark > .um-note {
  margin-top: 18px;
}

.um-band-dark .wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--wp--preset--color--base);
}

.um-band-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--wp--preset--color--base);
}

/* A row of badges. */
.um-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Price card (pricing hero). Keeps dark text inside dark bands. */
.um-band-dark .um-price-card,
.um-band-dark .um-price-card p {
  color: #3d3d3d;
}

.um-price-card .um-eyebrow {
  color: var(--wp--preset--color--um-green-text);
}

.um-price-card .um-note {
  color: var(--wp--preset--color--um-muted);
}

.um-big-price {
  color: var(--wp--preset--color--um-ink);
  font-size: var(--wp--preset--font-size--xx-large);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.um-band-dark .um-price-card .um-big-price {
  color: var(--wp--preset--color--um-ink);
}

.um-big-price .tgc-price-was {
  color: #9a9a9a;
  font-size: 0.6em;
  margin-right: 8px;
}

.um-big-price .tgc-price-now {
  color: var(--wp--preset--color--um-ink);
}

.um-price-extra {
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 600;
}

.um-band-dark .um-price-card .um-price-extra {
  color: var(--wp--preset--color--um-ink);
}

.um-price-card .wp-block-separator {
  border-color: #e8e8e8;
  margin-block: 18px;
}

.um-price-card .wp-block-buttons {
  margin-block-start: 22px;
}

/* Heading on the left, content on the right. */
.um-split .wp-block-heading {
  margin-bottom: 14px;
}

/* Text links in dark bands (Ollie's default link colour is near-black). */
.um-band-dark a:not(.wp-block-button__link) {
  color: var(--wp--preset--color--um-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
