/* ============================================================
   Webrivio — Premium Website Agency
   Shared stylesheet. Editorial / cinematic / midnight-blue.
   ============================================================ */

:root {
  --bg:            #050B18;
  --bg-soft:       #0A1426;
  --surface:       #0E1B33;
  --surface-2:     #132444;
  --border:        rgba(123,164,255,0.14);
  --border-strong: rgba(123,164,255,0.32);

  --ink:           #EEF3FC;
  --ink-soft:      #C2CEE4;
  --mute:          #7E8EA9;
  --mute-2:        #56658A;

  --accent:        #4D7EFF;
  --accent-glow:   #7BA4FF;
  --accent-deep:   #1E3F99;
  --cyan:          #7FE3FF;

  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Geist', 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --container: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  min-height: 100vh;
}

/* skip link — a11y */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 8px 0;
  z-index: 500;
}
.skip-link:focus { left: 0; }

/* focus-visible */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }

/* ensure no content shift from custom fonts */
html { font-size-adjust: 0.5; }

/* grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/></svg>");
}

/* ambient gradient wash */
body::after {
  content: '';
  position: fixed;
  top: -20vh; left: -10vw;
  width: 120vw; height: 80vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 40% at 30% 20%, rgba(77,126,255,0.12), transparent 70%),
    radial-gradient(50% 60% at 80% 10%, rgba(127,227,255,0.05), transparent 70%);
  filter: blur(20px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: white; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

/* ---------- Type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.display .it { font-style: italic; }

h1.display { font-size: clamp(64px, 11vw, 188px); }
h2.display { font-size: clamp(44px, 7vw, 112px); }
h3.display { font-size: clamp(32px, 4.2vw, 64px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 58ch;
  letter-spacing: -0.01em;
}

.tiny-mono {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .4s var(--ease-out), background .3s, color .3s, border-color .3s;
  will-change: transform;
  position: relative;
  cursor: pointer;
  line-height: 1;
}
.btn .arrow {
  width: 18px; height: 10px;
  transition: transform .4s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(6px); }

.btn-primary {
  background: linear-gradient(180deg, #5A8BFF 0%, #3E6EEF 100%);
  color: white;
  box-shadow: 0 10px 40px -10px rgba(77,126,255,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(123,164,255,0.08); border-color: var(--accent-glow); }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 24px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 10px 12px 10px 22px;
  background: rgba(10,20,38,0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.nav-brand {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  transition: opacity .3s;
}
.nav-brand:hover { opacity: 0.85; }
.nav-brand .mark {
  width: 26px; height: 20px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(123,164,255,0.3));
  flex-shrink: 0;
}
.nav-brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-glow);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 2.4s infinite var(--ease);
  display: none; /* replaced by mark */
}
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; transform: scale(1.25); } }

/* mobile nav toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: border-color .3s;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .4s var(--ease-out), opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }

/* mobile nav drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(5,11,24,0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 100px var(--gutter) 60px;
  gap: 8px;
}
.nav-drawer.open { opacity: 1; pointer-events: auto; }
.nav-drawer a {
  font-family: var(--serif);
  font-size: clamp(36px, 8vw, 68px);
  font-style: italic;
  line-height: 1.1;
  color: var(--ink);
  transition: color .3s, transform .3s var(--ease-out);
  display: block;
  text-align: center;
  padding: 6px 12px;
}
.nav-drawer a:hover, .nav-drawer a:focus-visible { color: var(--accent-glow); transform: translateX(4px); }
.nav-drawer .drawer-cta {
  margin-top: 40px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 14px;
  background: linear-gradient(180deg, #5A8BFF 0%, #3E6EEF 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 999px;
}
.nav-drawer .drawer-meta {
  position: absolute;
  bottom: 40px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--mute);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color .2s;
}
.nav-links a::after {
  content:'';
  position: absolute; left: 50%; bottom: 2px;
  width: 0; height: 1px;
  background: var(--accent-glow);
  transition: width .3s var(--ease-out), left .3s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; left: 0; }
.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .3s var(--ease-out), background .3s;
}
.nav-cta:hover { background: var(--accent-glow); transform: translateY(-1px); }

/* progress bar */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  z-index: 300;
  transition: width .08s linear;
}

/* custom cursor */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-glow);
  pointer-events: none;
  z-index: 400;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease-out), height .25s var(--ease-out), background .25s;
  display: none;
}
@media (pointer: fine) { .cursor { display: block; } }
.cursor.hover { width: 46px; height: 46px; background: rgba(123,164,255,0.25); }

