/*
Theme Name: Next Paige LLC
Theme URI: https://nextpaige.llc/
Author: Next Paige LLC
Description: Custom studio theme for Next Paige LLC — dark/light design system with client portal support.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: npd
Tags: custom-theme
*/

/* ============ TOKENS (brand: purple→blue gradient, navy ink) ============ */
:root {
  --bg: #0A0B12;
  --surface: #12131C;
  --surface-2: #181A26;
  --ink: #F2F3FA;
  --muted: #A9ABC4;
  --line: rgba(242, 243, 250, .12);
  --accent: #9B8CF7;
  --accent-ink: #FFFFFF;
  --accent-deep: #6D5BD0;
  --grad: linear-gradient(135deg, #7B2FBE 0%, #4A6FE0 100%);
  --shadow: 0 24px 60px -24px rgba(8, 9, 20, .65);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
[data-theme="light"] {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #EDF0F7;
  --ink: #1B1B3A;
  --muted: #5A5C72;
  --line: rgba(27, 27, 58, .14);
  --accent: #5B45D6;
  --accent-ink: #FFFFFF;
  --accent-deep: #4A3ABF;
  --grad: linear-gradient(135deg, #8B31C9 0%, #3E6FE0 100%);
  --shadow: 0 24px 60px -30px rgba(27, 27, 58, .18);
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 92vw); margin-inline: auto; }

/* ============ HEADER ============ */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo-mark { width: 34px; height: 34px; object-fit: contain; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .15s ease; }
.nav a:hover { color: var(--ink); }
.theme-toggle {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); font-family: var(--font-mono); font-size: 11px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.nav-cta {
  text-decoration: none; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.portal-link {
  text-decoration: none; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--ink); transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.portal-link:hover { border-color: var(--accent); }
.menu-btn { display: none; }

/* ============ HERO ============ */
.hero { padding: 96px 0 88px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px; align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  color: var(--muted); margin-bottom: 26px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: .98;
}
.hero h1 .em { font-style: normal; color: var(--accent); position: relative; white-space: pre; }
.hero-sub { margin-top: 26px; max-width: 52ch; font-size: 18px; line-height: 1.55; color: var(--muted); }
.hero-ctas { margin-top: 38px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { font-family: var(--font-mono); font-size: 13px; }

/* hero visual: abstract device */
.hero-visual { position: relative; }
.phone {
  width: 250px; aspect-ratio: 9 / 19;
  margin-inline: auto;
  border: 1.5px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px 14px;
  overflow: hidden;
}
.phone-notch { width: 64px; height: 5px; border-radius: 99px; background: var(--line); margin: 12px auto 22px; }
.phone-app {
  flex: 1; border-radius: 16px;
  background:
    radial-gradient(120% 70% at 20% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 18px;
}
.phone-app .badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  padding: 4px 10px; border-radius: 99px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.phone-app .name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.phone-chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.float-chip {
  position: absolute;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; padding: 8px 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.float-chip.left  { left: -18%; top: 32%; }
.float-chip.right { right: -14%; bottom: 26%; }
.float-chip b { color: var(--ink); font-weight: 600; }

/* ============ SECTION CHROME ============ */
section { padding: 88px 0; }
.sec-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  color: var(--accent); margin-bottom: 14px;
}
.sec-head { display: grid; grid-template-columns: minmax(0, 60%) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.03em; }
.sec-head .lede { color: var(--muted); font-size: 16px; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; width: min(1120px, 92vw); margin-inline: auto; }

/* ============ SERVICES (editorial rows) ============ */
.svc { list-style: none; margin: 0; padding: 0; counter-reset: svc 0; }
.svc-item {
  counter-increment: svc;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) minmax(0, .9fr);
  gap: 28px; align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.svc-item:last-child { border-bottom: 1px solid var(--line); }
.svc-num {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  letter-spacing: .16em; padding-top: 6px;
}
.svc-num::before { content: "0" counter(svc) " — "; color: var(--accent); }
.svc-title { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 10px; font-weight: 700; }
.svc-desc { color: var(--muted); font-size: 15.5px; max-width: 54ch; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  border: 1px solid var(--line); color: var(--muted);
  padding: 5px 11px; border-radius: 99px; white-space: nowrap;
}
.tag.solid { border-color: transparent; background: var(--surface-2); color: var(--ink); }

/* ============ APP LINE ============ */
.apps { background: var(--surface); border-block: 1px solid var(--line); }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.app-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
  min-height: 220px;
  transition: border-color .18s ease, transform .18s ease;
}
.app-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.app-head { display: flex; justify-content: space-between; align-items: center; }
.app-id { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.app-live {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 4px 10px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 7px;
}
.app-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-out infinite; }
.app-card h3 { font-size: 21px; letter-spacing: -0.02em; }
.app-blurb { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 34ch; }
.app-card .plat { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.app-wait {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 99px; padding: 10px 14px;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.app-wait:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.app-wait .arrow { font-size: 13px; }
.plat .tag { font-size: 11px; }
.apps-note {
  margin-top: 18px; text-align: center; color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
}

/* ============ PROCESS ============ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step 0; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px;
  padding: 26px 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .2em;
  color: var(--accent);
}
.step-body h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 8px; }
.step-body p { color: var(--muted); font-size: 15.5px; max-width: 62ch; }

/* ============ CTA / CONTACT ============ */
.cta { text-align: left; }
.cta-box {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(36px, 6vw, 64px);
}
.cta-box::before {
  content: ""; position: absolute; inset: -1px auto auto -1px;
  width: 100%; height: 4px; background: var(--grad);
}
.cta h2 { font-size: clamp(34px, 5.2vw, 60px); letter-spacing: -0.035em; max-width: 20ch; }
.cta p { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 56ch; }
.cta-actions { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mail-inline {
  font-family: var(--font-mono); font-size: 13px;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
}
.mail-inline:hover { color: var(--accent); }

.contact-form { margin-top: 34px; display: grid; gap: 16px; max-width: 560px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: grid; gap: 7px; }
.cf-field label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.cf-field input, .cf-field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; width: 100%;
  transition: border-color .15s ease;
}
.cf-field textarea { resize: vertical; min-height: 96px; }
.cf-field input:focus, .cf-field textarea:focus { border-color: var(--accent); }
.cf-field input::placeholder, .cf-field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, var(--bg));
}
.cf-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cf-hint { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ============ GENERIC PAGE (about etc.) ============ */
.page-hero { padding: 84px 0 40px; }
.page-hero h1 { font-size: clamp(36px, 5.6vw, 64px); letter-spacing: -0.035em; max-width: 22ch; }
.page-hero .lede { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 60ch; line-height: 1.55; }
.prose { max-width: 72ch; padding-bottom: 96px; }
.prose p { margin-bottom: 1.2em; color: var(--muted); font-size: 16.5px; }
.prose h2 { font-size: 26px; margin: 40px 0 14px; letter-spacing: -0.02em; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; }
.foot-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: baseline; }
.foot-row .small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.foot-row nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-row nav a { font-size: 13px; color: var(--muted); text-decoration: none; }
.foot-row nav a:hover { color: var(--ink); }

/* ============ MOBILE MENU ============ */
.menu-panel { display: none; }

/* ============ REVEAL (JS-only motion) ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .pulse, .app-live .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* Phone mockup reads poorly stacked on narrow screens — hide it, text-first hero. */
  .hero-visual { display: none; }
  .float-chip.left { left: 0; }
  .float-chip.right { right: 0; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  .svc-item { grid-template-columns: 56px 1fr; }
  .svc-tags { grid-column: 2; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .app-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid var(--line); border-radius: 99px;
    color: var(--ink); font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer;
  }
  .menu-panel {
    display: none; flex-direction: column; gap: 4px;
    padding: 14px 4vw 18px; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
  }
  .menu-panel a { padding: 12px 4px; font-size: 16px; text-decoration: none; border-bottom: 1px solid var(--line); }
  .menu-panel a:last-child { border-bottom: 0; }
  .menu-panel.open { display: flex; }
  section { padding: 62px 0; }
  .hero { padding: 60px 0 64px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card:last-child { grid-column: auto; }
}
