/* Home card system.
 *
 * Apple does not use one card. It uses a small vocabulary of card types
 * sharing one grammar: eyebrow, headline, one-line sub, one link. Rounded
 * to the same radius, padded generously, image bleeding to the card edge.
 *
 *   .uc-duo        two chunky tiles side by side, the product-launch unit
 *   .uc-rail       horizontal snap row, cards peeking at both edges + dots
 *   .uc-acc        accordion rows on the left, media pane on the right
 *   .uc-trio       three editorial cards, eyebrow over a two-line headline
 *   .uc-pair       two light cards, title + one line + text link
 *
 * Tokens come from the page. Nothing here hard-codes a brand colour except
 * where a tile is deliberately inverted.
 */

.uc-sec { padding: clamp(56px, 7vw, 104px) 0; }
/* data-theme swaps the tokens but does not paint. Inverted sections carry
 * their own background, inset as a rounded panel the way the rest of the
 * page treats its dark blocks. */
.uc-sec[data-theme="dark"] {
    background: var(--bg);
    width: min(1360px, calc(100% - 32px));
    margin: clamp(12px, 2vw, 28px) auto;
    border-radius: var(--panel-radius, 24px);
    overflow: hidden;
}
.uc-wrap { max-width: var(--max-w, 1140px); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.uc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.uc-head h2 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; color: var(--text-bright); margin: 0; }
.uc-head p { margin: 10px 0 0; color: var(--text-secondary); font-size: 15px; max-width: 46ch; }
.uc-more { flex: none; color: var(--action); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.uc-more:hover { text-decoration: underline; }

.uc-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 10px; }

/* Shared card shell */
.uc-card {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--panel-radius, 24px); overflow: hidden;
    background: var(--elevated); border: 1px solid var(--border-subtle);
    text-decoration: none; color: inherit; isolation: isolate;
    transition: transform 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1)), border-color 0.3s;
}
@media (hover: hover) and (pointer: fine) {
    a.uc-card:hover { transform: translateY(-4px); border-color: rgba(255,229,0,0.28); }
}
a.uc-card:active { transform: scale(0.994); transition-duration: 0.1s; }
.uc-card-body { padding: clamp(22px, 2.6vw, 34px); }
.uc-card h3 { font-size: clamp(19px, 2vw, 25px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--text-bright); margin: 0 0 8px; }
.uc-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.uc-link { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 600; color: var(--action); }
/* Sources here range from 4016x6016 portrait to 1600x900 landscape, so the
 * box is fixed and the image covers it. Black behind, because the device
 * renders are transparent PNGs and would otherwise sit on a white plate. */
/* height:auto is load-bearing. The width/height attributes on <img> are
 * presentational hints that set CSS width and height, and with both set the
 * aspect-ratio below is ignored, which squashed every portrait source into
 * a landscape box. Overriding height lets aspect-ratio govern the box and
 * object-fit crop into it. */
.uc-card-media {
    margin-top: auto; width: 100%; height: auto;
    aspect-ratio: 16 / 10; object-fit: cover; object-position: center;
    display: block; background: #000;
}

