/* ============================================================
   CHESTER STUDIO :: /wordpress/
   Same tokens as the main site. Pure CSS, no build step.
   ============================================================ */
:root {
  --bg: #050507;
  --bg-2: #0a0a0f;
  --surface: #0e0e14;
  --surface-2: #13131b;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f5f6f8;
  --text-2: #9ba0ab;
  --text-3: #6b7078;
  --gold: #e9b44c;
  --gold-soft: rgba(233, 180, 76, .14);
  --yellow: #ffd43b;
  --ok: #34d399;
  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: rgba(233, 180, 76, .4); color: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--font-mono); font-size: .86em; padding: .1em .35em; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--gold); color: #000; border-radius: 8px; }
.skip:focus { left: 12px; }

/* ---------- Buttons, kicker */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #0b0b0d; }
.btn--gold:hover { background: var(--yellow); }
.btn--ghost { border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.kicker { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.kicker i { width: 22px; height: 1px; background: currentColor; }

/* ---------- Top bar */
.top { position: sticky; top: 0; z-index: 40; background: rgba(5, 5, 7, .78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--border); }
.top__in { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand svg { width: 34px; height: 34px; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; }
.brand small { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .3em; color: var(--text-2); text-transform: uppercase; margin-top: 3px; }
.top__nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: .9rem; color: var(--text-2); }
.top__nav a:hover { color: var(--text); }
@media (max-width: 760px) { .top__nav { display: none; } .top .btn { margin-left: auto; } }

/* ---------- Frames: browser and phone */
.frame { position: relative; margin: 0; overflow: hidden; background: #f5f0e8; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--border-strong); cursor: zoom-in; }
.frame--browser { border-radius: 14px; }
.frame__bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #16161d; }
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c2c36; }
.frame__bar em { margin-left: 10px; padding: 2px 12px; border-radius: 6px; background: #0e0e14; font: .7rem var(--font-mono); font-style: normal; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame--phone { border-radius: 34px; border: 8px solid #16161d; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--border-strong); }
.frame--phone img { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

/* ---------- Hero */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; background: radial-gradient(closest-side, rgba(233, 180, 76, .12), transparent); pointer-events: none; }
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -.01em; text-transform: uppercase; }
.hero h1 span { background: linear-gradient(100deg, #f2cf6b, #e9b44c 45%, #c98f2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { max-width: 34rem; margin-top: 1.4rem; font-size: 1.12rem; color: var(--text-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero__note { display: flex; align-items: center; gap: .6rem; margin-top: 1.4rem; font-size: .85rem; color: var(--text-3); }
.hero__note b { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .15); }
.hero__art { position: relative; padding: 0 0 3.5rem 0; }
.hero__desk { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }
.hero__phone { position: absolute; right: -2%; bottom: 0; width: 28%; }
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__desk { transform: none; }
  .hero__phone { width: 30%; right: 3%; }
}

.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-top: clamp(2.5rem, 5vw, 4rem); list-style: none; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.facts li { display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem 1.3rem; background: var(--bg-2); }
.facts b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--gold); }
.facts span { font-size: .82rem; color: var(--text-2); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts li:last-child { grid-column: 1 / -1; } }

/* ---------- Sections */
.sec { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.sec--panel { background: var(--bg-2); border-block: 1px solid var(--border); }
.sec__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec__head--center { margin-inline: auto; text-align: center; }
.sec h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.02; text-transform: uppercase; letter-spacing: .005em; }
.sec__lede { margin-top: 1.1rem; font-size: 1.08rem; color: var(--text-2); }

/* ---------- Feature rows */
.feat { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feat + .feat { margin-top: clamp(4rem, 8vw, 6.5rem); }
.feat--flip .feat__media { order: 2; }
.feat__n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); margin-bottom: .8rem; }
.feat h3, .phones h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.1; text-transform: uppercase; margin-bottom: 1rem; }
.feat p, .phones p { color: var(--text-2); }
.ticks { list-style: none; margin-top: 1.4rem; display: grid; gap: .55rem; font-size: .92rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .75rem; height: .4rem; border: solid var(--gold); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr; } .feat--flip .feat__media { order: 0; } }

