/* =========================================================
   Artificial Functions landing page
   Vanilla CSS. No frameworks, no external assets.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* neutrals, dark is the default surface */
  --bg:            #05070d;
  --bg-elev:       #0a0e18;
  --bg-elev-2:     #0e1422;
  --surface:       rgba(255, 255, 255, .034);
  --surface-hover: rgba(255, 255, 255, .062);
  --line:          rgba(255, 255, 255, .10);
  --line-strong:   rgba(255, 255, 255, .18);

  --text:          #eef2fb;
  --text-soft:     #a6b0c6;
  --text-faint:    #6d7893;

  /* brand */
  --accent:        #54e0d0;
  --accent-2:      #7b8cff;
  --accent-ink:    #04211f;

  /* product accents */
  --c-ptthex:      #ff9556;
  --c-managehex:   #ffd166;
  --c-roomhex:     #7b8cff;
  --c-sayhex:      #54e0d0;

  /* live accent, swapped by the product tabs */
  --accent-live:   var(--c-ptthex);

  /* shape + motion */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow-md: 0 18px 44px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 90px -34px rgba(0, 0, 0, .85);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --shell: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.75rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  --ff: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:            #f6f7fb;
  --bg-elev:       #ffffff;
  --bg-elev-2:     #ffffff;
  --surface:       rgba(9, 14, 30, .028);
  --surface-hover: rgba(9, 14, 30, .055);
  --line:          rgba(9, 14, 30, .10);
  --line-strong:   rgba(9, 14, 30, .18);

  --text:          #0d1426;
  --text-soft:     #4a566e;
  --text-faint:    #74809a;

  --accent:        #0f9c8c;
  --accent-2:      #4657d8;
  --accent-ink:    #ffffff;

  --c-ptthex:      #d9662a;
  --c-managehex:   #a97a08;
  --c-roomhex:     #4657d8;
  --c-sayhex:      #0f9c8c;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .07);
  --shadow-md: 0 18px 40px -22px rgba(15, 23, 42, .32);
  --shadow-lg: 0 40px 80px -40px rgba(15, 23, 42, .35);

  color-scheme: light;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(.975rem, .93rem + .2vw, 1.0625rem);
  line-height: 1.68;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
address { font-style: normal; }

h1, h2, h3, h4 {
  line-height: 1.14;
  letter-spacing: -.028em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 1.5rem + 3.9vw, 4.4rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.85rem); letter-spacing: -.034em; }
h3 { font-size: clamp(1.05rem, .98rem + .38vw, 1.28rem); }
p  { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--text); }

.skip-link {
  position: fixed;
  top: .6rem; left: .6rem;
  z-index: 200;
  padding: .7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ---------- 3. Layout helpers ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell-narrow { max-width: 860px; }

.section { padding-block: var(--section-y); position: relative; }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.reveal { will-change: transform, opacity; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .74rem;
  font-weight: 620;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .55;
}

.section-sub {
  margin-top: 1.15rem;
  color: var(--text-soft);
  font-size: clamp(1rem, .96rem + .22vw, 1.1rem);
  max-width: 62ch;
}

.grad-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer { to { background-position: 220% 0; } }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-py: .82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: var(--btn-py) 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 55%, var(--accent)));
  color: var(--accent-ink);
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 16px 36px -12px color-mix(in srgb, var(--accent) 80%, transparent); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent); }

.btn-sm { --btn-py: .58rem; padding-inline: 1.1rem; font-size: .875rem; }
.btn-lg { --btn-py: 1rem; padding-inline: 1.9rem; font-size: 1.02rem; }

/* ---------- 5. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent));
  border: 1px solid var(--line-strong);
  color: var(--accent);
  flex: 0 0 auto;
}
/* AF ligature. The A's right diagonal doubles as the stem of the F, and the two
   bars running off it to the right are the F's arms. */
.logo-glyph { width: 30px; height: 30px; overflow: visible; }
.logo-a { stroke: var(--accent); }
.logo-f { stroke: var(--accent-2); }
.brand:hover .logo-a,
.brand:hover .logo-f { transition: stroke .3s var(--ease); }
.brand:hover .logo-f { stroke: var(--accent); }

