/* ===========================================================================
   ExtraProfile — Earn passive income
   Single stylesheet. No framework, no build step.
   =========================================================================== */

:root {
  --ink:        #0e1526;
  --ink-2:      #2a3550;
  --muted:      #5b6780;
  --line:       #e3e7ef;
  --bg:         #ffffff;
  --bg-soft:    #f6f8fc;
  --navy:       #0e1a33;
  --navy-2:     #16264a;
  --accent:     #2f6bff;
  --accent-ink: #1b47b8;
  --gold:       #e8a33d;
  --green:      #12805c;
  --red:        #b3251f;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(14,21,38,.05), 0 8px 24px rgba(14,21,38,.06);
  --shadow-lg:  0 2px 4px rgba(14,21,38,.06), 0 18px 50px rgba(14,21,38,.12);
  --wrap:       1120px;
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* scroll-padding-top keeps in-page anchor targets (#how, /terms#s4) clear of
   the 68px sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Skip link ---------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.16rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--accent), #1b47b8 70%);
  color: #fff; display: grid; place-items: center;
  font-size: .78rem; font-weight: 800; letter-spacing: -.04em;
}
.brand small { display: block; font-size: .62rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; line-height: 1; margin-top: 2px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-2); font-size: .95rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--accent-ink); text-decoration: none; }
/* .nav-links a (0,1,1) would otherwise beat .btn-primary's white text. */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 1rem; cursor: pointer; }

/* Collapse point for the 7-item nav: the row needs ~915px, so fold earlier. */
@media (max-width: 940px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; text-align: center; border-bottom: 0; }
}

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 10px;
  font-weight: 650; font-size: .98rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(47,107,255,.28); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 1.03rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Hero --------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 460px at 78% -8%, rgba(47,107,255,.30), transparent 62%),
    radial-gradient(620px 380px at 8% 8%, rgba(232,163,61,.16), transparent 60%),
    linear-gradient(165deg, var(--navy), var(--navy-2));
  color: #fff; padding: 84px 0 92px; position: relative; overflow: hidden;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { font-size: clamp(1.06rem, 2vw, 1.24rem); color: #c3ceE6; max-width: 56ch; margin-bottom: 30px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 60px 0 68px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #dbe4f7; padding: 7px 15px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .03em; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 20px; font-size: .87rem; color: #93a3c4; }

