/*
 * The home page.
 *
 * Built on the design-system tokens rather than on Divi's per-render ordinal
 * classes, so this sheet is readable on its own: every value here is a token or
 * a ratio, and nothing depends on the order a builder happened to number its
 * sections in.
 *
 * The page alternates grounds — white, a pale blue, white, an ink panel, white,
 * a pale violet — so the sections separate without a rule between every one of
 * them, and so the eye has somewhere to rest between two white stretches. The
 * tints are the brand's own two hues at a chroma you would not name if asked.
 */

.home {
  background: var(--ds-surface);
}

.home section {
  padding-block: var(--ds-section-gap);
}

/* Shared pieces -------------------------------------------------------- */

.home-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.home-cta-group--start {
  align-items: flex-start;
}

.home-note {
  color: var(--ds-muted);
  font-size: var(--ds-text-label);
}

/*
 * The muted grey clears 4.5:1 on white and on very little else. Each ground
 * gets the ink it needs: darker on the pale bands, lighter on the ink panel.
 */
.home-closing .home-note {
  color: var(--ds-body);
}

.home-offer .home-note {
  color: oklch(0.78 0.01 264);
}

.ds-button svg {
  width: 1em;
  height: 1em;
  flex: none;
}

/* The artwork carries its own black and white fills; these take them over. */
.home .ds-chip .color1,
.home-card__icon .color1,
.home-quote__mark .color1 {
  fill: currentColor;
}

.home .ds-chip .color2 {
  fill: var(--ds-surface);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ds-ink);
  font-size: var(--ds-text-small);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--ds-line);
}

.home-link:hover,
.home-link:focus-visible {
  text-decoration-color: currentColor;
}

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

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.home-hero__ground {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.home-hero__ground img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.home-hero__title {
  max-width: 17ch;
  margin-inline: auto;
}

.home-hero__lead {
  margin: clamp(1rem, 2vw, 1.5rem) auto 0;
  max-width: 54ch;
}

.home-hero__shot {
  display: block;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  max-width: 980px;
}

.home-hero__shot img,
.home-feature__visual img,
.home-offer__visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Trust strip ---------------------------------------------------------- */

.home-partners {
  padding-block: clamp(2rem, 4vw, 3rem) !important;
  border-bottom: 1px solid var(--ds-line);
}

.home-partners__line {
  margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--ds-body);
  font-size: var(--ds-text-small);
  text-align: center;
}

.home-partners__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-partners__logos img {
  display: block;
  height: 22px;
  width: auto;
  opacity: 0.7;
}

/* Intro ---------------------------------------------------------------- */

.home-intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.home-intro__inner .ds-h2 {
  max-width: 22ch;
}

.home-intro__inner .ds-lead {
  max-width: 62ch;
}

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

.home-steps {
  padding-block: 0 var(--ds-section-gap) !important;
}

/*
 * `margin-block`, not `margin`: this list is its own `.ds-shell`, and a blanket
 * `margin: 0` cancels the `margin-inline: auto` that centres the shell. Below
 * 1240px the row filled the width and nothing showed; above it, the three cards
 * sat hard left with the gutter piling up on the right.
 */
.home-steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  list-style: none;
  margin-block: 0;
  padding-block: 0;
}

.home-card {
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ds-shadow-md);
}

/*
 * No tinted plate behind these: the artwork is already a filled disc with the
 * glyph knocked out of it, and a coloured square behind a black disc is two
 * badges stacked on each other.
 */
.home-card__icon {
  display: block;
  color: var(--ds-ink);
}

.home-card__icon svg {
  width: 32px;
  height: 32px;
}

.home-card__title {
  margin: 1.1rem 0 0.85rem;
  color: var(--ds-ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-tight);
}

.home-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ds-body);
  font-size: var(--ds-text-small);
}

.home-card__list li {
  position: relative;
  padding-left: 1.1rem;
}

.home-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ds-accent-from);
}

/*
 * A chip takes its ground from the section it sits on: the default sunk grey
 * disappears against the grey band the features are drawn on.
 */