.brand-text { display: flex; flex-direction: column; line-height: 1.16; }
.brand-text strong { font-size: .98rem; font-weight: 650; letter-spacing: -.02em; }
.brand-text small { font-size: .715rem; color: var(--text-faint); letter-spacing: .01em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-inline: auto;
}
.site-nav a {
  position: relative;
  padding: .5rem .78rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 8px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.is-current { color: var(--text); }
.nav-cta { display: none; }
.site-nav a.is-current::after {
  content: "";
  position: absolute;
  left: .78rem; right: .78rem; bottom: .22rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-hover); }
.icon-sun { display: none; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.scroll-progress {
  height: 2px;
  width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform .1s linear;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(7.5rem, 12vw, 10.5rem);
  padding-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .48;
  will-change: transform;
}
.orb-a { width: 46vw; height: 46vw; min-width: 340px; min-height: 340px; top: -14vw; left: -8vw;  background: radial-gradient(circle, var(--accent) 0%, transparent 68%); }
.orb-b { width: 40vw; height: 40vw; min-width: 300px; min-height: 300px; top: 4vw;   right: -10vw; background: radial-gradient(circle, var(--accent-2) 0%, transparent 68%); }
.orb-c { width: 34vw; height: 34vw; min-width: 260px; min-height: 260px; bottom: -12vw; left: 32vw; background: radial-gradient(circle, var(--c-ptthex) 0%, transparent 70%); opacity: .3; }
:root[data-theme="light"] .orb { opacity: .3; filter: blur(80px); }
:root[data-theme="light"] .orb-c { opacity: .18; }

.grid-veil {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 62% at 50% 26%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 26%, #000 20%, transparent 78%);
  opacity: .55;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.lede {
  margin-top: 1.5rem;
  max-width: 56ch;
  font-size: clamp(1.02rem, .97rem + .32vw, 1.18rem);
  color: var(--text-soft);
}
.lede strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.2rem; }

.hero-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  margin-top: 2.2rem;
  font-size: .865rem;
  color: var(--text-faint);
}
.hero-assurances li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-assurances svg { color: var(--accent); flex: 0 0 auto; }

/* hero console */
.hero-visual { position: relative; }

.console {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--bg-elev-2), var(--bg-elev));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform .6s var(--ease-out);
}
.console:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }

.console-bar {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.console-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
.console-bar .dot:first-child { background: color-mix(in srgb, var(--c-ptthex) 70%, transparent); }
.console-title {
  margin-left: .55rem;
  font-family: var(--ff-mono);
  font-size: .7rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.console-badge {
  margin-left: auto;
  font-size: .64rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 100px;
  padding: .2rem .55rem;
  flex: 0 0 auto;
}

.console-body { padding: 1rem; display: grid; gap: .5rem; }

.console-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .72rem .8rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
.console-row.is-hot { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateX(3px); }

.chip {
  font-size: .68rem;
  font-weight: 680;
  letter-spacing: -.01em;
  padding: .2rem .5rem;
  border-radius: 6px;
  flex: 0 0 auto;
}
.chip-ptthex    { color: var(--c-ptthex);    background: color-mix(in srgb, var(--c-ptthex) 15%, transparent); }
.chip-managehex { color: var(--c-managehex); background: color-mix(in srgb, var(--c-managehex) 15%, transparent); }
.chip-roomhex   { color: var(--c-roomhex);   background: color-mix(in srgb, var(--c-roomhex) 15%, transparent); }
.chip-sayhex    { color: var(--c-sayhex);    background: color-mix(in srgb, var(--c-sayhex) 15%, transparent); }

.console-label { font-size: .82rem; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-state {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: .68rem;
  color: var(--accent);
  flex: 0 0 auto;
}
.console-state::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: .38rem;
  vertical-align: middle;
}

.console-meter { padding: .7rem .3rem .2rem; display: grid; gap: .35rem; }
.meter-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .74rem; color: var(--text-faint); }
.meter-head strong { color: var(--text-soft); font-weight: 600; }
.meter-track { height: 5px; border-radius: 4px; background: var(--surface-hover); overflow: hidden; margin-bottom: .55rem; }
.meter-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  animation: meterIn 1.4s var(--ease-out) both;
}
@keyframes meterIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.float-card {
  position: absolute;
  display: grid;
  gap: .18rem;
  padding: .75rem .95rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  max-width: 210px;
  animation: floaty 7s ease-in-out infinite;
}
.float-card strong { font-size: .82rem; font-weight: 650; }
.float-card span { font-size: .72rem; color: var(--text-faint); line-height: 1.42; }
.float-a { bottom: -5rem; left: -2rem; }
.float-b { top: -4.6rem; right: -1.5rem; animation-delay: -3.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* marquee */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: .9rem;
  overflow: hidden;
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: max-content;
  animation: slide 42s linear infinite;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 550;
  color: var(--text-faint);
}
.marquee-track i { color: var(--accent); font-style: normal; opacity: .6; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 7. Stats ---------- */
.stats { padding-block: clamp(2.75rem, 5vw, 4.25rem); border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.stat { display: grid; gap: .4rem; }
.stat strong {
  font-size: clamp(1.85rem, 1.3rem + 1.7vw, 2.6rem);
  font-weight: 620;
  letter-spacing: -.04em;
  line-height: 1.05;
  background: linear-gradient(150deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-or {
  display: block;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  -webkit-text-fill-color: var(--text-faint);
  margin-block: .05rem;
}
.stat span { font-size: .875rem; color: var(--text-soft); max-width: 26ch; }

/* ---------- 8. Value cards ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
}
.value-card {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease);
}
.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.value-card:hover { border-color: var(--line-strong); transform: translateY(-4px); background: var(--surface-hover); }
.value-card:hover::before { opacity: 1; }

.value-ico {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  margin-bottom: 1.15rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.value-card h3 { margin-bottom: .6rem; }
.value-card p { color: var(--text-soft); font-size: .92rem; }

/* ---------- 9. Products ---------- */
.section-products { position: relative; }
.section-products::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--accent-live) 9%, transparent), transparent 70%);
  pointer-events: none;
  transition: background .6s var(--ease);
}
.section-products > .shell { position: relative; }