.phones { display: grid; grid-template-columns: 230px 230px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; margin-top: clamp(4rem, 8vw, 6.5rem); }
.phones .frame:nth-child(2) { transform: translateY(2.5rem); }
@media (max-width: 900px) { .phones { grid-template-columns: 1fr 1fr; } .phones__copy { grid-column: 1 / -1; } .phones .frame:nth-child(2) { transform: none; } }

/* ---------- Transfer Pay flow */
.flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.6rem; list-style: none; counter-reset: s; }
.flow li { counter-increment: s; display: flex; flex-direction: column; gap: .9rem; }
.flow .frame { aspect-ratio: 16 / 10; }
.flow .frame img { width: 100%; height: 100%; object-fit: contain; padding: 4%; }
.flow li:last-child .frame img { padding: 0; object-fit: cover; object-position: top left; }
.flow b { display: flex; align-items: baseline; gap: .55rem; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; text-transform: uppercase; }
.flow b::before { content: "0" counter(s); font-family: var(--font-mono); font-size: .75rem; color: var(--gold); }
.flow span { font-size: .9rem; color: var(--text-2); }
.flow__who { display: inline-block; margin-right: .4rem; padding: .1rem .5rem; border-radius: 999px; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; color: var(--text-2); border: 1px solid var(--border-strong); vertical-align: 2px; }
@media (max-width: 700px) { .flow { grid-template-columns: 1fr; } }
.mails { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-top: clamp(3rem, 6vw, 4.5rem); }
.mails h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; text-transform: uppercase; margin-bottom: .8rem; }
.mails p { color: var(--text-2); font-size: .95rem; }
.mails__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.mails__list li { display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; color: var(--text-2); }
.frame--mail { border-radius: 12px; aspect-ratio: 3 / 4; background: #fff; }
.frame--mail img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 900px) { .mails { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .mails__list { grid-template-columns: 1fr 1fr; } }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.card h4 { font-size: 1rem; margin-bottom: .5rem; }
.card p { font-size: .92rem; color: var(--text-2); }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } }

