/* Apptive Labs — shared design system for every main page.
   Deep navy, heavy expanded uppercase display type, clean square-ish buttons,
   glassy cards over the flowing smoke background (assets/smoke.js).
   Brand colours: orange #f9744b, cyan #0bbdd3. Page-specific styles stay inline in each page. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root, [data-theme="dark"] {
  --bg: #070b18;
  --card: rgba(9, 14, 30, .55);
  --fg: #f4f6fb;
  --dim: #8f98ad;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .24);
  --hover: rgba(255, 255, 255, .04);
  --orange: #f9744b;
  --cyan: #0bbdd3;
  --grad: linear-gradient(90deg, #f9744b, #0bbdd3);
  --gx: 48px;                                   /* page side gutter */
  --display: 'Archivo', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f7f9;
  --card: #ffffff;
  --fg: #0a1020;
  --dim: #5d6478;
  --line: rgba(10, 16, 32, .1);
  --line-2: rgba(10, 16, 32, .26);
  --hover: rgba(10, 16, 32, .035);
  --orange: #e0592f;
  --cyan: #0894a7;
  --grad: linear-gradient(90deg, #e0592f, #0894a7);
  color-scheme: light;
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }   /* anchors clear the fixed header */
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body);
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--orange); color: #fff; }

/* small uppercase labels (class name kept from the old monospace style) */
.mono { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.dim { color: var(--dim); }
.accent { color: var(--orange); }
.caps { text-transform: uppercase; }

/* display type: heavy, expanded, uppercase */
.display, .hero h1, .contact h2, .row-title, .cell h3, .marquee span, .stat b {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  text-transform: uppercase; letter-spacing: -.01em;
}

/* ───── cursor ───── */
@media (hover: hover) and (pointer: fine) {
  body, a, button, label, summary { cursor: none; }
  input, textarea, select { cursor: text; }
  .cursor {
    position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
    background: #fff; border-radius: 50%; mix-blend-mode: difference;
    transition: width .25s, height .25s, margin .25s;
  }
  .cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .cursor-label {
    position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
    opacity: 0; transition: opacity .2s; color: var(--fg); white-space: nowrap;
  }
  .cursor-label.show { opacity: 1; }
}
@media not all and (hover: hover) and (pointer: fine) { .cursor, .cursor-label { display: none !important; } }

/* ───── smoke background ───── */
#smoke {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; display: block;
  opacity: 0; transition: opacity 1.4s ease;
  filter: blur(var(--smoke-blur, 2px));
  transform: scale(1.04);
}
.smoke-on #smoke { opacity: var(--smoke-opacity, 1); }
.aurora { display: none; }                     /* retired background */

/* ───── header ───── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px var(--gx);
  border-bottom: 1px solid transparent;
  transition: padding .35s, background .35s, border-color .35s;
}
header.scrolled, header.open {
  padding-top: 14px; padding-bottom: 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}
.logo img { height: 34px; width: auto; }
.logo .l-dark { display: none; }
[data-theme="light"] .logo .l-light { display: none; }
[data-theme="light"] .logo .l-dark { display: block; }
.meta-col { display: none; }                   /* old studio/clock columns */
.head-right { display: flex; align-items: center; gap: 28px; }
nav ul { list-style: none; display: flex; align-items: center; gap: 26px; }
nav a {
  font-family: var(--body); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--dim); transition: color .2s;
}
nav a:hover, nav a[aria-current] { color: var(--fg); }
nav a.nav-cta {
  color: var(--bg); background: var(--fg);
  padding: 10px 16px; border-radius: 6px; font-weight: 600;
  transition: opacity .2s;
}
nav a.nav-cta:hover { opacity: .85; color: var(--bg); }
.theme-btn, .menu-btn {
  background: none; border: 1px solid var(--line-2); color: var(--fg);
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px; transition: border-color .2s, background .2s;
}
.theme-btn:hover, .menu-btn:hover { border-color: var(--fg); }
.menu-btn { display: none; }

