/* #why section (app/views/home/_why.html.erb). */
/*
 * Masonry board of six pins (.pl-board / .pl-pin / .pl-tile live in
 * components.css). Tile contents are sized in cqw of their .pl-tile; each cqw
 * declaration follows a px fallback taken from the 390px layout (a 167px tile),
 * for browsers without container query units.
 */
@layer sections {
  .why {
    padding-bottom: clamp(52px, 6.4vw, 88px);
  }

  .why__title {
    margin-bottom: clamp(24px, 3.2vw, 40px);
    max-width: 17em;
    text-wrap: balance;
  }

  /* Tiles */
  .why__tile {
    border-radius: var(--pl-r-card);
    overflow: hidden;
  }

  .why__tile--taste {
    position: relative;
    aspect-ratio: 1 / 1.62;
    background: var(--pl-green-800);
  }

  .why__tile--plant {
    aspect-ratio: 1 / 0.74;
    background: var(--pl-cream);
    color: var(--pl-green-800);
  }

  .why__tile--fasting {
    position: relative;
    aspect-ratio: 1 / 0.96;
    background: var(--pl-ink);
  }

  .why__tile--zero {
    aspect-ratio: 1 / 0.7;
    background: var(--pl-sand-100);
    color: var(--pl-ink);
  }

  .why__tile--protein {
    aspect-ratio: 1 / 0.58;
    background: var(--pl-green-150);
    color: var(--pl-green-950);
  }

  .why__tile--cta {
    display: block;
    aspect-ratio: 1 / 0.56;
    background: var(--pl-yellow);
  }

  /* Khinkali drawings */
  .why__art {
    position: absolute;
    height: auto;
    fill: var(--pl-paper);
  }

  .why__art--taste-small {
    left: 58%;
    top: 6%;
    width: 30%;
    stroke: var(--pl-paper);
    stroke-width: 5px;
    stroke-linejoin: round;
    transform: rotate(14deg);
  }

  .why__art--taste-mid {
    left: 8%;
    top: 18%;
    width: 52%;
    stroke: var(--pl-paper);
    stroke-width: 3.5px;
    stroke-linejoin: round;
    transform: rotate(-10deg);
  }

  .why__art--taste-big {
    left: 9%;
    top: 47%;
    width: 112%;
    transform: rotate(-9deg);
  }

  .why__art--fasting {
    right: -11%;
    bottom: -14%;
    width: 82%;
    transform: rotate(7deg);
  }

  /* Text under a tile */
  .why__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 6px 0;
  }

  .why__name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
  }

  .why__text,
  .why__caption {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--pl-muted);
  }

  .why__caption {
    padding: 12px 6px 0;
  }

  .why__flavours {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
  }

  .why__flavour {
    padding: 5px 12px;
    border-radius: var(--pl-r-pill);
    background: var(--pl-sand-50);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  /* Padded tile content */
  .why__fill {
    height: 100%;
    display: flex;
    padding: 12px;
    padding: 7cqw;
  }

  .why__fill--spread {
    flex-direction: column;
    justify-content: space-between;
  }

  .why__fill--bottom {
    align-items: flex-end;
  }

  .why__fill--cta {
    align-items: flex-end;
    justify-content: space-between;
    gap: 7px;
    gap: 4cqw;
  }

  /* Stat headings */
  .why__stat {
    margin: 0;
    display: flex;
    font-weight: 800;
  }

  .why__stat--stack {
    flex-direction: column;
  }

  .why__stat--row {
    align-items: flex-end;
    gap: 8px;
    gap: 5cqw;
  }

  /* 2. 100% plant-based */
  .why__badge {
    width: 30px;
    width: clamp(30px, 13cqw, 46px);
    aspect-ratio: 1;
    border-radius: var(--pl-r-pill);
    background: var(--pl-green-800);
    color: var(--pl-cream);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .why__badge-icon {
    width: 52%;
    height: auto;
  }

  .why__plant-figure {
    font-size: 50px;
    font-size: 30cqw;
    line-height: 0.95;
    letter-spacing: -0.04em;
  }

  .why__plant-label {
    font-size: 14px;
    font-size: clamp(14px, 7.4cqw, 27px);
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  /* 3. Fasting-friendly pill */
  .why__pill {
    position: absolute;
    left: 10px;
    left: 6cqw;
    top: 12px;
    top: 7cqw;
    margin: 0;
    padding: 4px 8px;
    padding: 2.2cqw 5cqw;
    border-radius: var(--pl-r-pill);
    background: var(--pl-yellow);
    color: var(--pl-ink);
    font-size: 14px;
    font-size: clamp(14px, 7.6cqw, 28px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    transform: rotate(-6deg);
  }

  /* 4. 0 preservatives */
  .why__zero-figure {
    font-size: 70px;
    font-size: 42cqw;
    line-height: 0.76;
    letter-spacing: -0.04em;
  }

  .why__zero-label {
    font-size: 13.5px;
    font-size: clamp(13.5px, 6.6cqw, 24px);
    line-height: 1.22;
    letter-spacing: -0.01em;
  }

  /* 5. Protein */
  .why__protein-figure {
    display: flex;
    align-items: baseline;
    gap: 4px;
    gap: 2.4cqw;
    font-size: 45px;
    font-size: 27cqw;
    line-height: 0.95;
    letter-spacing: -0.04em;
  }

  .why__protein-unit {
    font-size: 0.48em;
    letter-spacing: -0.01em;
  }

  .why__protein-label {
    font-size: 14px;
    font-size: clamp(14px, 6.6cqw, 24px);
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  /* 6. Order CTA tile */
  .why__cta {
    border-radius: var(--pl-r-card);
    color: var(--pl-ink);
    text-decoration: none;
  }

  .why__cta-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    gap: 1cqw;
  }

  .why__cta-title {
    font-size: 17px;
    font-size: clamp(17px, 8.4cqw, 31px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .why__cta-sub {
    font-size: 13px;
    font-size: clamp(13px, 4.7cqw, 17px);
    font-weight: 600;
    line-height: 1.3;
  }

  .why__arrow {
    flex: none;
    width: 36px;
    width: clamp(36px, 15cqw, 54px);
    aspect-ratio: 1;
    border-radius: var(--pl-r-pill);
    background: var(--pl-ink);
    color: var(--pl-paper);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .why__arrow-icon {
    width: 44%;
    height: auto;
  }
}