/* ---------- Sections ---------- */
section { position: relative; z-index: 1; }
.section-pad { padding: clamp(96px, 14vh, 180px) 0; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 48px;
}
.section-label .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-glow);
  letter-spacing: 0.1em;
}
.section-label .kind {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--mute);
}
.section-label .kind::before {
  content: '—— ';
  color: var(--mute-2);
  margin-right: 6px;
}

/* reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* generous bottom padding for italic descenders; compensated by negative margin so layout is unaffected */
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
  line-height: inherit;
}
.reveal-mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}
.reveal-mask.in > span { transform: translateY(0); }
/* after the slide-up completes, release the clip so italic descenders aren't cut off */
.reveal-mask.done { overflow: visible; }

/* no-JS fallback — show everything if JS never marks .js */
html:not(.js) .reveal,
html:not(.js) .reveal-mask > span {
  opacity: 1 !important;
  transform: none !important;
}
html:not(.js) .reveal-mask { overflow: visible; }
html:not(.js) .cursor,
html:not(.js) .progress { display: none; }

/* cursor starts hidden until first mousemove to avoid stacking in corner */
.cursor { opacity: 0; transition: opacity .3s, width .25s var(--ease-out), height .25s var(--ease-out), background .25s; }

/* ---------- HERO (home) ---------- */
.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.hero-meta {
  position: absolute;
  top: 140px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.hero-meta .tiny-mono { max-width: 280px; line-height: 1.6; }
.hero-headline {
  margin-bottom: 60px;
}
.hero-headline h1 {
  font-family: var(--serif);
  font-size: clamp(70px, 14vw, 240px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  font-weight: 400;
}
.hero-headline .line { display: block; overflow: hidden; }
.hero-headline .line > span { display: inline-block; }
.hero-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: end;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.hero-footer .lede { max-width: 52ch; }
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-orb {
  position: absolute;
  right: -10%; top: 20%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(127,227,255,0.35), rgba(77,126,255,0.25) 40%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  animation: drift 18s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-40px, 40px) scale(1.1); }
}

/* ---------- Marquee ticker ---------- */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(127,227,255,0.03), transparent);
}
.ticker-track {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: slide 40s linear infinite;
  width: max-content;
}
.ticker-item {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 56px);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 80px;
}
.ticker-item .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Problem / Outcome ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.split-heading {
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.split-heading .bad { color: var(--mute-2); text-decoration: line-through; text-decoration-color: rgba(123,164,255,0.25); text-decoration-thickness: 2px; }
.split-heading .good { color: var(--ink); font-style: italic; }

.bullet-list { display: flex; flex-direction: column; gap: 28px; }
.bullet {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.bullet-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-glow);
  padding-top: 8px;
}
.bullet h4 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 6px; }
.bullet p { color: var(--mute); font-size: 15px; }

/* ---------- Services cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.service-card {
  grid-column: span 4;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .4s, transform .5s var(--ease-out);
}
.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}
.service-card.wide { grid-column: span 6; }
.service-card.tall { grid-column: span 6; min-height: 420px; }
.service-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 80%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(77,126,255,0.2), transparent 70%);
  opacity: 0;
  transition: opacity .6s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card h3 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.service-card h3 .it { font-style: italic; color: var(--accent-glow); }
.service-card p { color: var(--mute); font-size: 15px; max-width: 36ch; }
.service-card .service-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-glow);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.service-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- Process ---------- */
.process-steps {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.process-step {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 160px;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background .4s;
}
.process-step:hover {
  background: linear-gradient(90deg, transparent, rgba(77,126,255,0.04) 30%, rgba(77,126,255,0.04) 70%, transparent);
}
.process-step .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-glow);
  letter-spacing: 0.1em;
}
.process-step .title {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.process-step .title .it { font-style: italic; color: var(--accent-glow); }
.process-step .desc {
  color: var(--mute);
  font-size: 15px;
  max-width: 42ch;
}
.process-step .dur {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Portfolio ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.work-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .6s var(--ease-out);
}
.work-card:hover { transform: translateY(-6px); }
.work-card.tall { aspect-ratio: 3/4; }
.work-visual {
  position: absolute;
  inset: 0;
  transition: transform 1.2s var(--ease-out);
}
.work-card:hover .work-visual { transform: scale(1.05); }
.work-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
  background: linear-gradient(180deg, transparent 0%, rgba(5,11,24,0.9) 100%);
}
.work-meta h4 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.work-meta h4 .it { font-style: italic; color: var(--accent-glow); }
.work-meta .industry {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mute);
}
.work-meta .arrow-wrap {
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, border-color .3s, transform .4s var(--ease-out);
}
.work-card:hover .arrow-wrap {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(-45deg);
}

