/* ==========================================================================
   WW Housing Development LLC — fee-arrangement.css
   Fee Arrangement page only. The tier table (.pricing/.plan) is shared and
   lives in global.css, as do .page-hero, .section-header, .link-arrow, .btn,
   contact and footer.

   MOBILE FIRST: base rules target the smallest viewport; min-width queries
   enhance for larger screens (handbook §12).
   ========================================================================== */

/* ==========================================================================
   The tier table, the other way up

   The home page runs light cards over a photograph. Here the panel is turned
   over: navy cards on white, with the easing-stripes artwork behind them for
   texture instead of a photograph. Everything the shared .pricing block
   inverted for the photograph has to be put back, and then the cards
   inverted in its place.

   The featured tier keeps its brass glow untouched — it reads better against
   navy than it ever did against the photograph.
   ========================================================================== */
.pricing--inverted {
  /* White, so its curves come from the white copy of the artwork */
  --curve-image: url("../images/svg-backgrounds/curve-divider-white.svg");
  background-color: var(--clr-surface-alt);
}

/* Texture, not a picture. The tortoise-shell artwork tiles, so unlike a single
   piece of line work it needs no scaling to fill a panel three cards tall —
   it is held at the 400px it was drawn at, exactly as the contact section
   holds it, and masked so the repeat dissolves rather than ending on a seam.
   Its own strokes are already at 0.05 opacity, so no extra fading here. */
.pricing--inverted .section-texture {
  background-image: url("../images/svg-backgrounds/tortoise-shell.svg");
  background-repeat: repeat;
  background-size: 25rem 25rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Section header: back to navy on light
   -------------------------------------------------------------------------- */
.pricing--inverted .section-badge {
  background-color: rgba(15, 42, 68, 0.07);
  color: var(--clr-primary);
}

.pricing--inverted .section-heading {
  color: var(--clr-primary);
}

.pricing--inverted .section-intro {
  color: var(--clr-muted);
}

/* --------------------------------------------------------------------------
   Cards: cream to navy
   -------------------------------------------------------------------------- */
.pricing--inverted .plan {
  background-color: var(--clr-primary);
}

/* The unfeatured cards have no border of their own on the photograph, where
   the contrast did that job. On white they need an edge. */
.pricing--inverted .plan:not(.plan--featured) {
  box-shadow: 0 18px 40px rgba(15, 42, 68, 0.14);
}

.pricing--inverted .plan__name,
.pricing--inverted .plan__amount {
  color: var(--clr-surface);
}

.pricing--inverted .plan__summary,
.pricing--inverted .plan__period {
  color: rgba(250, 247, 242, 0.76);
}

.pricing--inverted .plan__price {
  border-bottom-color: var(--clr-line-on-dark);
}

.pricing--inverted .plan__features .check {
  color: rgba(250, 247, 242, 0.9);
}

/* Navy on navy would vanish, so the tag takes the brass and the navy text */
.pricing--inverted .plan__tag {
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
}

/* --------------------------------------------------------------------------
   Reassurance row: also back to navy on light
   -------------------------------------------------------------------------- */
.pricing--inverted .pricing__note {
  color: var(--clr-muted);
}

.pricing--inverted .pricing__note-icon {
  color: var(--clr-accent);
}

/* ==========================================================================
   What we do — a staggered row of cards

   Four cards of deliberately different builds: two light, one brass, one navy
   carrying a single figure. They sit on white rather than the cream, so the
   light cards can be cream and still read as cards.

   The stagger is four margin-tops, applied only once the row is actually four
   across. Below that they stack or pair up and the offsets would just look
   like uneven gaps.
   ========================================================================== */
/* Cream, because .pricing--inverted above it is now the white one. The light
   cards go the other way for the same reason. */
.offer {
  background-color: var(--clr-surface);
}

.offer__grid {
  display: grid;
  gap: var(--space-lg);
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.offer-card--light {
  background-color: var(--clr-surface-alt);
}

.offer-card--accent {
  background-color: var(--clr-accent-light);
}

.offer-card--dark {
  background-color: var(--clr-primary-deep);
}

.offer-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.offer-card__media {
  overflow: hidden;
  height: 11rem;
  /* Pushes the picture to whichever end of the card it was placed at */
  margin-top: auto;
  border-radius: var(--radius-md);
  background-color: rgba(15, 42, 68, 0.06);
}

/* When it comes first in the card, the auto margin must not push it down */
.offer-card__media:first-child {
  margin-top: 0;
}

.offer-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  background-color: var(--clr-primary);
  color: var(--clr-accent-light);
}

.offer-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.offer-card__title {
  margin: 0;
  font-size: var(--fs-500);
  font-weight: var(--fw-bold);
  line-height: 1.25;
}

.offer-card__text {
  margin: 0;
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.7;
}

/* The brass card carries navy copy rather than the muted slate, which has too
   little contrast against it */
.offer-card--accent .offer-card__text {
  color: rgba(15, 42, 68, 0.78);
}

.offer-card--dark .offer-card__title {
  color: var(--clr-surface);
}

/* Pinned to the foot with a hairline above, the way the plan features are */
.offer-card__points {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(15, 42, 68, 0.22);
  color: var(--clr-primary);
  font-size: var(--fs-300);
  font-weight: var(--fw-medium);
}

.offer-card__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

.offer-card__points li::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  flex: none;
  margin-top: 0.5rem;
  border-radius: 50%;
  background-color: var(--clr-primary);
}

