/* premium.css — depth, craft and polish layer. Loaded last. Uses ONLY the existing palette tokens. */
:root { --hair: rgba(244,245,246,.07); --hair-strong: rgba(244,245,246,.14); --lift: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -18px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.35); }

/* ---------- Type ---------- */
h1, h2 { text-wrap: balance; }
.eyebrow { display: inline-flex; align-items: center; gap: 14px; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.page-header .eyebrow::before, .page-header > span:first-child::before { }
.features h2, .price-section h2 { font-size: clamp(28px, 3.8vw, 40px); letter-spacing: -1.4px; line-height: 1.08; }
.section-intro { max-width: 680px; }

/* ---------- Hero and page headers: blueprint grid, vignette, brand watermark ---------- */
.hero, .page-header { position: relative; isolation: isolate; }
.hero::before, .page-header::before {
    content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; pointer-events: none;
    background:
        linear-gradient(rgba(244,245,246,.045) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, rgba(244,245,246,.045) 1px, transparent 1px) 0 0 / 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 70% 40%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 70% 90% at 70% 40%, #000 0%, transparent 75%);
}
.page-header::after {
    content: ""; position: absolute; right: -10px; top: 50%; width: 300px; height: 300px; transform: translateY(-50%);
    background: url(logo-mark.svg) center / contain no-repeat; opacity: .075; z-index: -1; pointer-events: none;
    filter: drop-shadow(0 0 40px rgba(141,187,234,.4));
}
.page-header { padding: 88px 0 64px; }
.page-header h1 { font-size: clamp(36px, 5.4vw, 58px) !important; letter-spacing: -2px !important; line-height: 1.04; }
.hero { padding-bottom: 88px; }
.hero h1 { text-shadow: 0 2px 30px rgba(0,0,0,.25); }
/* light-catching hairline under every header band */
.hero, .page-header { border-bottom: 0 !important; }
.hero::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; z-index: 1;
    background: linear-gradient(90deg, transparent 4%, rgba(141,187,234,.55) 30%, rgba(79,209,161,.45) 60%, rgba(240,116,110,.4) 82%, transparent 96%); }

/* ---------- Proof strip ---------- */
.proof { position: relative; z-index: 2; margin-top: -1px; }
.proof-inner { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hair-strong); border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(180deg, rgba(47,51,54,.9), rgba(32,35,38,.92)); box-shadow: var(--lift); transform: translateY(-34px); backdrop-filter: blur(10px); }
.proof-item { padding: 26px 28px; position: relative; }
.proof-item + .proof-item::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--hair-strong); }
.proof-num { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -1.5px; line-height: 1;
    background: linear-gradient(100deg, #A9CDF2, #8DBBEA 55%, #7FD6B6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.proof-label { margin-top: 8px; font-size: 13px; color: var(--muted); letter-spacing: .2px; }
.proof + .features { padding-top: 36px; }
@media (max-width: 820px) { .proof-inner { grid-template-columns: 1fr 1fr; } .proof-item:nth-child(3)::before { display: none; } .proof-item:nth-child(n+3) { border-top: 1px solid var(--hair-strong); } }

/* ---------- Cards: machined-glass surfaces ---------- */
.card, .gear-card, .steps li, .solution, .case-outcome, .tier {
    background: linear-gradient(165deg, rgba(47,51,54,.95) 0%, rgba(39,42,45,.97) 45%, rgba(30,33,36,.98) 100%);
    border: 1px solid var(--hair-strong); box-shadow: var(--lift); position: relative;
}
.card::after, .gear-card::after, .steps li::after { content: ""; position: absolute; left: 14%; right: 14%; top: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(169,205,242,.55), transparent); }
.card:hover, .gear-card:hover { border-color: rgba(141,187,234,.45); box-shadow: var(--lift), 0 0 0 1px rgba(141,187,234,.12), 0 26px 60px -20px rgba(141,187,234,.25); transform: translateY(-5px); }
.features .grid-3 { counter-reset: feat; }
.features .grid-3 > .card { counter-increment: feat; padding-top: 52px; }
.features .grid-3 > .card::before { content: counter(feat, decimal-leading-zero); position: absolute; left: 30px; top: 22px; font-size: 12px; font-weight: 800; letter-spacing: 2.5px; color: var(--accent); opacity: .85; }
.features .grid-3 > a.card::before { content: none; }
.features .grid-3 > a.card { padding-top: 30px; }

/* ---------- Steps: connected path ---------- */
.steps { position: relative; }
.steps li::before { box-shadow: 0 0 0 5px rgba(141,187,234,.14), 0 6px 18px rgba(141,187,234,.35); }
@media (min-width: 1000px) {
  .steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 41px; height: 1px; z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(141,187,234,.5) 12%, rgba(79,209,161,.4) 55%, rgba(240,116,110,.35) 88%, transparent); }
  .steps li { z-index: 1; }
}