/* ---- .uc-duo : two chunky tiles ---- */
.uc-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); }
.uc-tile {
    border-radius: var(--panel-radius, 24px); overflow: hidden; position: relative;
    padding: clamp(34px, 4.4vw, 64px) clamp(22px, 3vw, 44px) 0;
    text-align: center; display: flex; flex-direction: column;
    min-height: clamp(420px, 46vw, 560px);
    background: var(--elevated); border: 1px solid var(--border-subtle);
}
.uc-tile--invert { background: var(--action); border-color: transparent; }
.uc-tile--invert h2, .uc-tile--invert .uc-tile-sub, .uc-tile--invert .uc-eyebrow { color: #000; }
.uc-tile--invert .uc-eyebrow { opacity: 0.62; }
.uc-tile h2 { font-size: clamp(27px, 3.6vw, 44px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; color: var(--text-bright); margin: 0 0 10px; }
.uc-tile-sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.45; color: var(--text-body); margin: 0 auto; max-width: 32ch; }
.uc-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.uc-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity 0.2s, transform 0.2s; }
.uc-btn--fill { background: var(--action); color: #000; }
.uc-btn--ghost { border: 1px solid var(--border); color: var(--text-bright); }
.uc-tile--invert .uc-btn--fill { background: #000; color: var(--action); }
.uc-tile--invert .uc-btn--ghost { border-color: rgba(0,0,0,0.32); color: #000; }
@media (hover: hover) and (pointer: fine) { .uc-btn:hover { opacity: 0.86; transform: translateY(-1px); } }
/* Tile art keeps its own proportions. Forcing a ratio here squashed the
 * portrait club photo into a landscape box; contain lets each source sit
 * at its natural shape and the black plate carries the difference. */
.uc-tile-media {
    margin: clamp(26px, 3vw, 44px) auto 0; width: 100%; max-width: 520px; display: block;
    height: clamp(240px, 26vw, 340px);
    object-fit: cover; object-position: center 30%;
    border-radius: 14px 14px 0 0; background: #000;
}

/* ---- .uc-rail : horizontal snap row ---- */
.uc-rail-outer { position: relative; }
.uc-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: clamp(248px, 30vw, 340px);
    gap: clamp(12px, 1.6vw, 20px);
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 6px clamp(20px, 4vw, 40px) 26px;
    margin: 0 calc(-1 * clamp(20px, 4vw, 40px));
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.uc-rail::-webkit-scrollbar { display: none; }
.uc-rail > * { scroll-snap-align: start; }
.uc-rail .uc-card { height: 100%; }

.uc-rail-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.uc-dots { display: flex; gap: 7px; }
.uc-dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--border); transition: background 0.25s, width 0.25s; }
.uc-dot[aria-current="true"] { background: var(--action); width: 22px; border-radius: 999px; }
.uc-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; display: none; align-items: center; justify-content: center; }
.uc-arrow:disabled { opacity: 0.3; cursor: default; }
@media (min-width: 900px) { .uc-arrow { display: inline-flex; } }

/* ---- .uc-acc : accordion + media pane ---- */
.uc-acc { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.uc-acc-rows { border-top: 1px solid var(--border-subtle); }
.uc-acc-row { border-bottom: 1px solid var(--border-subtle); }
.uc-acc-btn { width: 100%; background: none; border: 0; padding: clamp(18px, 2vw, 24px) 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; text-align: left; color: var(--text-bright); font-family: inherit; }
.uc-acc-btn h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.uc-acc-chev { width: 13px; height: 13px; flex: none; color: var(--text-secondary); transition: transform 0.35s var(--ease-out, cubic-bezier(0.16,1,0.3,1)); }
.uc-acc-btn[aria-expanded="true"] .uc-acc-chev { transform: rotate(180deg); }
.uc-acc-panel { overflow: hidden; height: 0; transition: height 0.42s var(--ease-out, cubic-bezier(0.16,1,0.3,1)); }
.uc-acc-panel > div { padding: 0 0 clamp(18px, 2vw, 24px); }
.uc-acc-panel p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; max-width: 44ch; }
.uc-acc-badge { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--action); }
.uc-acc-media { position: relative; border-radius: var(--panel-radius, 24px); overflow: hidden; background: var(--elevated); border: 1px solid var(--border-subtle); }
.uc-acc-media img { width: 100%; display: block; opacity: 0; position: absolute; inset: 0; height: 100%; object-fit: cover; transition: opacity 0.5s var(--ease-out, cubic-bezier(0.16,1,0.3,1)); }
.uc-acc-media img:first-child { position: relative; }
.uc-acc-media img[data-active] { opacity: 1; }

/* ---- tinted cards: one accent per service ---- */
.uc-card--tint {
    background:
        linear-gradient(158deg, color-mix(in srgb, var(--tint) 20%, var(--elevated)) 0%,
                                var(--elevated) 58%);
    border-color: color-mix(in srgb, var(--tint) 30%, transparent);
}
.uc-card--tint .uc-eyebrow { color: color-mix(in srgb, var(--tint) 78%, var(--text-bright)); }
.uc-card--tint .uc-link { color: color-mix(in srgb, var(--tint) 82%, var(--text-bright)); }
@media (hover: hover) and (pointer: fine) {
    a.uc-card--tint:hover { border-color: color-mix(in srgb, var(--tint) 62%, transparent); }
}