.product-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(10px);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.ptab {
  display: grid;
  gap: .15rem;
  text-align: left;
  padding: .85rem 1.05rem;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--text-soft);
  transition: background-color .28s var(--ease), color .28s var(--ease),
              border-color .28s var(--ease), transform .28s var(--ease);
}
.ptab:hover { background: var(--surface-hover); color: var(--text); }
.ptab-name { font-size: 1rem; font-weight: 650; letter-spacing: -.02em; }
.ptab-desc { font-size: .755rem; color: var(--text-faint); line-height: 1.35; }

.ptab.is-active {
  background: color-mix(in srgb, var(--tab-accent) 13%, transparent);
  border-color: color-mix(in srgb, var(--tab-accent) 40%, transparent);
  color: var(--text);
}
.ptab.is-active .ptab-name { color: var(--tab-accent); }
.ptab[data-accent="ptthex"]    { --tab-accent: var(--c-ptthex); }
.ptab[data-accent="managehex"] { --tab-accent: var(--c-managehex); }
.ptab[data-accent="roomhex"]   { --tab-accent: var(--c-roomhex); }
.ptab[data-accent="sayhex"]    { --tab-accent: var(--c-sayhex); }

.ppanel { display: none; }
.ppanel.is-active { display: block; animation: panelIn .5s var(--ease-out) both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.ppanel[data-accent="ptthex"]    { --pa: var(--c-ptthex); }
.ppanel[data-accent="managehex"] { --pa: var(--c-managehex); }
.ppanel[data-accent="roomhex"]   { --pa: var(--c-roomhex); }
.ppanel[data-accent="sayhex"]    { --pa: var(--c-sayhex); }

.ppanel-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
  align-items: start;
}

.ppanel-intro {
  position: sticky;
  top: 104px;
  padding: clamp(1.6rem, 2.6vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--pa) 26%, var(--line));
  border-radius: var(--r-xl);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--pa) 9%, transparent), transparent 58%),
    var(--surface);
}
.product-eyebrow {
  font-family: var(--ff-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .5rem;
}
.product-title {
  font-size: clamp(2rem, 1.5rem + 1.9vw, 2.8rem);
  letter-spacing: -.04em;
  color: var(--pa);
  margin-bottom: .75rem;
}
.licence-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .8rem;
  margin-bottom: .95rem;
  border-radius: 100px;
  border: 1px solid color-mix(in srgb, var(--pa) 45%, transparent);
  background: color-mix(in srgb, var(--pa) 12%, transparent);
  color: var(--pa);
  font-size: .755rem;
  font-weight: 620;
  letter-spacing: -.005em;
}
.licence-badge svg { flex: 0 0 auto; }
.product-tagline { font-size: 1.1rem; font-weight: 550; letter-spacing: -.02em; margin-bottom: .85rem; }
.product-body { color: var(--text-soft); font-size: .93rem; }

