/* ============================================================
   calibrated_page.css - the Calibrated Diamonds landing page
   (calibrated-diamonds.php) in the pg design language.
   Loaded after css/pg-core.css (tokens, buttons, tag) and
   css/about_page.css: the page root also carries .pg-about, so
   the hero, the labels, the text and the anchor fixes come
   from there. This file holds only the page's own pieces,
   every rule scoped under .pg-cal*.
   ============================================================ */

.pg-cal .pg-tag { align-self: flex-start; }

/* The WhatsApp mark on the two WhatsApp buttons (hero, closing card): a filled
   icon in WhatsApp's own green, the one colour on the page that is not a pg
   token. Named services always get their real mark, never a generic icon. */
.pg-cal .pg-btn .pg-cal-wa { width: 18px; height: 18px; fill: #25D366; stroke: none; }

/* ---- Hero photo: a near-square tile (the photo is 516 x 530) that the
   photo fills. The text column gives way first, so the two stay side by
   side down to a tablet. ---- */
.pg-cal .pg-about-intro { flex-basis: 340px; }
.pg-cal-photo {
    position: relative;
    flex: 1 1 400px;
    min-width: 0;
    min-height: 410px;
    overflow: hidden;
    background: linear-gradient(160deg, #F5F8FC, #E7EDF5);
    border: 1px solid var(--pg-line);
    border-radius: 22px;
}
.pg-cal-photo img,
.pg-cal-split-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Icon disc, shared by the points and the feature cards ---- */
.pg-cal-disc {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--pg-tint);
    border-radius: 50%;
    color: var(--pg-navy);
}
.pg-cal-disc .pg-ico { width: 22px; height: 22px; stroke-width: 1.75; }

/* ---- The four points: four in a row, two by two, then one column ---- */
.pg-cal-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    animation: pg-rise .6s var(--pg-ease) .05s backwards;
}
.pg-cal-point {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 18px;
}
.pg-cal-point-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pg-cal-point-name { color: var(--pg-ink); font: 600 15px/1.3 var(--pg-font); letter-spacing: -.005em; }
.pg-cal-point-note { color: var(--pg-muted); font: 400 13px/1.4 var(--pg-font); }

