/*
 * Stage 2 revised (A-81, A-82): the compare page as the first page of the membership selection,
 * the tier pages without the benefit list, and the fix for the missing "à" in Eredità.
 * Loaded after selection.css; the old .c3 compare and .tc-bens styles there are no longer used.
 *
 * THE "à" FIX. .tc-name set line-height .88 with text-transform: uppercase, so the grave accent of
 * the capital À rose above the element's box. On Eredità the name is painted with
 * background-clip: text and color: transparent: the gold gradient only exists inside the box, so
 * the accent, outside it, was transparent and vanished. The box now has room above the capitals
 * (padding-top), pulled back with a negative margin so the layout doesn't move. Any other
 * background-clip name added later needs the same room.
 *
 * Compare: a phone shows each benefit's label above its three values, with the tier header pinned;
 * a desktop shows a four-column table. Eredità is a continuous gilt column from its header to its
 * choose button: emphasis by material only, with no label (A-77). Contrast: --ink on #0a0908 16.9:1,
 * --leaf #e3c98f on the gilt cell (≈#15120d) 11.3:1, --ink-3 on #0a0908 7.2:1 (by hand).
 */

/* ---------- The "à" fix ---------- */
.tc-name { line-height: 1; padding-top: .18em; margin-top: -.12em; padding-right: .05em; }
.tc-eredita .tc-name { background-origin: padding-box; }

/* ---------- Tier pages: scene captions in the table's words, the way on ---------- */
.scene-k { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; color: #e3d3ad; }
.scene-t .v-t { margin-right: 4px; }
.tc-onward { display: grid; gap: 12px; margin: 0 0 30px; }
.tc-onward .tc-nextcard { margin: 0; }
.tc-onward-2 { display: grid; gap: 12px; }
.tc-nextcard-plain { text-transform: none; letter-spacing: 0; font-size: clamp(1.7rem, 6vw, 2.4rem); }
.tc-onward .tc-nextcard:not(.tc-next-compare) { min-height: 150px; }
@media (min-width: 700px) { .tc-onward-2 { grid-template-columns: 1fr 1fr; } }

/* ======================================================================
   Compare
   ====================================================================== */
.cmp-page { --cmp-top: 56px; }
.cmp-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 10px 56px; }
.cmp-intro { text-align: center; margin: 0 auto 22px; max-width: 34rem; }
.cmp-h { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 7.4vw, 3.6rem); line-height: 1.06; }
.cmp-h:focus { outline: none; }
.cmp-sub { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.cmp-term { margin: 22px 0 6px; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--ink-2); }
.cmp-notes { margin-top: 18px; }

.cmp2 { position: relative; }
.cmp2-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 6px; }
.cmp2-label { grid-column: 1 / -1; padding: 16px 8px 6px; font-size: 13px; line-height: 1.35; color: var(--ink-2); text-align: center; }
.cmp2-corner { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the pinned header */
.cmp2-head { position: sticky; top: var(--cmp-top); z-index: 6; background: linear-gradient(180deg, #0a0908 82%, rgba(10, 9, 8, 0)); padding-top: 6px; }
.cmp2-col { min-width: 0; }
.cmp2-tier { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; height: 100%; padding: 12px 4px 10px; border-radius: 16px 16px 0 0; text-decoration: none; color: var(--ink); text-align: center; overflow: hidden; }
a.cmp2-tier:hover { color: var(--ink); }
.cmp2-r { font-family: var(--font-display); font-size: .9rem; letter-spacing: .2em; color: var(--ink-3); }
.cmp2-name { font-family: var(--font-display); font-size: clamp(1.05rem, 4.6vw, 1.7rem); line-height: 1.2; letter-spacing: .06em; padding-top: .1em; }
.cmp2-m { font-family: var(--font-display); font-style: italic; font-size: .9rem; color: var(--ink-2); }
.cmp2-open { margin-top: 6px; font-size: 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold-line); }
a.cmp2-tier:hover .cmp2-open { color: var(--gold-hi); }
.cmp2-yours { margin-top: 6px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; color: var(--gold-hi); }

/* cells */
.cmp2-cell { min-width: 0; padding: 4px 6px 14px; text-align: center; font-size: 13.5px; line-height: 1.38; color: var(--ink); }
.cmp2-cell .v-t { display: inline; }
.cmp2-cell .mk { margin: 4px 0 0 2px; }
.cmp2-cell.is-none { color: var(--ink-3); }

/* sections */
.cmp2-sec .cmp2-seclabel { padding: 30px 8px 8px; font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--gold-hi); }
.cmp2-group:first-child .cmp2-sec .cmp2-seclabel { padding-top: 18px; }
.cmp2-sv { padding-top: 2px; font-family: var(--font-display); font-size: 1.25rem; }
.cmp2-fee { display: inline-flex; flex-direction: column; align-items: center; }
.cmp2-fee .num { font-size: clamp(1.45rem, 6.4vw, 2.4rem); line-height: 1.05; }
.cmp2-fee .per { font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-2); }
.cmp2-sv.is-fee { padding-bottom: 8px; }

/* choose row */
.cmp2-choose .cmp2-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
.cmp2-choose .cmp2-cell { padding: 10px 6px 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.cmp2-btn { width: 100%; min-height: 52px; padding: 6px 8px; font-size: 13px; line-height: 1.2; white-space: normal; text-align: center; }
.cmp2-here { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--gold-hi); }
.cmp2-none { color: var(--ink-3); }
.cmp2 .tc-mine { margin: 0 0 6px; }