.product-bullets { display: grid; gap: .85rem; margin-block: 1.5rem; }
.product-bullets li {
  font-size: .875rem;
  color: var(--text-soft);
  padding-left: 1rem;
  border-left: 2px solid color-mix(in srgb, var(--pa) 45%, transparent);
  line-height: 1.55;
}
.product-bullets span {
  display: block;
  font-size: .68rem;
  font-weight: 660;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--pa);
  margin-bottom: .18rem;
}

.ppanel-intro .btn-primary {
  background: linear-gradient(135deg, var(--pa), color-mix(in srgb, var(--pa) 55%, var(--accent-2)));
  color: #0a0c14;
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--pa) 70%, transparent);
}
:root[data-theme="light"] .ppanel-intro .btn-primary { color: #fff; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: .8rem;
}
.fcard {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .28s var(--ease), transform .28s var(--ease), background-color .28s var(--ease);
}
.fcard:hover {
  border-color: color-mix(in srgb, var(--pa) 48%, transparent);
  background: var(--surface-hover);
  transform: translateY(-3px);
}
.fcard h4 {
  font-size: .925rem;
  font-weight: 640;
  margin-bottom: .45rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.fcard h4::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--pa);
  flex: 0 0 auto;
  transform: translateY(-1px);
}
.fcard p { font-size: .845rem; color: var(--text-soft); line-height: 1.58; }