/* ---- review cards: the quote carries the card, attribution pinned low ---- */
.uc-quote {
    font-size: clamp(17px, 1.7vw, 21px); line-height: 1.42; letter-spacing: -0.015em;
    font-weight: 600; color: var(--text-bright); margin: 0 0 18px;
}
.uc-attrib { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.uc-attrib strong { display: block; color: var(--text-bright); font-size: 15px; }
.uc-attrib span { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 13px; }
.uc-stars { color: var(--action); font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; }
.uc-rail .uc-card--review .uc-card-body { display: flex; flex-direction: column; height: 100%; }

/* ---- .uc-trio / .uc-pair ---- */
.uc-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.uc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); }
.uc-trio .uc-card, .uc-pair .uc-card { min-height: clamp(300px, 34vw, 420px); }

/* ---- responsive ---- */
@media (max-width: 860px) {
    .uc-duo { grid-template-columns: 1fr; }
    /* Stacking three cards costs two thousand pixels of scroll. Below the
     * breakpoint the fixed grids become swipeable rows, same as the rails. */
    .uc-trio, .uc-pair {
        display: grid; grid-auto-flow: column;
        grid-auto-columns: min(78vw, 320px);
        gap: 12px;
        overflow-x: auto; scroll-snap-type: x mandatory;
        padding: 4px clamp(20px, 4vw, 40px) 20px;
        margin: 0 calc(-1 * clamp(20px, 4vw, 40px));
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .uc-trio::-webkit-scrollbar, .uc-pair::-webkit-scrollbar { display: none; }
    .uc-trio > *, .uc-pair > * { scroll-snap-align: start; }
    .uc-trio .uc-card, .uc-pair .uc-card { min-height: 0; }
    .uc-tile-media { max-height: 260px; object-fit: cover; object-position: top; }
    .uc-acc { grid-template-columns: 1fr; }
    .uc-acc-media { order: -1; aspect-ratio: 4 / 3; }
    .uc-head { flex-direction: column; align-items: flex-start; }
    .uc-tile { min-height: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .uc-card, .uc-btn, .uc-acc-chev, .uc-acc-panel, .uc-acc-media img { transition: none; }
    .uc-rail { scroll-behavior: auto; }
}

/* ---- feature list inside a tile (pricing) ---- */
.uc-feat { list-style: none; margin: 20px auto 0; padding: 0; max-width: 34ch; text-align: left; }
.uc-feat li { position: relative; padding: 0 0 0 26px; margin-bottom: 11px; font-size: 15px; line-height: 1.5; color: var(--text-body); }
.uc-feat li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 11px; border: solid var(--action); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.uc-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 4px 0 2px; }
.uc-price b { font-size: clamp(38px, 5vw, 58px); font-weight: 800; letter-spacing: -0.04em; color: var(--text-bright); }
.uc-price span { font-size: 15px; color: var(--text-secondary); }
.uc-fine { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.uc-fine a { color: var(--action); }

/* ---- page-level headings, for pages outside the home grid ---- */
.uc-h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; color: var(--text-bright); margin: 0 0 14px; }
.uc-h2 { font-size: clamp(26px, 3.8vw, 42px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; color: var(--text-bright); margin: 0 0 12px; }
.uc-lede { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--text-secondary); margin: 0 0 22px; max-width: 56ch; }

/* Pages outside the home grid use .uc-sec without an inner .uc-wrap, so the
 * gutter that normally lives on the wrap has to come from the section. */
.uc-sec:not(:has(> .uc-wrap)) {
    max-width: var(--max-w, 1140px);
    margin-inline: auto;
    padding-inline: clamp(20px, 4vw, 40px);
}
.uc-sec[data-theme="dark"]:not(:has(> .uc-wrap)) { padding-inline: clamp(24px, 4vw, 48px); }
.uc-h3-card { font-size: clamp(18px, 1.9vw, 23px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; color: var(--text-bright); }