/* ---------- Section rhythm: gradient hairlines instead of flat rules ---------- */
.case-study, .price-section { border-bottom: 0 !important; position: relative; }
.case-study::after, .price-section::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--hair-strong) 12%, var(--hair-strong) 88%, transparent); }
.case-study:last-of-type::after, .price-section:last-of-type::after { display: none; }
.features { position: relative; }
.features + .features::before { content: ""; position: absolute; left: 50%; top: 0; width: min(var(--width), 92%); height: 1px; transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--hair-strong) 15%, var(--hair-strong) 85%, transparent); }

/* ---------- Work page ---------- */
.case-study { counter-increment: case; }
main { counter-reset: case; }
.case-title { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -1.2px; }
.case-title::before { content: none; }
.case-tech { margin-bottom: 8px; }
.tech-badge { background: rgba(47,51,54,.8); border-color: var(--hair-strong); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.case-outcome { border-top: 0; overflow: hidden; }
.case-outcome::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--green) 60%, var(--coral)); }
.diagram { margin: 26px 0 8px; padding: 22px; border: 1px solid var(--hair-strong); border-radius: var(--radius-lg); box-shadow: var(--lift);
    background: radial-gradient(600px 260px at 80% 0%, rgba(141,187,234,.10), transparent 70%), linear-gradient(165deg, #202427, #191B1E); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { margin: 14px 4px 0; font-size: 13px; color: var(--muted); }
.diagram text { font-family: inherit; }

/* ---------- About: framed portrait ---------- */
.profile-photo { border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px var(--hair-strong), 0 0 70px rgba(141,187,234,.14); }
.split-profile > div:first-child { position: relative; align-self: start; }
.split-profile > div:first-child::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid rgba(141,187,234,.4); border-radius: 26px; z-index: -1;
    background: linear-gradient(160deg, rgba(141,187,234,.08), transparent 60%); }
.split-profile { padding-top: 64px; border-top: 0; }
.bio-details h2 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -1.4px; margin-bottom: 4px; }
.bio-title { letter-spacing: 2px; text-transform: uppercase; font-size: 12px; font-weight: 700; color: var(--accent); }
.badge { background: linear-gradient(165deg, rgba(47,51,54,.95), rgba(30,33,36,.98)); border-color: var(--hair-strong); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }

/* ---------- Buttons, nav, footer detail ---------- */
.button { letter-spacing: .2px; }
.button-primary { box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 10px 26px rgba(141,187,234,.28); }
.button:not(.button-primary):hover { box-shadow: 0 0 0 1px rgba(141,187,234,.4), 0 10px 30px rgba(141,187,234,.14); }
footer { position: relative; }
.footer-area, .footer-links a { letter-spacing: .1px; }

/* ---------- Legal and contact: refined reading surface ---------- */
.legal { padding-top: 72px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -1.6px; }
.legal h2 { display: flex; align-items: center; gap: 12px; padding-top: 28px; border-top: 1px solid var(--hair); }
.legal h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(141,187,234,.6); flex: none; }

/* ---------- Motion respect ---------- */
@media (prefers-reduced-motion: reduce) { .card, .gear-card { transition: none; } }
@media (max-width: 760px) {
  .page-header { padding: 56px 0 44px; }
  .page-header::after { width: 180px; height: 180px; right: -30px; opacity: .06; }
  .split-profile > div:first-child::before { inset: -10px 10px 10px -10px; }
}

/* six-card grids sit 3 x 2, never 4 + 2 */
@media (min-width: 900px) { .grid-3:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); } }
.diagram { margin-bottom: 28px; }
@media (max-width: 760px) {
  .diagram { overflow-x: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
  .diagram svg { min-width: 640px; }
  .diagram figcaption { position: sticky; left: 0; max-width: calc(100vw - 80px); }
}

/* eight-card grids: 2 columns, then 4 on wide screens */
@media (min-width: 640px) { .grid-3:has(> :nth-child(8):last-child) { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-3:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, 1fr); } }