/* site visual (fake browser) */
.site-visual {
  position: absolute; inset: 0;
  background: var(--surface);
  overflow: hidden;
}
.site-chrome {
  position: absolute; top: 0; left: 0; right: 0; height: 28px;
  background: rgba(13,26,47,0.9);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  z-index: 2;
}
.site-chrome i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(123,164,255,0.2);
}
.site-body {
  position: absolute;
  top: 28px; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
}
.site-hero {
  flex: 1;
  border-radius: 8px;
  padding: 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}
.site-hero::after {
  content:''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.18), transparent 60%);
}
.site-hero h5 {
  font-family: var(--serif);
  font-size: 24px; line-height: 1; color: white;
  position: relative; z-index: 1;
}
.site-hero p {
  font-size: 10px; color: rgba(255,255,255,0.7);
  margin-top: 4px;
  position: relative; z-index: 1;
}
.site-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  height: 60px;
}
.site-grid > div { background: rgba(123,164,255,0.08); border-radius: 4px; }

/* color variants for visuals */
.v-roof .site-hero { background: linear-gradient(135deg, #1a3a2a, #0e2d1e); }
.v-roof .site-hero h5 { color: #9FE9B8; font-style: italic; }

.v-dental .site-hero { background: linear-gradient(135deg, #FDFBF5, #EFE7D6); }
.v-dental .site-hero h5, .v-dental .site-hero p { color: #1a1a1a; }
.v-dental .site-hero h5 { font-style: italic; }

.v-landscape .site-hero { background: linear-gradient(135deg, #2d5a3d, #1b4028); }
.v-landscape .site-hero h5 { color: #E8F5D0; }

.v-medspa .site-hero { background: linear-gradient(135deg, #E8D4D8, #C9A4AC); }
.v-medspa .site-hero h5 { color: #2A1820; font-style: italic; font-weight: 500; }
.v-medspa .site-hero p { color: rgba(42,24,32,0.7); }

.v-contractor .site-hero { background: linear-gradient(135deg, #1E2B47, #0A1426); }
.v-contractor .site-hero h5 { color: var(--cyan); }

.v-auto .site-hero { background: linear-gradient(135deg, #3A1F14, #1A0E08); }
.v-auto .site-hero h5 { color: #F4C89F; font-style: italic; }

/* ---------- Why / Stats ---------- */
.why-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat-cell {
  background: var(--bg);
  padding: 36px 28px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat-cell .big {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-cell .big .sub { font-size: 0.55em; color: var(--accent-glow); margin-left: 4px; }
.stat-cell .label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  margin-top: 10px;
}

/* ---------- CTA ---------- */
.cta-block {
  border-radius: var(--r-xl);
  padding: clamp(60px, 8vw, 120px) clamp(40px, 6vw, 100px);
  background:
    radial-gradient(ellipse at top right, rgba(127,227,255,0.2), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(77,126,255,0.3), transparent 60%),
    linear-gradient(135deg, #0D1E45 0%, #0A1426 100%);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123,164,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,164,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
  pointer-events: none;
}
.cta-block > * { position: relative; z-index: 1; }
.cta-block h2 {
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.cta-block h2 .it { font-style: italic; color: var(--accent-glow); }
.cta-block .lede { margin: 0 auto 40px; text-align: center; }
.cta-actions { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Brand row ---------- */
.foot-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.foot-brand-row .mark { width: 32px; height: 24px; }
.foot-brand-row .wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  letter-spacing: -0.02em;
}

/* FAQ details styling */
details { outline: none; }
details summary { list-style: none; outline: none; }
details summary::-webkit-details-marker { display: none; }
details summary { position: relative; padding-right: 30px; transition: color .3s; }
details summary::after {
  content: '+';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent-glow);
  transition: transform .3s var(--ease-out);
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details[open] summary { color: var(--accent-glow); }

/* ---------- Footer ---------- */
footer {
  margin-top: 120px;
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  position: relative;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}
.foot-grid h5 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--mute);
  margin-bottom: 20px;
}
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { color: var(--ink-soft); font-size: 15px; transition: color .2s; }
.foot-grid a:hover { color: var(--accent-glow); }
.foot-big {
  font-family: var(--serif);
  font-size: clamp(60px, 12vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding-top: 40px;
  border-top: 1px solid var(--border);
  word-break: break-all;
  overflow: hidden;
}
.foot-big .it { font-style: italic; color: var(--accent-glow); }
.foot-bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page Header (non-home) ---------- */
.page-head {
  padding: 180px 0 100px;
  position: relative;
  overflow: hidden;
}
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 20px 0 40px;
}
.page-head h1 .it { font-style: italic; color: var(--accent-glow); }
.page-head .lede { max-width: 52ch; }
.page-head-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 60px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 30px;
}
.page-head-meta div { display: flex; flex-direction: column; gap: 6px; }
.page-head-meta .v {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
}

/* ---------- Services page ---------- */
.service-row {
  display: grid;
  grid-template-columns: 120px 1fr 1.2fr;
  gap: 60px;
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.service-row:first-child { border-top: 1px solid var(--border); }
.service-row .num { font-family: var(--mono); font-size: 13px; color: var(--accent-glow); letter-spacing: 0.14em; padding-top: 14px; }
.service-row h3 {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.service-row h3 .it { font-style: italic; color: var(--accent-glow); }
.service-row .content { padding-top: 18px; display: flex; flex-direction: column; gap: 24px; }
.service-row .content p { color: var(--ink-soft); font-size: 17px; }
.service-row .incl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 30px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.service-row .incl div {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.service-row .incl div::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent-glow); border-radius: 50%;
}

.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.pkg {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 32px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 20px;
  position: relative;
  transition: border-color .3s, transform .5s var(--ease-out);
}
.pkg:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.pkg.feature {
  background: linear-gradient(180deg, #0F2147 0%, #0A1426 100%);
  border-color: var(--accent);
}
.pkg-name {
  font-family: var(--serif);
  font-size: 36px;
  font-style: italic;
  line-height: 1;
}
.pkg-price {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.pkg-price .s { font-size: 20px; color: var(--mute); font-style: italic; margin-left: 6px; }
.pkg-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pkg-list li {
  color: var(--ink-soft);
  font-size: 14px;
  padding-left: 22px;
  position: relative;
}
.pkg-list li::before {
  content: '↳';
  position: absolute; left: 0; top: 0;
  color: var(--accent-glow);
}
.pkg-list li.muted { color: var(--mute-2); text-decoration: line-through; text-decoration-color: rgba(123,164,255,0.2); }
.pkg-list li.muted::before { color: var(--mute-2); }
.pkg .btn { width: 100%; justify-content: center; }

/* ---------- Process page ---------- */
.phase {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  padding: 80px 0;
  border-top: 1px solid var(--border);
  align-items: start;
  position: relative;
}
.phase-left { position: sticky; top: 140px; }
.phase-num {
  font-family: var(--serif);
  font-size: clamp(120px, 18vw, 280px);
  line-height: 0.85;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.04em;
  opacity: 0.9;
}
.phase-title {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 0.95;
  margin-top: 12px;
}
.phase-title .it { font-style: italic; color: var(--accent-glow); }
.phase-dur {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  margin-top: 20px;
}
.phase-right { display: flex; flex-direction: column; gap: 30px; padding-top: 40px; }
.phase-desc { font-size: 20px; color: var(--ink-soft); line-height: 1.45; max-width: 50ch; }
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
}
.phase-card .k {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-glow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 4px;
}
.phase-card h5 { font-size: 16px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.005em; }
.phase-card p { color: var(--mute); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Panel that makes it unmistakably a form */
.form-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(19,36,68,0.6) 0%, rgba(10,20,38,0.85) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: clamp(28px, 3.6vw, 52px);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow:
    0 30px 80px -40px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 85% 0%, rgba(127,227,255,0.10), transparent 60%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(77,126,255,0.08), transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}
.form-panel > * { position: relative; z-index: 1; }

.form-header {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.form-header .form-title {
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.form-header .form-title .it { font-style: italic; color: var(--accent-glow); }
.form-header .form-sub { color: var(--mute); font-size: 14px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
}
.field label .req { color: var(--accent-glow); }
.field label .opt { color: var(--mute-2); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }

.field input, .field textarea, .field select {
  background: rgba(5,11,24,0.55);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 15px 18px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  transition: border-color .25s, background .25s, box-shadow .25s;
  outline: none;
  width: 100%;
  letter-spacing: -0.005em;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--mute-2);
}
.field input:hover, .field textarea:hover, .field select:hover {
  border-color: rgba(123,164,255,0.28);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent-glow);
  background: rgba(5,11,24,0.8);
  box-shadow: 0 0 0 3px rgba(123,164,255,0.12);
}
.field textarea { resize: vertical; min-height: 130px; font-family: var(--sans); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px 16px;
  background: rgba(5,11,24,0.35);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .25s;
  user-select: none;
  line-height: 1;
}
.chip:hover { border-color: var(--border-strong); color: var(--ink); background: rgba(77,126,255,0.08); }
.chip.active {
  background: linear-gradient(180deg, #5A8BFF 0%, #3E6EEF 100%);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 6px 20px -6px rgba(77,126,255,0.5);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.form-footer .reassurance {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute-2);
  display: flex; align-items: center; gap: 10px;
}
.form-footer .reassurance::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-glow);
  box-shadow: 0 0 10px var(--accent);
}

/* Sidebar (simplified, no FAQ) */
.contact-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 120px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color .3s;
}
.side-card:hover { border-color: var(--border-strong); }
.side-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.contact-info { display: flex; flex-direction: column; gap: 2px; }
.contact-info a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  transition: color .3s, padding .3s;
}
.contact-info a:hover { color: var(--accent-glow); padding-left: 4px; }
.contact-info a:last-child { border-bottom: 1px solid var(--border); }
.contact-info .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--mute); }
.contact-info .v { font-family: var(--serif); font-size: 18px; color: var(--ink); text-align: right; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.avail-card {
  background: linear-gradient(180deg, #0F2147 0%, #0A1426 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.avail-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(123,164,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,164,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
  pointer-events: none;
}
.avail-card > * { position: relative; z-index: 1; }
.avail-card .pulse {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent-glow);
}
.avail-card .pulse::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-glow);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s infinite;
}
.avail-card .big {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  font-style: italic;
  margin: 14px 0 4px;
}
.avail-card .small {
  color: var(--mute);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.5;
}

/* FAQ section (moved below form) */
.faq-section { padding-top: 40px; }
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 80px;
  align-items: start;
}
.faq-list { display: flex; flex-direction: column; }
.faq-list details {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.faq-list details:last-child { border-bottom: 1px solid var(--border); }
.faq-list summary {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-list details p {
  color: var(--mute);
  font-size: 15px;
  margin-top: 12px;
  max-width: 62ch;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 32px; }
  .contact-side { position: static; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .field-row { grid-template-columns: 1fr; gap: 22px; }
  .form-footer { flex-direction: column; align-items: stretch; gap: 20px; }
  .form-footer .btn { width: 100%; justify-content: center; }
}

/* ---------- Portfolio page ---------- */
.filter-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(6, 1fr); }
  .service-card, .service-card.wide, .service-card.tall { grid-column: span 6; }
  .split, .why-wrap, .contact-wrap, .phase { grid-template-columns: 1fr; gap: 40px; }
  .phase-left { position: static; }
  .process-step { grid-template-columns: 60px 1fr; gap: 20px; padding: 32px 0; }
  .process-step .desc, .process-step .dur { grid-column: 2 / -1; }
  .process-step .dur { text-align: left; }
  .work-grid { grid-template-columns: 1fr; }
  .pkg-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
  .hero-footer { grid-template-columns: 1fr; text-align: left; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { gap: 12px; padding: 8px 8px 8px 18px; }
}

@media (max-width: 640px) {
  :root { --gutter: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .section-label { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-meta { top: 120px; }
  .hero { padding-top: 200px; }
  .page-head { padding: 150px 0 70px; }
  .case-study .case-stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .case-study .case-stats .n { font-size: 22px; }
  .cta-block { padding: 56px 24px; }
  .btn { padding: 16px 22px; font-size: 13px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; }
  .contact-side { position: static; }
  .phase-left { position: static; }
}

/* tablet tuning */
@media (min-width: 641px) and (max-width: 1024px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .why-wrap, .split, .contact-wrap, .phase { gap: 56px; }
  .page-head { padding: 150px 0 80px; }
}

/* print niceties (rare but cheap) */
@media print {
  .nav, .cursor, .progress, .ticker, footer { display: none; }
  body { background: white; color: black; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; }
}
