/* =========================================================
   Zenra Automation System — styles
   Palette drawn from the hero film: walnut, black marble, brass.
   ========================================================= */

:root {
  --bg: #0b0907;
  --bg-2: #110e0b;
  --surface: #17130f;
  --surface-2: #1e1914;
  --line: rgba(201, 169, 110, 0.16);
  --line-strong: rgba(201, 169, 110, 0.38);
  --gold: #c9a96e;
  --gold-light: #e8d3a6;
  --gold-deep: #9c7c45;
  --text: #f2ebdf;
  --muted: #a69d8d;
  --dim: #6f675a;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 500; }

em {
  font-style: italic;
  color: var(--gold-light);
}

::selection { background: var(--gold); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease),
              color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  white-space: nowrap;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #1a140c;
  box-shadow: 0 10px 30px -12px rgba(201, 169, 110, 0.6);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(201, 169, 110, 0.8); }
.btn--ghost {
  border-color: rgba(242, 235, 223, 0.35);
  color: var(--text);
  background: rgba(11, 9, 7, 0.25);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn--sm { padding: 10px 20px; font-size: 13px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
.loader__bar {
  width: 180px; height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 0;
  background: var(--gold);
  transition: width 0.3s ease;
}
.loader__text {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(201, 169, 110, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-block: 14px;
  background: rgba(11, 9, 7, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
}
.nav__name {
  display: flex; flex-direction: column;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1;
}
.nav__name small {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a:not(.btn) {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(242, 235, 223, 0.8);
  transition: color 0.3s;
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--gold-light); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute; left: 12px; right: 12px;
  height: 1px; background: var(--text);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 24px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Scroll hero ---------- */
.hero {
  position: relative;
  height: 520vh; /* scroll distance that drives the frame sequence */
}
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero__shade {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 9, 7, 0.88) 0%, rgba(11, 9, 7, 0.55) 34%, rgba(11, 9, 7, 0) 62%),
    linear-gradient(0deg, rgba(11, 9, 7, 0.95) 0%, rgba(11, 9, 7, 0) 32%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.6) 0%, rgba(11, 9, 7, 0) 18%);
}
.hero__step {
  position: absolute;
  left: clamp(24px, 6vw, 96px);
  bottom: clamp(90px, 14vh, 160px);
  max-width: 600px;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  will-change: opacity, transform;
}
.hero__step.is-active { pointer-events: auto; }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(42px, 6.4vw, 88px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
.hero__lead {
  margin: 24px 0 0;
  max-width: 470px;
  font-size: clamp(15px, 1.25vw, 18px);
  color: rgba(242, 235, 223, 0.82);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__progress {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  top: 50%;
  width: 1px; height: 160px;
  transform: translateY(-50%);
  background: rgba(242, 235, 223, 0.15);
}
.hero__progress span {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 0;
  background: var(--gold);
}
.hero__hint {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(242, 235, 223, 0.6);
  transition: opacity 0.5s;
}
.hero__hint i {
  width: 1px; height: 38px;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drip {
  0% { transform: scaleY(0); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(96px, 13vw, 168px) 0; }
.section__head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section__title {
  font-family: var(--serif);
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.005em;
}
.section__lead {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: 17px;
  color: var(--muted);
}

/* Challenge */
.challenge {
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 15%, rgba(201, 169, 110, 0.12), transparent 75%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.88) 0%, rgba(11, 9, 7, 0.65) 40%, rgba(11, 9, 7, 0.88) 100%),
    url("black_marble_wall.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-top: 1px solid var(--line);
  box-shadow: inset 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 -20px 40px rgba(0, 0, 0, 0.8);
}
.challenge::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(11, 9, 7, 0.75) 100%);
}
.challenge .container {
  position: relative;
  z-index: 2;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.problem {
  padding: 40px 32px 8px 0;
  border-right: 1px solid var(--line);
}
.problem + .problem { padding-left: 32px; }
.problem:last-child { border-right: 0; }
.problem__num {
  display: block;
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: var(--gold);
}
.problem h3 { font-family: var(--serif); font-size: 28px; margin-bottom: 12px; }
.problem p { margin: 0; color: var(--muted); font-size: 15px; }

/* Trust */
.trust {
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(201, 169, 110, 0.08), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pillar {
  padding: clamp(32px, 4vw, 52px);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.pillar__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.pillar__icon svg, .agent__icon svg, .verified svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar h3 { font-family: var(--serif); font-size: 36px; }
.pillar__lead { margin: 8px 0 28px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold-light); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 15px;
}
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 14px; height: 8px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}
.checklist strong { color: var(--text); font-weight: 500; }

/* Demo */
.demo {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0e0c09;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.demo__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.demo__bar > span { width: 10px; height: 10px; border-radius: 50%; background: #3a322a; }
.demo__bar p { margin: 0 0 0 12px; font-size: 13px; color: var(--muted); }
.demo__secure {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fbf8a;
  display: inline-flex; align-items: center; gap: 8px;
}
.demo__secure::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fbf8a; box-shadow: 0 0 10px #8fbf8a; }
.demo__body { padding: clamp(22px, 3vw, 36px); display: grid; gap: 18px; }
.msg { max-width: 760px; padding: 18px 22px; border-radius: 12px; font-size: 15px; }
.msg--user {
  justify-self: end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.msg--agent { background: transparent; border: 1px solid var(--line-strong); }
.msg--agent p { margin: 0; color: var(--text); }
.msg mark { background: rgba(201, 169, 110, 0.16); color: var(--gold-light); padding: 1px 5px; border-radius: 4px; }
.msg sup { color: var(--gold); font-size: 11px; margin-left: 2px; }
.sources {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.sources span {
  font-size: 12px; color: var(--muted);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.verified {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 12px; letter-spacing: 0.06em;
  color: #9fcf99;
}
.verified svg { width: 16px; height: 16px; stroke: #9fcf99; stroke-width: 2; }

/* Agents */
.agents { background: var(--bg); border-top: 1px solid var(--line); }
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.agent {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(30px, 3vw, 44px);
  background-color: #0d0a08;
  background-image:
    linear-gradient(170deg, rgba(17, 14, 11, 0.88) 0%, rgba(10, 8, 6, 0.82) 100%),
    url("black_marble_wall.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  isolation: isolate;
  overflow: hidden;
}
.agent::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(201, 169, 110, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.agent:hover::before { opacity: 1; }
.agent:hover {
  background-image:
    linear-gradient(170deg, rgba(24, 19, 15, 0.8) 0%, rgba(13, 10, 8, 0.72) 100%),
    url("black_marble_wall.jpg");
  box-shadow: inset 0 0 40px rgba(201, 169, 110, 0.08);
}
.agent__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 38px; }
.agent__num {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-deep);
  transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s;
}
.agent:hover .agent__num { color: var(--gold); -webkit-text-stroke-color: var(--gold); }
.agent__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 0.4s, transform 0.6s var(--ease);
}
.agent:hover .agent__icon { border-color: var(--gold); transform: rotate(-8deg) scale(1.05); }
.agent__icon svg { width: 22px; height: 22px; }
.agent__name { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.agent__tag {
  margin: 10px 0 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--gold-light);
}
.agent__desc { margin: 0; font-size: 14.5px; color: var(--muted); }
.agent__live {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #9fcf99;
}
.agent__live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9fcf99;
  animation: live 1.8s ease-in-out infinite;
}
@keyframes live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(159, 207, 153, 0.6); }
  50% { box-shadow: 0 0 0 7px rgba(159, 207, 153, 0); }
}

/* Stats */
.stats {
  padding: 72px 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-block: 1px solid var(--line);
}
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 8px 16px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
  color: var(--gold-light);
}
.stat__label {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Platform */
.platform {
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(201, 169, 110, 0.12), transparent 75%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.88) 0%, rgba(11, 9, 7, 0.65) 40%, rgba(11, 9, 7, 0.88) 100%),
    url("black_marble_wall.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-top: 1px solid var(--line);
  box-shadow: inset 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 -20px 40px rgba(0, 0, 0, 0.8);
}
.platform::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(11, 9, 7, 0.75) 100%);
}
.platform .container {
  position: relative;
  z-index: 2;
}
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; top: 22px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--line) 80%);
}
.step { position: relative; padding-top: 0; }
.step__num {
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 30px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #14100c;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 12px rgba(201, 169, 110, 0.2);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.step h3 { font-family: var(--serif); font-size: 30px; margin-bottom: 10px; }
.step p { margin: 0; font-size: 15px; color: var(--muted); }

/* Briefing registration */
.cta {
  background:
    radial-gradient(45% 60% at 80% 100%, rgba(201, 169, 110, 0.12), transparent 70%),
    radial-gradient(40% 50% at 0% 0%, rgba(201, 169, 110, 0.06), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}
.register {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}
.register__intro { position: sticky; top: 120px; }
.register__intro .section__title { font-size: clamp(38px, 4.6vw, 62px); }
.register__promises {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.register__promises li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  color: var(--muted);
}
.register__promises li::before {
  content: "";
  position: absolute; left: 2px; top: 8px;
  width: 8px; height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.register__promises strong { color: var(--text); font-weight: 500; }

.register__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 30px;
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(160deg, rgba(30, 25, 20, 0.85), rgba(17, 14, 11, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.register__form::before {
  content: "";
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.register__submit { grid-column: 1 / -1; width: 100%; padding-block: 18px; margin-top: 6px; }
.register__submit svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
.register__submit:hover svg { transform: translateX(4px); }
.register__submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.register__note {
  grid-column: 1 / -1;
  margin: -12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--dim);
}
.register__note.is-success { color: #9fcf99; }
.register__note.is-error { color: #e09a8f; }

/* Form fields (shared by registration, login and admin) */
.field { display: flex; flex-direction: column; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.field label span { color: var(--gold-light); }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(242, 235, 223, 0.18);
  border-radius: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field input::placeholder,
.field textarea::placeholder { color: var(--dim); }
.field input:focus,
.field textarea:focus,
.field select:focus { border-bottom-color: var(--gold); }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px #1a1611 inset;
  caret-color: var(--text);
}
.field__error {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 12px;
  color: #e09a8f;
  opacity: 0;
  transition: opacity 0.3s, max-height 0.3s, margin 0.3s;
}
.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select { border-bottom-color: #c9786c; }
.field.is-invalid .field__error { max-height: 40px; margin-top: 8px; opacity: 1; }
.field__meta { display: flex; justify-content: space-between; gap: 12px; }
.field__count { margin-top: 8px; margin-left: auto; font-size: 11px; color: var(--dim); white-space: nowrap; }

.select { position: relative; }
.select::after {
  content: "";
  position: absolute; right: 4px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  cursor: pointer;
}
.field select:invalid { color: var(--dim); }
.field select option { background: #17130f; color: var(--text); }

/* Admin link in nav */
.nav__links a.nav__admin {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.3s, color 0.3s;
}
.nav__links a.nav__admin::after { display: none; }
.nav__links a.nav__admin:hover { border-color: var(--gold); }
.nav__admin svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Login modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 5, 4, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.4s var(--ease);
}
.modal__card {
  position: relative;
  width: min(100%, 420px);
  padding: 48px 40px 40px;
  text-align: center;
  background: linear-gradient(165deg, #1f1a14, #120f0c);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(201, 169, 110, 0.05) inset;
  animation: rise 0.5s var(--ease);
}
.modal__card::before {
  content: "";
  position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.modal__card .eyebrow { justify-content: center; margin-bottom: 10px; }
.modal__card .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.modal__card h2 { font-family: var(--serif); font-size: 38px; }
.modal__lead { margin: 10px 0 30px; font-size: 14px; color: var(--muted); }
.modal__card .field { text-align: left; }
.modal__card.is-shake { animation: shake 0.45s; }
.modal__seal {
  display: grid; place-items: center;
  width: 60px; height: 60px;
  margin: 0 auto 22px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 30px -6px rgba(201, 169, 110, 0.5);
}
.modal__seal svg, .modal__close svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.modal__close svg { width: 16px; height: 16px; stroke: var(--muted); }
.modal__close:hover { border-color: var(--gold); transform: rotate(90deg); }
.modal__submit { width: 100%; margin-top: 28px; }
.password { position: relative; }
.password input { padding-right: 56px; letter-spacing: 0.1em; }
.password__toggle {
  position: absolute; right: 0; bottom: 10px;
  padding: 4px 0;
  background: none; border: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* "Request this agent" link injected into agent cards */
.agent__request {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  background: none; border: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  align-self: flex-start;
  opacity: 0.75;
  transition: opacity 0.3s, gap 0.4s var(--ease);
}
.agent__request:hover { opacity: 1; gap: 12px; }

/* Footer */
.footer { padding: 48px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 0.08em; }
.footer__brand p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer__links a { font-size: 13px; color: var(--muted); transition: color 0.3s; }
.footer__links a:hover { color: var(--gold-light); }
.footer__copy {
  margin: 0;
  width: 100%;
  font-size: 12px;
  color: var(--dim);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__copy a { color: var(--muted); transition: color 0.3s; }
.footer__copy a:hover { color: var(--gold-light); }

/* ---------- Legal Page (Terms of Service) ---------- */
.legal-page {
  background: var(--bg);
}
.legal-page .nav {
  position: sticky;
}
.legal {
  padding: clamp(60px, 8vw, 100px) 0 clamp(80px, 10vw, 120px);
  position: relative;
}
.legal__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.legal__toc {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legal__toc-title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.legal__toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: toc-item;
}
.legal__toc li {
  counter-increment: toc-item;
  font-size: 13.5px;
}
.legal__toc a {
  color: var(--muted);
  transition: color 0.3s var(--ease);
  display: block;
  line-height: 1.4;
}
.legal__toc a:hover {
  color: var(--gold-light);
}
.legal__doc {
  max-width: 800px;
}
.legal__head {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.legal__head h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.1;
  margin: 8px 0 16px;
}
.legal__updated {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.legal__doc section {
  margin-bottom: 40px;
  scroll-margin-top: 120px;
}
.legal__doc section h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
}
.legal__doc section h2 span {
  font-size: 16px;
  font-family: var(--sans);
  color: var(--gold);
}
.legal__doc p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0 0 14px;
}
.legal__doc a {
  color: var(--gold);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s, border-color 0.3s;
}
.legal__doc a:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
}
.legal__back {
  display: inline-flex;
  align-items: center;
  margin-top: 36px;
  padding: 12px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.3s, color 0.3s;
}
.legal__back:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

@media (max-width: 860px) {
  .legal__grid {
    grid-template-columns: 1fr;
  }
  .legal__toc {
    display: none;
  }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .problem { padding: 36px 28px 36px 0; border-bottom: 1px solid var(--line); }
  .problem:nth-child(2n) { border-right: 0; padding-left: 28px; }
  .problem:nth-child(2n + 1) { padding-left: 0; }
  .agent-grid { grid-template-columns: repeat(2, 1fr); }
  .agent--featured { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .steps::before { display: none; }
  .register { grid-template-columns: 1fr; }
  .register__intro { position: static; }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: rgba(11, 9, 7, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease), visibility 0.5s;
  }
  .nav__links a:not(.btn) { font-family: var(--serif); font-size: 30px; letter-spacing: 0.02em; }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav.menu-open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; }
  .pillars { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stat:nth-child(3) { border-left: 0; }
  .hero__progress { display: none; }
  .hero__shade {
    background:
      linear-gradient(0deg, rgba(11, 9, 7, 0.96) 0%, rgba(11, 9, 7, 0.5) 45%, rgba(11, 9, 7, 0) 70%),
      linear-gradient(180deg, rgba(11, 9, 7, 0.6) 0%, rgba(11, 9, 7, 0) 18%);
  }
  .hero__step { right: 24px; bottom: 96px; }
}

@media (max-width: 600px) {
  .problem-grid, .agent-grid, .steps { grid-template-columns: 1fr; }
  .problem, .problem:nth-child(2n), .problem:nth-child(2n + 1) { padding: 32px 0; border-right: 0; }
  .register__form { grid-template-columns: 1fr; padding: 28px 22px; }
  .modal__card { padding: 44px 24px 30px; }
  .demo__bar p { display: none; }
  .msg { padding: 16px; font-size: 14px; }
  .nav__name small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loader__mark, .hero__hint i, .agent__live i { animation: none; }
}