/* materials, column by column */
.cmp2-col.t-scoperta .cmp2-tier { box-shadow: inset 0 0 0 1px rgba(217, 199, 163, .35); }
.cmp2-col.t-scoperta .cmp2-m { color: #d9c7a3; }
.cmp2-col.t-famiglia .cmp2-tier { background: linear-gradient(180deg, rgba(170, 96, 40, .2), rgba(20, 12, 7, .9)); box-shadow: inset 0 0 0 1px #c8a96a, inset 0 0 0 4px #140c07, inset 0 0 0 5px rgba(200, 169, 106, .45); }
.cmp2-col.t-famiglia .cmp2-m { color: #c8a96a; }
.cmp2-cell.t-famiglia { background: rgba(200, 169, 106, .03); }

.cmp2-col.t-eredita .cmp2-tier { background: radial-gradient(ellipse at 50% 0%, rgba(255, 190, 110, .22), transparent 70%), #060504; box-shadow: inset 0 0 0 1px #e3c98f, inset 0 0 0 5px #060504, inset 0 0 0 6px rgba(227, 201, 143, .6); }
.cmp2-col.t-eredita .cmp2-name, .cmp2-col.t-eredita .cmp2-m, .cmp2-col.t-eredita .cmp2-r { color: var(--leaf); }
.cmp2-col.t-eredita .cmp2-tier::after { content: ""; position: absolute; inset: -10% -80%; pointer-events: none; background: linear-gradient(105deg, transparent 44%, rgba(255, 236, 190, .3) 50%, transparent 56%); transform: translateX(-60%); }
.cmp-page[class*="is-enter"] .cmp2-col.t-eredita .cmp2-tier::after { animation: sweep 1.8s .6s var(--ease) both; }
.cmp2-cell.t-eredita { color: var(--leaf); background: linear-gradient(180deg, rgba(227, 201, 143, .075), rgba(227, 201, 143, .055)); box-shadow: inset 1px 0 0 rgba(227, 201, 143, .5), inset -1px 0 0 rgba(227, 201, 143, .5); }
.cmp2-cell.t-eredita.is-none { color: #b5a98f; }
.cmp2-choose .cmp2-cell.t-eredita { border-radius: 0 0 16px 16px; box-shadow: inset 1px 0 0 rgba(227, 201, 143, .5), inset -1px 0 0 rgba(227, 201, 143, .5), inset 0 -1px 0 rgba(227, 201, 143, .5), 0 24px 40px -24px rgba(255, 190, 110, .35); }
.cmp2-btn.btn[data-tier="eredita"], a.cmp2-btn[href$="/eredita"] { color: #1d1405; border-color: #8a6a2c; background-color: #d9b96f; background-image: linear-gradient(180deg, #f6e2a8, #d9b96f 50%, #b48a3c); box-shadow: inset 0 0 0 1px rgba(255, 246, 220, .6), 0 14px 30px -14px rgba(180, 130, 40, .7); }
.cmp2-btn.btn[data-tier="eredita"]:hover, a.cmp2-btn[href$="/eredita"]:hover { background-image: none; background-color: #c9a75c; color: #1d1405; }
.cmp2-btn.btn[data-tier="eredita"]:focus-visible, a.cmp2-btn[href$="/eredita"]:focus-visible { outline-color: var(--leaf); }

/* the current tier in the member area */
.cmp2-up .cmp2-col.is-current .cmp2-tier { outline: 1px dashed var(--gold-hi); outline-offset: -10px; }

/* entrance: the three columns rise together, Eredità last */
html.motion .cmp-page[class*="is-enter"] .cmp2-col { animation: selIn .8s var(--ease-out) both; }
html.motion .cmp-page[class*="is-enter"] .cmp2-col.t-famiglia { animation-delay: .08s; }
html.motion .cmp-page[class*="is-enter"] .cmp2-col.t-eredita { animation-delay: .16s; }

@media (min-width: 760px) {
  .cmp-wrap { padding: 36px 24px 64px; }
  .cmp2-row { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); column-gap: 12px; }
  .cmp2-corner { position: static; width: auto; height: auto; clip: auto; }
  .cmp2-label { grid-column: auto; display: flex; align-items: center; padding: 15px 10px 15px 4px; text-align: left; font-size: 14.5px; border-top: 1px solid var(--line); }
  .cmp2-cell { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 15px 10px; font-size: 14.5px; border-top: 1px solid var(--line); }
  .cmp2-cell.t-eredita { border-top-color: rgba(227, 201, 143, .22); }
  .cmp2-sec .cmp2-seclabel { grid-column: 1 / -1; border-top: 0; padding: 36px 4px 10px; font-size: 1.55rem; }
  .cmp2-sec.has-v .cmp2-seclabel { grid-column: auto; }
  .cmp2-sec .cmp2-cell { border-top: 0; }
  .cmp2-sec:not(.has-v) { grid-template-columns: 1fr; }
  .cmp2-sec:not(.has-v) .cmp2-seclabel { grid-column: 1; }
  .cmp2-choose .cmp2-label { position: static; width: auto; height: auto; clip: auto; padding: 15px 10px 15px 4px; }
  .cmp2-choose .cmp2-cell { padding: 18px 12px 20px; }
  .cmp2-btn { font-size: 14.5px; }
  .cmp2-tier { padding: 18px 8px 14px; }
}
/* Sections without values span the row, but must keep the gilt column running through them. */
@media (min-width: 760px) {
  .cmp2-sec:not(.has-v) { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
  .cmp2-sec:not(.has-v) .cmp2-seclabel { grid-column: 1 / 4; }
  .cmp2-sec:not(.has-v)::after { content: ""; grid-column: 4; grid-row: 1; background: rgba(227, 201, 143, .065); box-shadow: inset 1px 0 0 rgba(227, 201, 143, .5), inset -1px 0 0 rgba(227, 201, 143, .5); }
  .cmp2-up .cmp2-sec:not(.has-v)::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp2-col.t-eredita .cmp2-tier::after { display: none; }
}