/* ───── hero ───── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px var(--gx) 90px;
}
.hero.compact { min-height: 0; padding-bottom: 56px; padding-top: 170px; }
.hero-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 36px; color: var(--dim); }
.hero-label .pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--fg);
}
.hero-label .pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--orange); }
.hero h1 {
  font-size: clamp(2.5rem, 8.2vw, 9.2rem);
  line-height: .9; max-width: 15ch;
}
.hero.compact h1 { font-size: clamp(2.3rem, 6.6vw, 7rem); max-width: 18ch; }
.hero-sub { margin-top: 36px; max-width: 46ch; font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.5; color: var(--dim); }
.hero-sub b { color: var(--fg); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; align-items: center; }
.hero-actions .note { margin-left: 10px; }

/* typing headline + caret */
.type-text { white-space: pre-wrap; }
.caret {
  display: inline-block; width: .055em; height: .82em; margin-left: .06em;
  background: var(--cyan); vertical-align: -.04em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* legacy word reveal (still used by some headings) */
.hero h1 .ind { display: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; transform: translateY(135%); animation: rise 1s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { transform: translateY(0); } }
.hero-foot { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: 48px; align-items: flex-end; }
.hero-foot p { font-size: 16px; max-width: 40ch; }

/* ───── section heads ───── */
.section { padding-top: 14vh; }
.sec-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 var(--gx) 22px; margin: 0 0 8px;
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.sec-head > span:empty { display: none; }
.sec-head > span:first-child { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.sec-head > span:first-child::before { content: ''; width: 18px; height: 2px; background: var(--grad); }
.sec-head > span:not(:first-child):not(.r) { display: none; }
.sec-head .r { color: var(--dim); text-align: right; }

/* ───── accordion rows ───── */
.row { border-top: 1px solid var(--line); margin: 0 var(--gx); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row-head {
  width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left;
  display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: center;
  padding: 30px 0; transition: padding .3s;
}
.row-head:hover { padding-left: 10px; }
.row-head > .mono.dim:first-child { color: var(--dim); }
.row-title { font-size: clamp(1.4rem, 3vw, 2.9rem); line-height: 1; grid-column: auto; }
.row-title.sm { font-family: var(--body); font-weight: 500; font-stretch: 100%; text-transform: none; letter-spacing: -.015em; font-size: clamp(1.1rem, 1.9vw, 1.6rem); line-height: 1.25; }
.row-meta { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
.plus {
  width: 34px; height: 34px; position: relative; flex-shrink: 0;
  border: 1px solid var(--line-2); border-radius: 50%;
  transition: background .3s, border-color .3s;
}
.plus::before, .plus::after {
  content: ''; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; margin-top: -.75px;
  background: var(--fg); transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.plus::after { transform: rotate(90deg); }
.row.open .plus { background: var(--fg); border-color: var(--fg); }
.row.open .plus::before, .row.open .plus::after { background: var(--bg); }
.row.open .plus::after { transform: rotate(0); }
.row-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s cubic-bezier(.2,.8,.2,1); }
.row.open .row-body { grid-template-rows: 1fr; }
.row-body > div { overflow: hidden; }
.row-inner { display: grid; grid-template-columns: 80px 1fr 2fr; gap: 24px; padding: 0 0 40px; }
.row-inner > :first-child:empty { display: none; }
.row-inner .desc { grid-column: 3; font-size: clamp(1.02rem, 1.35vw, 1.22rem); line-height: 1.55; max-width: 52ch; color: var(--dim); }
.row-inner > .scope { grid-column: 2; }
.row-inner > span:first-child + .desc { grid-column: 2 / span 2; }
.scope { display: flex; flex-direction: column; gap: 6px; }
.scope .dim { margin-bottom: 4px; }
.scope span:not(.dim) { display: inline-flex; gap: 10px; align-items: center; }
.scope span:not(.dim)::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.scope span:not(.dim):nth-child(even)::before { background: var(--cyan); }
.actions { grid-column: 3; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* ───── buttons ───── */
.btn-solid, .btn-line,
.btn-solid.mono, .btn-line.mono, .mono .btn-solid, .mono .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
  border-radius: 6px; padding: 17px 28px; line-height: 1.1;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-solid { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px var(--orange); }
.btn-line { background: transparent; color: var(--fg); border: 1px solid var(--line-2); }
.btn-line:hover { border-color: var(--fg); background: var(--hover); }
.btn-line.muted { color: var(--dim); border-color: var(--line); }
.btn-line.muted:hover { color: var(--fg); border-color: var(--line-2); }
.btn-solid .arr, .btn-line .arr { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.btn-solid:hover .arr, .btn-line:hover .arr { transform: translate(3px, -3px); }
.btn-solid[disabled] { opacity: .5; pointer-events: none; }
.btn-grad { background: var(--grad); color: #fff; border: 0; }

/* ───── cards grid ───── */
.grid-acc {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 0 var(--gx);
}
.grid-acc.three { grid-template-columns: repeat(3, 1fr); }
.cell {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 280px; padding: 28px;
  background: var(--card); color: inherit; font: inherit; text-align: left;
  border: 1px solid var(--line); border-radius: 14px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: border-color .3s, transform .4s cubic-bezier(.2,.8,.2,1);
}
.cell::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.cell:hover, .cell.on { border-color: var(--line-2); transform: translateY(-4px); }
.cell:hover::before, .cell.on::before { transform: scaleX(1); }
.cell h3 { font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.05; margin-bottom: 14px; font-stretch: 112%; }
.cell p { font-size: 15px; line-height: 1.5; color: var(--dim); max-width: 34ch; }
.cell.static p { opacity: 1; }

/* ───── lead paragraph ───── */
.lead {
  padding: 2vh var(--gx) 8vh;
  font-size: clamp(1.5rem, 3.1vw, 3rem); font-weight: 500;
  letter-spacing: -.025em; line-height: 1.12; max-width: 30ch;
}
.lead .dim { color: var(--dim); }

/* ───── contact ───── */
.contact { padding: 16vh var(--gx) 10vh; margin-top: 10vh; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 32px; align-items: end; }
.contact h2 { grid-column: 1; font-size: clamp(2.2rem, 5.6vw, 6rem); line-height: .92; }
.contact .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 48px; }
.mail {
  display: inline-flex; gap: 14px; align-items: center; margin-top: 48px;
  font-size: clamp(1.2rem, 2.4vw, 2.1rem); font-weight: 500; letter-spacing: -.02em;
  border-bottom: 2px solid; border-image: var(--grad) 1; padding-bottom: 6px;
}
.mail .arr { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.mail:hover .arr { transform: translate(6px, -6px); }

/* ───── marquee + footer ───── */
.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3vh 0; }
.marquee-track { display: inline-flex; animation: mq 40s linear infinite; }
.marquee span { font-size: clamp(3.4rem, 11vw, 11rem); line-height: 1; padding-right: .35em; }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px var(--line-2); }
.marquee span em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; }
@keyframes mq { to { transform: translateX(-50%); } }

footer {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 24px;
  padding: 36px var(--gx) 40px;
  font-family: var(--body); font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400;
}
footer ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
footer a { color: var(--dim); transition: color .2s; }
footer a:hover { color: var(--fg); }

/* ───── reveal ───── */
.rv { opacity: 0; transform: translateY(30px); transition: opacity .9s, transform 1s cubic-bezier(.2,.8,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* ───── responsive ───── */
@media (max-width: 1100px) {
  .grid-acc { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --gx: 20px; }
  header { padding-top: 18px; padding-bottom: 18px; }
  .menu-btn { display: inline-flex; }
  header nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gx) 24px;
    display: none;
  }
  header.open nav { display: block; }
  nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav li a { display: block; padding: 14px 0; font-size: 18px; color: var(--fg); border-bottom: 1px solid var(--line); }
  nav li a.nav-cta { margin-top: 16px; text-align: center; border-bottom: 0; }
  .head-right { gap: 10px; }
  .hide-m { display: none !important; }
  .hero { padding-top: 120px; padding-bottom: 64px; }
  .hero.compact { padding-top: 120px; }
  .hero-label { flex-wrap: wrap; margin-bottom: 26px; }
  .hero h1 { max-width: none; }
  .hero-actions .btn-solid, .hero-actions .btn-line { flex: 1 1 auto; }
  .row-head { grid-template-columns: 1fr auto; gap: 16px; padding: 24px 0; }
  .row-head > .mono.dim:first-child { display: none; }
  .row-inner { grid-template-columns: 1fr; gap: 20px; padding-bottom: 32px; }
  .row-inner .desc, .row-inner > .scope, .actions, .row-inner > span:first-child + .desc { grid-column: 1; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
  .lead { max-width: none; }
}
@media (max-width: 560px) {
  .grid-acc, .grid-acc.three { grid-template-columns: 1fr; }
  .cell { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .w > span { transform: none; }
  .rv { opacity: 1; transform: none; }
  .caret { animation: none; }
}