/* ---- Photo beside text, in one card; .is-flip puts the photo on the right ---- */
.pg-cal-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 22px;
    animation: pg-rise .6s var(--pg-ease) .1s backwards;
}
.pg-cal-split-media {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    background: linear-gradient(160deg, #F5F8FC, #E7EDF5);
}
.pg-cal-split.is-flip .pg-cal-split-media { order: 2; }

/* ---- The drawings in the split cards (calibrated_art_svg, a halo ring in
   rounds; calibrated_bracelet_svg, a tennis bracelet in ovals): stones of
   one size leave the tray one by one and seat in the piece, a tick pops,
   then the piece clears and the tray refills. One loop: 12s for the ring,
   10.5s for the bracelet, which is also shown worn on a wrist before it
   clears. Every moving stone rests in the piece, so with reduced motion the
   drawing shows it finished. The stones are the parcel pages' (.pg-art). ---- */
.pg-cal-art {
    position: absolute;
    inset: 24px;
    width: calc(100% - 48px);
    height: calc(100% - 48px);
    overflow: visible;
    fill: #fff;
    stroke: var(--pg-navy);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pg-cal-art .pg-cal-art-fill { fill: var(--pg-sky-soft); }
.pg-cal-art .pg-cal-art-thin { fill: none; stroke-width: 1; }
.pg-cal-art .pg-cal-facets { fill: none; }
.pg-cal-art .pg-cal-facets * { stroke-width: .7; vector-effect: non-scaling-stroke; }
.pg-cal-art-edge { stroke-width: 3; }
.pg-cal-art-plate { stroke: none; }
.pg-cal-art-well { fill: var(--pg-tint); stroke: var(--pg-line-strong); stroke-width: 1; }
.pg-cal-art-done circle { fill: var(--pg-navy); stroke: none; }
.pg-cal-art-done path { fill: none; stroke: #fff; stroke-width: 2.2; }
.pg-cal-art-refill,
.pg-cal-art-worn { opacity: 0; }
.pg-cal-art-glint { fill: var(--pg-navy); stroke: none; }

.pg-cal-fly-lift,
.pg-cal-art-done,
.pg-cal-art-glint { transform-box: fill-box; transform-origin: center; }
.pg-cal-fly-x,
.pg-cal-fly-y,
.pg-cal-fly-lift { animation: var(--loop, 12s) linear calc(var(--i) * var(--gap, 150ms)) infinite backwards; }
.pg-cal-fly-x { animation-name: pg-cal-fly-x; }
.pg-cal-fly-y { animation-name: pg-cal-fly-y; }
.pg-cal-fly-lift { animation-name: pg-cal-lift; }
.pg-cal-art-set { animation: pg-cal-clear var(--loop, 12s) linear infinite; }
.pg-cal-art-refill { animation: pg-cal-refill var(--loop, 12s) linear infinite; }
.pg-cal-art-done { animation: pg-cal-done var(--loop, 12s) linear infinite; }
/* The bracelet: eleven stones, its own loop and its own timings, because
   the worn view takes the second half. */
.pg-cal-art-line { --gap: 100ms; --loop: 10.5s; }
.pg-cal-art-line .pg-cal-fly-x { animation-name: pg-cal-line-x; }
.pg-cal-art-line .pg-cal-fly-y { animation-name: pg-cal-line-y; }
.pg-cal-art-line .pg-cal-fly-lift { animation-name: pg-cal-line-lift; }
.pg-cal-art-line .pg-cal-art-done { animation-name: pg-cal-line-done; }
.pg-cal-art-bench { animation: pg-cal-bench var(--loop) linear infinite; }
.pg-cal-art-worn { animation: pg-cal-worn var(--loop) linear infinite; }
.pg-cal-art-glint { animation: pg-cal-glint var(--loop) linear infinite; }
.pg-cal-art-glint.is-late { animation-delay: .5s; }

/* In the tray, across to the piece (5% to 13%), seated, then back to the tray
   at 85%, unseen: the whole set is faded out from 84% and the last stone is
   back before the loop ends (85% of 12s + 11 x 150ms for the ring; 85% of
   10.5s + 10 x 100ms for the bracelet). The down part eases out sooner than the
   across part, which bends the path. */
@keyframes pg-cal-fly-x {
    0%, 5%       { transform: translateX(var(--dx)); animation-timing-function: cubic-bezier(.6, 0, .3, 1); }
    13%, 85%     { transform: none; animation-timing-function: steps(1, end); }
    85.01%, 100% { transform: translateX(var(--dx)); }
}
@keyframes pg-cal-fly-y {
    0%, 5%       { transform: translateY(var(--dy)); animation-timing-function: cubic-bezier(.15, .6, .3, 1); }
    13%, 85%     { transform: none; animation-timing-function: steps(1, end); }
    85.01%, 100% { transform: translateY(var(--dy)); }
}
@keyframes pg-cal-lift {
    0%, 5%    { transform: none; }
    9%        { transform: scale(1.2); }
    13%       { transform: scale(.92); }
    15%, 100% { transform: none; }
}
/* The bracelet (10.5s; to change its pace, change --loop and scale --gap
   with it). Its stones lie level in the tray and turn into
   their link as they travel (--r undoes the link's turn; it is repeated after
   85%, or a stone with a delay would show tilted in the tray when the loop
   restarts). Seated by 2.1s, tick, then each stone hops in turn, a ripple
   from the left (3.2s to 4.6s). The bench then lifts away and the worn view
   rises in its place (47% to 54%), two glints blink beside the bracelet, and
   at 84% it fades; the bench returns at 89% with the set cleared and the tray
   refilling, as in the ring's loop. */
@keyframes pg-cal-line-x {
    0%, 4%       { transform: translateX(var(--dx)); animation-timing-function: cubic-bezier(.6, 0, .3, 1); }
    10%, 85%     { transform: none; animation-timing-function: steps(1, end); }
    85.01%, 100% { transform: translateX(var(--dx)); }
}
@keyframes pg-cal-line-y {
    0%, 4%       { transform: translateY(var(--dy)); animation-timing-function: cubic-bezier(.15, .6, .3, 1); }
    10%, 85%     { transform: none; animation-timing-function: steps(1, end); }
    85.01%, 100% { transform: translateY(var(--dy)); }
}
@keyframes pg-cal-line-lift {
    0%, 4%       { transform: rotate(var(--r)) scale(1); }
    7%           { transform: rotate(calc(var(--r) * .5)) scale(1.2); }
    10%          { transform: rotate(0deg) scale(.92); }
    11.5%, 30%   { transform: none; }
    32%          { transform: translateY(-5px); }
    34%, 85%     { transform: none; animation-timing-function: steps(1, end); }
    85.01%, 100% { transform: rotate(var(--r)) scale(1); }
}
@keyframes pg-cal-line-done {
    0%, 21%   { opacity: 0; transform: scale(0); animation-timing-function: var(--pg-spring); }
    24%, 50%  { opacity: 1; transform: none; }
    52%, 100% { opacity: 0; transform: scale(0); }
}
@keyframes pg-cal-bench {
    45%       { opacity: 1; transform: none; }
    49.5%     { opacity: 0; transform: translateY(-10px); }
    50%, 89%  { opacity: 0; transform: none; }
    93%       { opacity: 1; }
}
@keyframes pg-cal-worn {
    0%, 47%   { opacity: 0; transform: translateY(14px); animation-timing-function: var(--pg-ease); }
    54%, 84%  { opacity: 1; transform: none; }
    88%, 100% { opacity: 0; transform: none; }
}
@keyframes pg-cal-glint {
    0%, 56%   { transform: scale(0); }
    59%       { transform: scale(1); }
    62%, 68%  { transform: scale(0); }
    71%       { transform: scale(1); }
    74%, 100% { transform: scale(0); }
}
@keyframes pg-cal-clear {
    80%       { opacity: 1; }
    84%, 100% { opacity: 0; }
}
@keyframes pg-cal-refill {
    0%, 90%   { opacity: 0; }
    96%, 100% { opacity: 1; }
}
@keyframes pg-cal-done {
    0%, 28%   { opacity: 0; transform: scale(0); animation-timing-function: var(--pg-spring); }
    32%, 80%  { opacity: 1; transform: none; }
    84%, 100% { opacity: 0; transform: scale(.6); }
}
.pg-cal-split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    padding: 36px 40px;
}
.pg-cal .pg-cal-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}
.pg-cal .pg-cal-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--pg-ink);
    font: 500 14px/1.4 var(--pg-font);
}
.pg-cal-tick {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--pg-sky-soft);
    border-radius: 50%;
    color: var(--pg-navy);
}
.pg-cal-tick .pg-ico { width: 12px; height: 12px; stroke-width: 3; }

