/* ==========================================================================
   Home 09 — "One Person. Direct Access. Actual Work."
   Markup: resources/views/components/why/*.blade.php · Copy: config/why_section.php

   Phones/tablets: head → portrait panel → cards → CTA (one column; cards 2-up
   from 640). Desktop (1024): head across the top, portrait left of the 2 × 2
   cards, CTA across the bottom — the portrait's cropped legs tuck under the
   CTA panel's top edge, so he sits "behind the desk".
   Motion: reveal only (reveal.js); reduced motion is handled in base.css.
   ========================================================================== */

.why {
  --why-pad: calc(var(--hdr-inset) + var(--hdr-pad));
  --why-row-gap: 32px;
  --why-tuck: 44px; /* how far the portrait runs under the CTA panel */

  background: var(--warm-50);
  border-top: 1px solid var(--color-border);
  padding-block: clamp(48px, 5.5vw, 88px); /* owner 2026-09-29: no wasted space */
}

.why__wrap {
  max-width: var(--hdr-max);
  margin-inline: auto;
  padding-inline: var(--why-pad);
}

.why__grid {
  display: grid;
  grid-template-areas: "head" "media" "cards" "cta";
  gap: 28px;
}

/* ---- Head ---------------------------------------------------------------- */

.why__head { grid-area: head; }

.why__head-body {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.why__title {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.why__title-line { display: block; }
.why__title-line--accent { color: var(--blue-600); }

.why__lede {
  max-width: 38rem;
  color: var(--slate-700);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---- Portrait -------------------------------------------------------------- */

/* Phones/tablets: a quiet panel with the Rishikesh sketch; he sits on its bottom edge. */
.why__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  padding-top: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--blue-600) 9%, var(--paper)) 0%, var(--paper) 72%);
}

.why__art {
  position: absolute;
  inset: 6% 0 auto;
  width: 100%;
  height: auto;
  color: var(--slate-400);
  opacity: 0.25;
}

.why__portrait {
  position: relative;
  display: block;
  width: min(100%, 460px);
  margin-inline: auto;
}

.why__portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.why-note {
  color: var(--slate-700);
  font-family: var(--font-hand);
  line-height: 1.3;
}

.why-note span { display: block; }

.why-note--portrait { display: none; }

/* ---- Benefit cards ----------------------------------------------------------- */

.why__cards {
  grid-area: cards;
  display: grid;
  gap: 14px;
}

@media (min-width: 640px) {
  .why__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

.why-card {
  container: why-card / inline-size;
  position: relative;
  padding: 22px 22px 22px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 14px 30px -26px rgb(15 23 42 / 0.32);
}

.why-card__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

/* Narrow cards (e.g. 2-up at 1200–1439, 360px phones): icon above the text, so the text keeps a readable measure. */
@container why-card (max-width: 290px) {
  .why-card__body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .why-card__title { margin-top: 0; }
}

.why-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--tone-line);
  border-radius: 50%;
  background: var(--tone-bg);
  color: var(--tone-mark);
}

.why-card__title {
  margin: 4px 0 0;
  padding-right: 28px;
  color: var(--ink-900);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.why-card__text {
  margin-top: 6px;
  color: var(--slate-700);
  font-size: 1rem; /* body copy stays ≥16px on phones (doctrine mobile gate) */
  line-height: 1.5;
}

.why-card__num {
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--slate-500);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ---- CTA panel --------------------------------------------------------------- */

.why-cta {
  grid-area: cta;
  position: relative;
  z-index: 1; /* above the portrait on desktop */
  display: grid;
  gap: 22px;
  overflow: hidden;
  padding: 26px 20px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--paper) 70%, var(--slate-100));
  box-shadow: 0 -12px 32px -26px rgb(15 23 42 / 0.35), 0 18px 36px -30px rgb(15 23 42 / 0.35);
}

.why-cta__eyebrow {
  color: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.why-cta__title {
  margin: 8px 0 0;
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.why-cta__text {
  margin-top: 8px;
  color: var(--slate-700);
  font-size: 1rem;
  line-height: 1.5;
}

.why-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.why-btn {
  display: inline-flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 22px;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}

.why-btn:active { transform: translateY(1px); }
.why-btn:focus-visible { outline-offset: 3px; }

/* Same look as the header's Book a Call. */
.why-btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.why-btn--primary:hover { background: var(--color-primary-hover); }
.why-btn--primary:active { background: var(--color-primary-active); }
.why-btn__arrow { transition: transform var(--t-base) var(--ease-out); }
.why-btn--primary:hover .why-btn__arrow { transform: translateX(3px); }

.why-btn--whatsapp {
  border: 1.5px solid var(--slate-300);
  background: var(--paper);
  color: var(--ink-900);
}

.why-btn--whatsapp:hover { border-color: var(--ink-900); }

.why-btn__wa { display: grid; color: #25D366; } /* WhatsApp's own green, official mark */
.why-btn__wa svg { width: 20px; height: 20px; }

@media (min-width: 640px) {
  .why-btn { flex: 0 0 auto; }
}

/* Phones: the place note stays, small and plain; the sketch steps aside. */
.why-cta__aside { position: relative; }
.why-cta__art { display: none; }

.why-note--place {
  font-size: 1rem;
  transform: rotate(-3deg);
  transform-origin: left center;
}

.why-note--place span { display: inline; }
.why-note--place span + span::before { content: " "; }

/* ---- Wide screens ---------------------------------------------------------------- */

/* Headline and intro side by side (same split as the desktop grid below). */
@media (min-width: 1024px) {
  .why__head-body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
    column-gap: 48px;
    align-items: end;
  }

  .why__lede { padding-bottom: 6px; }
}

/* Two columns only from 1200: below that the portrait would shrink and the cards cramp. */
@media (min-width: 1200px) {
  .why__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
    grid-template-areas:
      "head  head"
      "media cards"
      "cta   cta";
    gap: var(--why-row-gap) 48px;
  }

  /* The portrait fills its cell plus the gap, and runs under the CTA panel. */
  .why__media {
    overflow: visible;
    min-height: 320px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .why__art { inset: 0 -4% auto; width: 108%; opacity: 0.3; }

  .why__portrait {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(-1 * (var(--why-row-gap) + var(--why-tuck)));
    width: auto;
    height: calc(100% + var(--why-row-gap) + var(--why-tuck));
  }

  .why__portrait img {
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
  }

  .why-note--portrait {
    display: block;
    position: absolute;
    top: 2%;
    left: 0;
    z-index: 1;
    font-size: 1.25rem;
    transform: rotate(-7deg);
  }

  .why-note--portrait svg {
    display: block;
    width: 54px;
    height: 40px;
    margin: 4px 0 0 36px;
    color: var(--ink-900);
  }

}

@media (min-width: 1024px) {
  .why-cta {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
    align-items: center;
    padding: 34px 40px;
  }

  .why-cta__aside { align-self: stretch; min-height: 150px; }

  .why-cta__art {
    display: block;
    position: absolute;
    right: -24px;
    bottom: -64px;
    width: 380px;
    height: auto;
    color: var(--slate-400);
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
  }

  .why-note--place {
    position: relative;
    z-index: 1;
    padding-top: 4px;
    font-size: 1.1875rem;
    text-align: center;
    transform: rotate(-5deg);
    transform-origin: center;
  }

  .why-note--place span { display: block; }
  .why-note--place span + span::before { content: none; }
}