/* Hero card */
.hero-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px; padding: 26px; backdrop-filter: blur(8px);
}
.hero-card h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; letter-spacing: .01em; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1);
  color: #d3dcf0; font-size: .93rem;
}
.hero-card li:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-card .tick { color: #4ade80; font-weight: 700; flex: none; }

/* ---------- Sections ----------------------------------------------------- */
section { padding: 76px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 660px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head p { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }
.kicker {
  text-transform: uppercase; letter-spacing: .12em; font-size: .74rem;
  font-weight: 700; color: var(--accent); margin-bottom: 12px;
}

/* ---------- Grids / cards ------------------------------------------------ */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: #eef3ff; color: var(--accent-ink); font-size: 1.15rem; margin-bottom: 16px;
}

/* Numbered steps */
.step { position: relative; padding-left: 60px; }
.step .num {
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 1.02rem;
}

/* ---------- Payout factors ---------------------------------------------- */
.factor-list { list-style: none; margin: 0; padding: 0; }
.factor-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.factor-list li:last-child { border-bottom: 0; }
.factor-list strong { font-weight: 650; }
.factor-list .val { color: var(--muted); font-size: .92rem; text-align: right; flex: none; max-width: 46%; }

.quote-box {
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
  color: #fff; border-radius: 16px; padding: 34px;
}
.quote-box h3 { color: #fff; font-size: 1.3rem; }
.quote-box p { color: #c3cee6; }
.quote-box .btn { margin-top: 10px; }

/* ---------- Honest / risk section ---------------------------------------- */
.pill-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
.pill-head .badge {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge-do   { background: #e3f5ee; color: var(--green); }
.badge-dont { background: #fdeceb; color: var(--red); }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { padding: 9px 0 9px 28px; position: relative; color: var(--ink-2); font-size: .96rem; }
.check-list li::before { position: absolute; left: 0; top: 9px; font-weight: 700; }
.check-list.yes li::before { content: "✓"; color: var(--green); }
.check-list.no  li::before { content: "✕"; color: var(--red); }

.notice {
  border: 1px solid #f0dcae; background: #fdf7e9; border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 20px 22px;
}
.notice h3 { font-size: 1.05rem; margin-bottom: 8px; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------------------------------------------------------- */
details.faq {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 22px; background: #fff; margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer; font-weight: 650; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 1.35rem; font-weight: 400; line-height: 1; flex: none; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 14px 0 0; color: var(--ink-2); }

/* ---------- Forms -------------------------------------------------------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 34px; box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,255,.15);
}
.field textarea { min-height: 110px; resize: vertical; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .err { color: var(--red); font-size: .85rem; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } .form-card { padding: 24px; } }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); }
.consent input { width: auto; margin-top: 4px; flex: none; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-msg { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: .95rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok  { background: #e3f5ee; color: #0b5c43; border: 1px solid #b9e3d3; }
.form-msg.bad { background: #fdeceb; color: #8c1c17; border: 1px solid #f3c9c6; }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: var(--navy); color: #9fb0d0; padding: 58px 0 30px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.site-footer a { color: #9fb0d0; display: block; padding: 5px 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; display: block; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 42px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .86rem;
}

/* ---------- Legal pages -------------------------------------------------- */
.legal { padding: 64px 0; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal h2:first-of-type { margin-top: 1em; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: .5em; }
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 54px 0; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .3em; }
.page-head p { color: var(--muted); margin-bottom: 0; font-size: 1.05rem; }

/* ---------- Trust strip -------------------------------------------------- */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0; }
.trust-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.trust-item { display: flex; gap: 13px; align-items: flex-start; }
.trust-item .ti-ico {
  font-size: 1.2rem; flex: none; width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-soft); display: grid; place-items: center;
}
.trust-item strong { display: block; font-size: .94rem; font-weight: 650; }
.trust-item span:not(.ti-ico) { display: block; font-size: .84rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .trust-items { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 520px) { .trust-items { grid-template-columns: 1fr; } }

/* ---------- Persona cards ------------------------------------------------ */
.persona .ico { background: #eef3ff; }
.persona h3 { font-size: 1.05rem; }
.persona p { font-size: .94rem; color: var(--ink-2); }

/* ---------- CTA band ----------------------------------------------------- */
.cta-band {
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
  color: #fff; padding: 72px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #c3cee6; font-size: 1.08rem; max-width: 54ch; margin: 0 auto 28px; }

/* ---------- Apply page layout -------------------------------------------- */
.apply-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .apply-grid { grid-template-columns: 1fr; } }
.apply-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
@media (max-width: 900px) { .apply-side { position: static; } }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 1rem; margin-bottom: 14px; }
.mini-steps { list-style: none; margin: 0; padding: 0; counter-reset: ms; }
.mini-steps li { position: relative; padding: 0 0 18px 38px; counter-increment: ms; }
.mini-steps li:last-child { padding-bottom: 0; }
.mini-steps li::before {
  content: counter(ms); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.mini-steps strong { display: block; font-size: .94rem; }
.mini-steps span { display: block; font-size: .86rem; color: var(--muted); line-height: 1.5; }

/* ---------- Legal: table of contents + strong notice --------------------- */
.toc {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 24px; margin: 26px 0 10px;
}
.toc strong { display: block; margin-bottom: 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin-bottom: 5px; font-size: .92rem; break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.notice-strong { border-left-width: 5px; background: #fdf4e4; }

/* ---------- Blog --------------------------------------------------------- */
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-card a { color: inherit; }
.post-card a:hover { text-decoration: none; }
.post-card .pc-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
/* Used inside post cards, on the blog tag bar, and under articles. */
.pc-tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-ink); background: #eef3ff;
  padding: 5px 12px; border-radius: 999px; align-self: flex-start;
  border: 1px solid transparent; transition: background .12s ease, color .12s ease;
}
a.pc-tag:hover { background: #dfe9ff; text-decoration: none; }
.post-card .pc-tag { margin-bottom: 12px; }
.post-card h3 { font-size: 1.06rem; margin-bottom: 8px; letter-spacing: -.015em; }
.post-card p { font-size: .93rem; color: var(--muted); margin-bottom: 16px; flex: 1; }
.post-card .pc-meta { font-size: .82rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.post-card .pc-meta .sep { opacity: .5; }

/* Article body */
.article { padding: 48px 0 76px; }
.article-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 54px 0 46px; }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: .4em; }
.article-meta { color: var(--muted); font-size: .92rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.prose { font-size: 1.06rem; line-height: 1.78; color: var(--ink-2); }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .6em; color: var(--ink); }
.prose h3 { font-size: 1.18rem; margin: 1.7em 0 .5em; color: var(--ink); }
.prose p { margin-bottom: 1.15em; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 1.3em; }
.prose li { margin-bottom: .55em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose blockquote {
  border-left: 4px solid var(--accent); background: var(--bg-soft);
  margin: 1.6em 0; padding: 16px 22px; border-radius: 0 8px 8px 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .96rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 650; }

.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { margin: 0 7px; opacity: .6; }

.article-cta {
  background: linear-gradient(150deg, var(--navy), var(--navy-2)); color: #fff;
  border-radius: 16px; padding: 32px; margin: 44px 0 0; text-align: center;
}
.article-cta h3 { color: #fff; font-size: 1.3rem; }
.article-cta p { color: #c3cee6; max-width: 46ch; margin: 0 auto 20px; }

.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: .92rem;
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { color: var(--muted); background: var(--bg-soft); cursor: default; }

/* ---------- Utilities ---------------------------------------------------- */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.stack > * + * { margin-top: 22px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   3D / motion layer
   Everything below is additive polish. Each rule degrades to the flat
   design if transforms, canvas or JS are unavailable, and all of it is
   disabled under prefers-reduced-motion (see the block at the end).
   ========================================================================= */

/* ---------- Hero constellation ------------------------------------------ */
.hero { position: relative; isolation: isolate; }
#constellation {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 1;
}
.hero > .wrap { position: relative; z-index: 1; }

/* Depth haze so text never fights the node field */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(58% 62% at 18% 46%, rgba(14,26,51,.72), rgba(14,26,51,.28) 55%, transparent 76%);
}

/* ---------- Shared 3D scene --------------------------------------------- */
.scene { perspective: 1200px; perspective-origin: 50% 50%; }

/* Cards that tilt toward the pointer. JS sets --rx/--ry; without it they
   stay flat, which is a perfectly good fallback. */
.tilt {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
  will-change: transform;
}
.tilt:hover { box-shadow: 0 18px 50px rgba(14,21,38,.16), 0 4px 10px rgba(14,21,38,.07); }
.tilt > * { transform: translateZ(22px); }

/* Hero card gets a stronger float */
.hero-card {
  transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* ---------- Numbered steps: depth + connecting line ---------------------- */
.step .num {
  transform: translateZ(30px);
  box-shadow: 0 10px 24px rgba(14,26,51,.28);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease;
}
.step:hover .num { transform: translateZ(30px) scale(1.09) rotate(-4deg); }

.steps-3d { position: relative; }
.steps-3d::before {
  content: ""; position: absolute; top: 21px; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg,
    transparent, rgba(47,107,255,.32) 14%, rgba(47,107,255,.32) 86%, transparent);
  z-index: 0;
}
.steps-3d > * { position: relative; z-index: 1; }
@media (max-width: 900px) { .steps-3d::before { display: none; } }

/* ---------- Card depth on hover ----------------------------------------- */
.card.lift {
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .3s ease;
}
.card.lift:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 20px 46px rgba(14,21,38,.13), 0 3px 8px rgba(14,21,38,.06);
  border-color: #cfd9ec;
}
.card.lift .ico { transition: transform .3s cubic-bezier(.22,.61,.36,1); }
.card.lift:hover .ico { transform: translateZ(30px) scale(1.1) rotate(-5deg); }

/* ---------- Isometric use-case grid ------------------------------------- */
.iso .card {
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.iso .card:hover {
  transform: rotateX(4deg) rotateY(-5deg) translateZ(16px);
  box-shadow: -14px 22px 44px rgba(14,21,38,.15);
}

/* ---------- Quote / CTA: animated gradient mesh -------------------------- */
.quote-box, .cta-band, .article-cta { position: relative; overflow: hidden; }
.quote-box::before, .cta-band::before, .article-cta::before {
  content: ""; position: absolute; inset: -40%;
  background:
    radial-gradient(38% 38% at 26% 30%, rgba(47,107,255,.42), transparent 62%),
    radial-gradient(34% 34% at 76% 68%, rgba(232,163,61,.26), transparent 62%);
  animation: mesh 17s ease-in-out infinite alternate;
  pointer-events: none;
}
.quote-box > *, .cta-band > *, .article-cta > * { position: relative; z-index: 1; }
@keyframes mesh {
  0%   { transform: translate3d(-4%, -3%, 0) scale(1); }
  100% { transform: translate3d(5%, 4%, 0) scale(1.14); }
}

/* ---------- Scroll reveal ------------------------------------------------ */
/* Fail-safe by default: .reveal content is VISIBLE. The hidden-then-animate
   state is only applied once JS has confirmed IntersectionObserver actually
   works (html.reveal-ready). If IO is missing, blocked, or never fires, the
   page still renders every section — content is never hidden by a script
   that did not run. */
.reveal { opacity: 1; transform: none; }

html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px) rotateX(6deg);
  transform-origin: 50% 100%;
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1);
}
html.reveal-ready .reveal.in { opacity: 1; transform: none; }

/* Stagger children inside a revealed grid */
html.reveal-ready .reveal[data-d="1"] { transition-delay: .07s; }
html.reveal-ready .reveal[data-d="2"] { transition-delay: .14s; }
html.reveal-ready .reveal[data-d="3"] { transition-delay: .21s; }
html.reveal-ready .reveal[data-d="4"] { transition-delay: .28s; }
html.reveal-ready .reveal[data-d="5"] { transition-delay: .35s; }

/* ---------- Sticky CTA bar ---------------------------------------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(14,26,51,.94);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid rgba(255,255,255,.12);
  transform: translateY(110%);
  transition: transform .38s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -8px 30px rgba(14,21,38,.22);
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .wrap {
  display: flex; align-items: center; gap: 18px;
  padding-top: 13px; padding-bottom: 13px;
}
.sticky-cta .sc-text { color: #fff; font-size: .96rem; font-weight: 600; }
.sticky-cta .sc-sub { display: block; color: #9fb0d0; font-size: .82rem; font-weight: 400; margin-top: 2px; }
.sticky-cta .sc-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sticky-cta .sc-close {
  background: none; border: 0; color: #7d8db0; font-size: 1.35rem; line-height: 1;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.sticky-cta .sc-close:hover { color: #fff; background: rgba(255,255,255,.08); }
.sticky-cta .btn { white-space: nowrap; }
@media (max-width: 620px) {
  .sticky-cta .sc-text { font-size: .88rem; }
  .sticky-cta .sc-sub { display: none; }
  .sticky-cta .btn { padding: 11px 18px; font-size: .9rem; }
  .sticky-cta .wrap { gap: 10px; }
}
@media (max-width: 420px) {
  .sticky-cta .wrap { padding-top: 10px; padding-bottom: 10px; }
  .sticky-cta .sc-text { font-size: .82rem; line-height: 1.3; }
  .sticky-cta .btn { padding: 10px 14px; }
  .sticky-cta .sc-close { padding: 0; min-width: 40px; min-height: 40px; }
}

/* ---------- Motion + capability guards ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-card { animation: none; }
  .quote-box::before, .cta-band::before, .article-cta::before { animation: none; }
  html.reveal-ready .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .tilt, .hero-card { transform: none !important; transition: none; }
  .sticky-cta { transition: none; }
}
/* Touch devices: no pointer tilt, and hover lifts would stick after a tap. */
@media (hover: none) {
  .tilt { transform: none !important; }
  .card.lift:hover { transform: none; box-shadow: var(--shadow); }
  .iso .card:hover { transform: none; }
}

/* Narrow viewports: the haze gradient is tuned for a two-column hero, so on
   one column it leaves the copy sitting directly on the node field. Cover the
   full width and pull the canvas back a little. */
@media (max-width: 860px) {
  #constellation { opacity: .55; }
  .hero::after {
    background: linear-gradient(180deg, rgba(14,26,51,.55), rgba(14,26,51,.78) 45%, rgba(14,26,51,.9));
  }
}

/* ---------- Client portfolio cards --------------------------------------- */
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pf-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem; color: var(--muted); letter-spacing: .04em;
}
.pf-status { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.pf-open { background: #e3f5ee; color: var(--green); }
.pf-engaged { background: #f0f1f4; color: var(--muted); }
.pf-meta { list-style: none; margin: 14px 0 0; padding: 0; }
.pf-meta li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pf-meta li:last-child { border-bottom: 0; }
.pf-meta span { color: var(--muted); }
.pf-meta strong { font-weight: 650; text-align: right; }
.pf-filters { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.pf-filters select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .92rem; background: #fff; }

/* ---------- Portfolio inventory summary ---------------------------------- */
.pf-summary {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.pf-totals { display: flex; gap: 34px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pf-total b { display: block; font-size: 1.9rem; line-height: 1.05; letter-spacing: -.03em; }
.pf-total span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.pf-total-open b { color: var(--green); }

.pf-breakdown { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 18px; }
.pf-bd-label {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-right: 6px;
}
.pf-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: .87rem; font-weight: 600;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.pf-pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.pf-pill em {
  font-style: normal; font-weight: 700; font-size: .8rem;
  background: var(--bg-soft); color: var(--muted); padding: 2px 7px; border-radius: 999px;
}
.pf-pill.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-pill.is-on em { background: rgba(255,255,255,.22); color: #fff; }
.pf-bd-note { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }

.pf-showing { font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.pf-showing a { margin-left: 10px; }

@media (max-width: 560px) {
  .pf-totals { gap: 22px; }
  .pf-total b { font-size: 1.5rem; }
  .pf-summary { padding: 20px; }
  /* Compact pills so several share a row and the first profile sits higher. */
  .pf-breakdown { gap: 6px; padding-top: 14px; }
  .pf-bd-label { flex-basis: 100%; margin: 0 0 2px; }
  .pf-pill { padding: 5px 10px; font-size: .8rem; gap: 5px; }
  .pf-pill em { font-size: .72rem; padding: 1px 6px; }
  .pf-bd-note { margin-top: 10px; }
  /* Review link: shorter notices above the profile grid on phones. */
  .notice:has(+ .grid .rv-card),
  .notice:has(+ .notice + .grid .rv-card) { padding: 12px 14px; font-size: .88rem; line-height: 1.5; margin-bottom: 16px !important; }
  .notice:has(+ .grid .rv-card) h3 { font-size: .92rem; margin-bottom: 4px; }
}

/* ---------- Client review cards ------------------------------------------ */
.rv-card { display: flex; flex-direction: column; }
.rv-card .pf-meta { flex: 1; }
.rv-link { margin-top: 18px; width: 100%; text-align: center; }
.rv-request { margin-top: 10px; width: 100%; }
/* Confirmed request: a readable success state. Class-based on purpose, so the
   in-flight "Sending…" state (plain [disabled]) is not styled as success. */
.rv-request.is-requested,
.rv-request.is-requested[disabled] {
  opacity: 1; background: #e3f5ee; color: #0b5c43; border-color: #b9e3d3; box-shadow: none;
}
.rv-note { margin: 10px 0 0; text-align: center; }

/* Review card: role under the name, price called out */
.rv-role { font-size: .88rem; color: var(--muted); margin: -4px 0 4px; }
.rv-price { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px !important; }
.rv-price strong { font-size: 1.12rem; color: var(--ink); }
.rv-price .rv-per { font-size: .8rem; font-weight: 400; color: var(--muted); }

/* ---------- 404 page ----------------------------------------------------- */
.nf { padding: 52px 0 76px; }
.nf-link { display: block; color: inherit; }
.nf-link:hover { text-decoration: none; border-color: #cfd9ec; box-shadow: var(--shadow-lg); }
.nf-link h2 { font-size: 1.18rem; color: var(--accent-ink); margin-bottom: 6px; }
.nf-link p { color: var(--muted); font-size: .95rem; }