.home-features .ds-chip,
.home-offer .ds-chip {
  border: 1px solid var(--ds-line);
  background: var(--ds-surface);
}

/* Features -------------------------------------------------------------- */

.home-features {
  border-block: 1px solid var(--ds-line);
  background: var(--ds-surface-tint);
}

.home-features__inner {
  display: flex;
  flex-direction: column;
  gap: var(--ds-section-gap);
}

.home-feature {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 860px) {
  .home-feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* Second block mirrors the first, so the page does not read as a column. */
  .home-feature:nth-child(even) .home-feature__visual {
    order: -1;
  }
}

.home-feature__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.home-feature__text p {
  margin: 0;
  max-width: 52ch;
  color: var(--ds-body);
}

.home-feature__text .ds-button {
  margin-top: 0.5rem;
  background: var(--ds-surface);
}

.home-feature__visual {
  padding: clamp(1rem, 2.5vw, 2rem);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-md);
}

/* The offer ------------------------------------------------------------- */

/*
 * The one dark thing on the page, and it is the offer — the block whose job is
 * to be taken up. The phone sits on transparent ground, so it floats on the
 * panel rather than needing a plate of its own.
 */
.home-offer__panel {
  --offer-pad: clamp(1.75rem, 4vw, 3.5rem);

  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: end;
  overflow: hidden;
  padding: var(--offer-pad);
  border-radius: var(--ds-radius-lg);
  background: linear-gradient(135deg, var(--ds-surface-ink), var(--ds-surface-ink-2));
  color: oklch(0.93 0.006 264);
}

/* The text keeps its own vertical centring; only the phone goes to the floor. */
.home-offer__text {
  align-self: center;
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.home-offer__panel .ds-h3 {
  color: var(--ds-surface);
}

@media (min-width: 860px) {
  .home-offer__panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.home-offer__text p {
  margin: 0.75rem 0 0;
  max-width: 46ch;
  color: oklch(0.86 0.008 264);
  font-size: var(--ds-text-lead);
}

/*
 * The phone stands on the panel's bottom edge rather than floating above it:
 * it is a device, and a device with a gap under it reads as a mistake. The
 * negative margin cancels the panel's own padding on that side, and the panel
 * clips it to its rounded corner.
 */
.home-offer__visual {
  justify-self: center;
  align-self: end;
  max-width: 300px;
  margin-bottom: calc(var(--offer-pad) * -1);
}

.home-offer__visual img {
  display: block;
  margin-bottom: -2px;
}

/* Testimonials ---------------------------------------------------------- */

.home-testimonials {
  border-top: 1px solid var(--ds-line);
}

.home-testimonials__title {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.home-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0 0 clamp(2rem, 3vw, 2.5rem);
  padding: 0;
}

.home-quote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.home-quote__mark {
  color: var(--ds-line);
}

.home-quote__mark svg {
  width: 26px;
  height: 26px;
}

/*
 * The theme gives every blockquote a thick coloured left border. On a quote
 * card it reads as a stray accent stripe, so it goes.
 */
.home-quote__text {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ds-ink);
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: var(--ds-tracking-tight);
}

.home-quote__by {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.home-quote__by img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.home-quote__by figcaption {
  color: var(--ds-body);
  font-size: var(--ds-text-small);
  font-weight: 500;
}

/*
 * Centred by its own width rather than by stretching: a full-width flex row
 * gave the link a 1160px hit area 22px tall, which is both too wide to aim at
 * and too short to hit.
 */
.home-testimonials .home-link {
  display: flex;
  width: max-content;
  margin-inline: auto;
  padding-block: 0.4rem;
}

/* Closing --------------------------------------------------------------- */

.home-closing {
  border-top: 1px solid var(--ds-line);
  background: var(--ds-surface-tint-violet);
}

.home-closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-closing__inner .ds-h2 {
  max-width: 20ch;
}

@media (prefers-reduced-motion: reduce) {
  .home-card {
    transition: none;
  }

  .home-card:hover {
    transform: none;
  }
}