/* ---------- 10. Platform ---------- */
.section-platform { border-block: 1px solid var(--line); background: var(--bg-elev); }
:root[data-theme="light"] .section-platform { background: #fff; }

.platform-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.principles { display: grid; gap: .35rem; }
.principles li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.principles li:last-child { border-bottom: 0; }
.pnum {
  font-family: var(--ff-mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: .28rem;
  opacity: .85;
}
.principles h3 { margin-bottom: .42rem; }
.principles p { font-size: .89rem; color: var(--text-soft); }

.platform-aside { position: sticky; top: 104px; }
.aside-card {
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%), var(--surface);
}
.aside-card h3 { margin-bottom: 1.25rem; }

.stack-diagram { display: grid; gap: .5rem; }
.stack-layer {
  display: grid;
  gap: .15rem;
  padding: .85rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stack-layer:hover { transform: translateX(4px); border-color: var(--accent); }
.stack-layer strong { font-size: .87rem; font-weight: 620; }
.stack-layer span { font-size: .755rem; color: var(--text-faint); }
.stack-layer.l1 { border-left: 3px solid var(--accent); }
.stack-layer.l2 { border-left: 3px solid var(--c-roomhex); margin-left: .6rem; }
.stack-layer.l3 { border-left: 3px solid var(--c-managehex); margin-left: 1.2rem; }
.stack-layer.l4 { border-left: 3px solid var(--c-ptthex); margin-left: 1.8rem; }

.aside-note { margin-top: 1.25rem; font-size: .84rem; color: var(--text-soft); }

/* ---------- 11. Industries ---------- */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}
.ind-card {
  padding: clamp(1.4rem, 2.2vw, 1.85rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  display: grid;
  align-content: start;
  gap: .7rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.ind-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.ind-card p { font-size: .885rem; color: var(--text-soft); }
.ind-fit { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.ind-fit span {
  font-size: .715rem;
  font-weight: 620;
  padding: .25rem .62rem;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
}
.ind-fit span:first-child { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- 12. Process ---------- */
.section-process { border-top: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
  counter-reset: step;
}
.step { position: relative; padding-top: 2.6rem; display: flex; flex-direction: column; }
.step::before {
  content: "";
  position: absolute;
  top: 21px; left: 46px; right: -1rem;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.step:last-child::before { display: none; }
.step-num {
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent);
  font-weight: 650;
  font-size: .92rem;
}
.step h3 { margin-bottom: .55rem; }
.step p { font-size: .885rem; color: var(--text-soft); }
.step-out {
  display: block;
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px dashed var(--line-strong);
  font-size: .8rem;
  color: var(--text-faint);
}

/* ---------- 13. Trust ---------- */
.section-trust { background: var(--bg-elev); border-block: 1px solid var(--line); }
:root[data-theme="light"] .section-trust { background: #fff; }

.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.trust-copy { position: sticky; top: 104px; }
.trust-copy .btn { margin-top: 1.75rem; }

.trust-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.trust-list li {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .3s var(--ease);
}
.trust-list li:hover { border-color: var(--accent); }
.trust-list h3 { font-size: .93rem; margin-bottom: .45rem; color: var(--accent); }
.trust-list p { font-size: .855rem; color: var(--text-soft); }

/* ---------- 14. FAQ ---------- */
.faq { display: grid; gap: .7rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--surface-hover); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  font-weight: 580;
  font-size: .975rem;
  letter-spacing: -.015em;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 11px; height: 11px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item summary:hover { color: var(--accent); }
.faq-body { padding: 0 1.35rem 1.25rem; }
.faq-body p { font-size: .9rem; color: var(--text-soft); max-width: 68ch; }
.faq-item[open] .faq-body { animation: faqIn .32s var(--ease-out) both; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 15. CTA ---------- */
.section-cta { padding-bottom: clamp(4rem, 8vw, 7rem); }
.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 5vw, 4.25rem);
  border: 1px solid var(--line-strong);
  border-radius: clamp(22px, 3vw, 34px);
  background: linear-gradient(160deg, var(--bg-elev-2), var(--bg-elev));
  box-shadow: var(--shadow-lg);
}
:root[data-theme="light"] .cta-card { background: #fff; }
.cta-glow {
  position: absolute;
  top: -55%; left: 50%;
  width: 80%; aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%);
  filter: blur(70px);
  pointer-events: none;
}
.cta-content { position: relative; max-width: 760px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.1rem; }
#copyEmail.is-copied { border-color: var(--accent); color: var(--accent); }

.cta-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 1.25rem;
  margin-top: 2.75rem;
  padding-top: 1.85rem;
  border-top: 1px solid var(--line);
}
.cta-meta li { display: grid; gap: .18rem; }
.cta-meta strong { font-size: .92rem; font-weight: 620; }
.cta-meta span { font-size: .8rem; color: var(--text-faint); }

/* ---------- 16. Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(2.75rem, 5vw, 4rem); background: var(--bg-elev); }
:root[data-theme="light"] .site-footer { background: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.footer-brand .brand-mark { margin-bottom: 1rem; }
.footer-tag { font-size: .875rem; color: var(--text-soft); max-width: 34ch; margin-bottom: .9rem; }
.footer-mail {
  font-size: .885rem;
  font-weight: 550;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .2s var(--ease);
}
.footer-mail:hover { border-bottom-color: var(--accent); }

.footer-col h3 {
  font-size: .74rem;
  font-weight: 640;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a { font-size: .885rem; color: var(--text-soft); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-legal-col address { font-size: .845rem; color: var(--text-soft); line-height: 1.75; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .795rem;
  color: var(--text-faint);
}
.footer-licence { max-width: 62ch; }

/* ---------- 17. Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-soft);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, color .2s, border-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 18. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 85ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav a { padding-inline: .58rem; font-size: .865rem; }
  .brand-text small { display: none; }
}

@media (max-width: 940px) {
  html { scroll-padding-top: 84px; }
  .header-inner { min-height: 66px; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    margin: 0;
    padding: 1rem var(--gutter) 1.5rem;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: .8rem .75rem; font-size: 1rem; border-radius: 10px; }
  .site-nav a.is-current::after { display: none; }
  .nav-cta { display: inline-flex; margin-top: .85rem; justify-content: center; }
  .site-nav a.nav-cta { border-radius: 100px; color: var(--accent-ink); }
  .site-nav a.nav-cta:hover { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 55%, var(--accent))); }

  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .hero-visual { max-width: 560px; width: 100%; }
  .console { transform: none; }
  .console:hover { transform: none; }
  .float-a { left: auto; right: 1rem; bottom: -1rem; }
  .float-b { display: none; }

  .ppanel-grid,
  .platform-layout,
  .trust-layout { grid-template-columns: minmax(0, 1fr); }
  .ppanel-intro,
  .platform-aside,
  .trust-copy { position: static; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .product-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::before { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  :root { --gutter: 1.15rem; }
  .brand-text strong { font-size: .92rem; }
  .hero-cta .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .product-tabs { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .float-card { max-width: 180px; }
  .float-a { right: .5rem; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .stack-layer.l2, .stack-layer.l3, .stack-layer.l4 { margin-left: 0; }
}

/* ---------- 20. Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .console { transform: none; }
}

@media print {
  .site-header, .to-top, .marquee, .hero-bg, .cta-glow { display: none !important; }
  body { background: #fff; color: #000; }
  .ppanel { display: block !important; }
}