/* The one figure on the page. It is the only card with nothing else in it, so
   the number carries the whole card. */
.offer-card__stat {
  margin: auto 0 0;
  color: var(--clr-accent-light);
  font-size: clamp(2.75rem, 8vw, 3.75rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.03em;
}

.offer-card__stat-label {
  margin: 0;
  color: var(--clr-surface);
  font-size: var(--fs-400);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   The service pills under the row
   -------------------------------------------------------------------------- */
.offer__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.offer__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--clr-accent);
  border-radius: var(--radius-pill);
  background-color: var(--clr-primary);
  color: var(--clr-surface);
  font-size: var(--fs-300);
  font-weight: var(--fw-semibold);
  transition: background-color var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out);
}

/* Inverts under the cursor: white ground, navy edge, near-black label */
.offer__tag:hover {
  background-color: var(--clr-surface-alt);
  border-color: var(--clr-primary);
  color: var(--clr-body);
}

.offer__tag-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  flex: none;
  border-radius: 50%;
  /* The lighter brass, which holds up against the navy */
  background-color: var(--clr-accent-light);
  transition: background-color var(--t-base) var(--ease-out);
}

.offer__tag:hover .offer__tag-dot {
  background-color: var(--clr-accent);
}

/* ==========================================================================
   Frequently asked questions

   Disclosure panels, one open at a time. Every panel ships open in the markup
   and js/fee-arrangement.js closes all but the first, so with no JavaScript
   the page is a plain readable list of questions and answers rather than a
   column of headings that do nothing.

   The open and close is a grid row going 1fr to 0fr, which animates smoothly
   without anybody having to guess a max-height that the copy might outgrow.
   ========================================================================== */
.faq {
  /* White, so its curves come from the white copy of the artwork */
  --curve-image: url("../images/svg-backgrounds/curve-divider-white.svg");
  background-color: var(--clr-surface-alt);
}

.faq__grid {
  display: grid;
  gap: var(--space-2xl);
}

.faq__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  text-align: left;
}

.faq__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background-color: var(--clr-surface);
  border: 1px solid var(--clr-line);
}

.faq__card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: var(--radius-md);
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
}

.faq__card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.faq__card-title {
  margin: 0;
  color: var(--clr-primary);
  font-size: var(--fs-400);
  font-weight: var(--fw-bold);
}

/* The panels themselves (.faq__list and below) moved to global.css when the
   project detail page started using them too. What stays here is this page's
   two-column framing around them. */

/* ==========================================================================
   Larger screens — min-width only
   ========================================================================== */
@media (min-width: 48em) {
  .offer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-card {
    padding: var(--space-xl);
  }
}

@media (min-width: 64em) {
  .faq__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-2xl);
    /* The aside is shorter than the list; letting it stretch would strand the
       card at the bottom of a very tall column */
    align-items: start;
  }
}

@media (min-width: 75em) {
  .offer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
    /* Cards keep their own height, so the stagger reads as placement rather
       than as four columns of different content */
    align-items: start;
  }

  .offer-card:nth-child(2) {
    margin-top: 4rem;
  }

  .offer-card:nth-child(3) {
    margin-top: 6.5rem;
  }

  .offer-card:nth-child(4) {
    margin-top: 2rem;
  }

  .offer-card__media {
    height: 9.5rem;
  }
}

/* ==========================================================================
   Reduced motion — the panels still open, they just do not travel
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .faq__answer,
  .faq__trigger,
  .faq__trigger-icon {
    transition: none;
  }
}

/* ==========================================================================
   Curve stacking

   A section's lower curve hangs down over the section beneath it. Both carry
   z-index: 1 from .curve-out, and where two sit side by side the later one
   wins on document order and paints its own ground straight over the curve
   reaching into it. So a run of solid sections counts down: each outranks the
   one it reaches into.
   ========================================================================== */
.pricing--inverted {
  z-index: 3;
}

.offer {
  z-index: 2;
}

.faq {
  z-index: 1;
}
