/* Haywebs prototype — the pricing page (prices.html): the stepped title, the
   row of three lit plates with their price lists, the note, the CTA.
   Load after tokens.css and base.css. The whole page is dark. */

.prices { --col: clamp(16px, 2.2vw, 32px); }

/* visually hidden, still read: the « драмов» after each price */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------- the head --- */
/* The first chapter clears the fixed header. On the plates' three columns:
   the title spans two, the eyebrow and the lead sit in the third. */
.prices { padding-top: calc(var(--hdr) + clamp(32px, 3.9vw, 56px)); padding-bottom: clamp(64px, 7vw, 104px); }
.prices-head {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--col);
  margin-bottom: clamp(40px, 4.2vw, 60px);
}
.prices-head h1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.prices-head .eyebrow { grid-column: 3; grid-row: 1; padding-top: 0.6em; }
.prices-head .lead { grid-column: 3; grid-row: 2; align-self: end; padding-bottom: 0.35em; }
.prices-head .ln-2 { --x: 1.9em; }

/* ------------------------------------------------------- the packages --- */
/* Six rows per article — plate, name, summary, price, list, button — shared
   through subgrid, so a two-line name in one column moves all three. */
.pkg-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(6, auto);
  column-gap: var(--col); row-gap: 0;
}
.pkg { display: grid; grid-row: span 6; grid-template-rows: subgrid; align-content: start; }
.pkg .media { margin-bottom: 26px; }
/* the no-JS / no-canvas light, brighter with the price (--k) */
.pkg .media {
  background:
    radial-gradient(42% 36% at 50% 44%, rgb(var(--c) / calc(0.62 * var(--k))), transparent 72%),
    radial-gradient(70% 60% at 50% 50%, rgb(var(--c) / calc(0.2 * var(--k))), transparent 75%),
    #07080a;
}
.pkg-1 { --k: 0.55; }
.pkg-2 { --k: 0.8; }
.pkg-3 { --k: 1; }

.pkg-name { font: 600 var(--fs-h3) / 1.3 var(--sans); letter-spacing: -0.012em; overflow-wrap: anywhere; }
.pkg-summary { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
/* Prata 56 / 44 / 36 at 1440 / 1024 / 390; the ֏ is Dram.tsx's drawing */
.pkg-price {
  margin-top: clamp(18px, 2vw, 28px);
  font: 400 clamp(36px, 14.5px + 2.885vw, 56px) / 1.1 var(--serif); letter-spacing: -0.01em; white-space: nowrap;
}
.dram { display: inline-block; width: auto; height: 0.74em; margin-left: 0.16em; vertical-align: baseline; }

/* the features: a hairline, then four lines with --accent dots */
.pkg-list {
  display: grid; align-content: start; gap: 10px; margin: clamp(20px, 2vw, 28px) 0 0; padding: 22px 0 0; list-style: none;
  border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5;
}
.pkg-list li { position: relative; padding-left: 20px; overflow-wrap: anywhere; }
.pkg-list li::before {
  content: ""; position: absolute; left: 0; top: calc(0.75em - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.pkg .btn { justify-self: start; align-self: end; margin-top: 32px; }

.pkg-note { margin-top: clamp(32px, 3.4vw, 48px); font-size: var(--fs-small); color: var(--text-3); }

/* ------------------------------------------------------------ the CTA --- */
.pkg-cta { padding-top: 0; padding-bottom: clamp(88px, 10vw, 152px); }
.cta-in {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 64px; flex-wrap: wrap;
  padding-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line);
}
.cta-in h2 { max-width: 20ch; }
.cta-in .btn { flex: none; }


/* ------------------------------------------- hover, focus, entrance --- */
/* Hover or focus inside an article: its plate grows 1.02 (and, from the page
   script, its light ×1.3). The plates light up left to right once the page
   script marks them .lit; the price text itself never moves or fades. */
@media (prefers-reduced-motion: no-preference) {
  .pkg:focus-within .media { transform: scale(1.02); }
  .js .pkg:not(.lit) .media { opacity: 0; }
  .js .pkg.lit .media { animation: show calc(0.8s * var(--tempo)) var(--soft) both; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pkg:hover .media { transform: scale(1.02); }
}

/* ---------------------------------------------------------- narrower --- */
@media (max-width: 860px) {
  /* without JS the phone header sits in the flow: no room to clear */
  .no-js .prices { padding-top: clamp(32px, 3.9vw, 56px); }
}
@media (max-width: 760px) {
  .prices-head { display: block; }
  .prices-head .eyebrow { padding-top: 0; margin-bottom: 22px; }
  .prices-head .lead { margin-top: 22px; padding-bottom: 0; }
  .pkg-row { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 64px; }
  .pkg { grid-row: auto; grid-template-rows: none; }
  .pkg .btn { margin-top: 28px; }
  .cta-in { flex-direction: column; align-items: flex-start; }
}