/* ---- Why GEM R YOU: six cards, three by two, two by three, then one column ---- */
.pg-cal .pg-cal-heading {
    margin: 32px 0 16px;
    padding: 0;
    color: var(--pg-ink);
    font: 600 24px/1.2 var(--pg-font);
    letter-spacing: -.015em;
    text-shadow: none;
}
.pg-cal-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.pg-cal-feature {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 18px;
}
.pg-cal .pg-cal-h3 {
    margin: 4px 0 0;
    padding: 0;
    color: var(--pg-ink);
    font: 600 19px/1.25 var(--pg-font);
    letter-spacing: -.01em;
    text-shadow: none;
}

/* ---- Closing card: a split card (photo left), raised, a little lower ---- */
.pg-cal-close {
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(14, 27, 46, .04), 0 10px 30px rgba(14, 27, 46, .05);
}
.pg-cal-close .pg-cal-split-media { min-height: 320px; }

/* ---- Smaller screens ---- */
@media (max-width: 1180px) {
    .pg-cal-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .pg-cal-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pg-cal-split-text { padding: 28px; }
}
@media (max-width: 820px) {
    .pg-cal-photo { flex-basis: 100%; min-height: 0; aspect-ratio: 4 / 3; }
    .pg-cal-split { grid-template-columns: minmax(0, 1fr); }
    .pg-cal-split-media,
    .pg-cal-close .pg-cal-split-media { min-height: 0; aspect-ratio: 4 / 3; }
    .pg-cal-split.is-flip .pg-cal-split-media { order: 0; }
}
@media (max-width: 620px) {
    .pg-cal-points,
    .pg-cal-features { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .pg-cal-photo { min-height: 0; aspect-ratio: 1 / 1; }
    .pg-cal-split-text { padding: 22px 18px; }
    .pg-cal-art { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
    .pg-cal .pg-cal-list { grid-template-columns: minmax(0, 1fr); }
    .pg-cal-feature { padding: 20px 18px; }
    .pg-cal .pg-cal-heading { margin-top: 24px; font-size: 22px; }
}