/* ---------- Code */
.code { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: #08080c; }
.code__tabs { display: flex; gap: 2px; padding: .5rem .5rem 0; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
.code__tab { padding: .6rem 1rem; border-radius: 10px 10px 0 0; font: .8rem var(--font-mono); color: var(--text-3); white-space: nowrap; }
.code__tab[aria-selected="true"] { background: #08080c; color: var(--text); }
.code__note { padding: 1rem 1.25rem 0; font-size: .88rem; color: var(--text-2); }
.code pre { margin: 0; padding: 1rem 1.25rem 1.4rem; overflow-x: auto; font: .82rem/1.65 var(--font-mono); color: #d6d8de; tab-size: 4; }
.code .c { color: #6b7078; font-style: italic; }
.code .k { color: #e9b44c; }
.code .s { color: #8fd4a9; }
.code .f { color: #7cc4ff; }
.under { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; list-style: none; }
.under li { padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; color: var(--text-2); }
.under li::before { content: "✓"; margin-right: .45rem; color: var(--ok); }

/* ---------- Versus */
.vs { max-width: 980px; margin-inline: auto; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vs__row { display: grid; grid-template-columns: 1fr 1.5fr 1.5fr; }
.vs__row + .vs__row { border-top: 1px solid var(--border); }
.vs__row > span { padding: 1rem 1.25rem; font-size: .93rem; }
.vs__row > span:first-child { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); align-self: center; }
.vs__row > span:nth-child(2) { color: var(--text-2); }
.vs__row > span:nth-child(3) { background: var(--gold-soft); }
.vs__row--head > span { font-weight: 600; font-size: .85rem; }
.vs__row--head > span:nth-child(3) { color: var(--gold); }
@media (max-width: 680px) {
  .vs__row { grid-template-columns: 1fr 1fr; }
  .vs__row > span:first-child { grid-column: 1 / -1; padding-bottom: 0; }
  .vs__row--head > span:first-child { display: none; }
}

/* ---------- Services */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.svc article { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .3s, transform .3s var(--ease); }
.svc article:hover { border-color: rgba(233, 180, 76, .45); transform: translateY(-3px); }
.svc span { font-family: var(--font-mono); font-size: .72rem; color: var(--gold); }
.svc h3 { margin: .6rem 0 .4rem; font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; text-transform: uppercase; }
.svc p { font-size: .92rem; color: var(--text-2); }
@media (max-width: 900px) { .svc { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(2.5rem, 5vw, 3.5rem); list-style: none; counter-reset: st; }
.steps li { counter-increment: st; padding: 1.2rem 1.2rem 0 0; border-top: 1px solid var(--border-strong); }
.steps li::before { content: "0" counter(st); display: block; font-family: var(--font-mono); font-size: .72rem; color: var(--gold); margin-bottom: .6rem; }
.steps b { display: block; font-size: 1rem; }
.steps span { font-size: .88rem; color: var(--text-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; } }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; list-style: none; }
.chips li { padding: .4rem .85rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font: .78rem var(--font-mono); color: var(--text-2); }

/* ---------- CTA, footer */
.cta { text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(233, 180, 76, .12), transparent); }
.cta__in { max-width: 760px; }
.cta .kicker { justify-content: center; }
.cta__btns { justify-content: center; }
.cta__small { margin-top: 1.2rem; font-size: .82rem; color: var(--text-3); }
.foot { border-top: 1px solid var(--border); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem 0; font-size: .85rem; color: var(--text-3); }
.foot a:hover { color: var(--gold); }

/* ---------- Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4vw; background: rgba(5, 5, 7, .92); backdrop-filter: blur(6px); }
.lb[hidden] { display: none; }
.lb img { max-height: 92vh; width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lb__x { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; background: var(--surface-2); }

/* ---------- Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__desk { transform: none; }
}
.hero__art .frame { cursor: default; }
.facts li[hidden] { display: none; }

/* ---------- Care plan */
.care { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.care__copy .btn { margin-top: 1.8rem; }
.care__month { list-style: none; display: grid; gap: .8rem; position: relative; }
.care__month li { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.care__month li::before { content: ""; position: absolute; left: -7px; top: 1.45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .15); }
.care__month b { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gold); }
.care__month span { font-size: .92rem; color: var(--text-2); }
@media (max-width: 900px) { .care { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .care__month li { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Client stores (NDA): blurred stand-ins + case study */
.nda { display: grid; gap: clamp(4rem, 8vw, 6rem); }
.case { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.case:nth-child(even) .case__media { order: 2; }
.case__media { position: relative; padding-bottom: 2.5rem; }
.case__desk, .case__phone { margin: 0; overflow: hidden; background: #ddd; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .85), 0 0 0 1px var(--border-strong); }
.case__desk { border-radius: 14px; }
.case__desk img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.case__phone { position: absolute; right: -3%; bottom: 0; width: 24%; border-radius: 26px; border: 6px solid #16161d; }
.case__phone img { width: 100%; aspect-ratio: 390 / 760; object-fit: cover; object-position: top; }
.case:nth-child(even) .case__phone { right: auto; left: -3%; }
.case h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.1; text-transform: uppercase; }
.case__where { margin-top: .3rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.case__job { margin-top: 1rem; color: var(--text-2); }
.case__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.case__cols b { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.case__cols .ticks { margin-top: .7rem; font-size: .88rem; color: var(--text-2); }
.case__cols .ticks li::before { border-color: var(--acc); }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } .case:nth-child(even) .case__media { order: 0; } .case:nth-child(even) .case__phone { left: auto; right: -2%; } }
@media (max-width: 520px) { .case__cols { grid-template-columns: 1fr; } .case__phone { width: 30%; } }
