/* ============================================================
   Agentle — design tokens (from Paper "Agentle — Website v1")
   ============================================================ */
:root {
  --color-bg: #F5F7F8;
  --color-surface: #EAEEF1;
  --color-text: #101820;
  --color-divider: #D3D7DA;

  --color-neutral-100: #F2F5F7;
  --color-neutral-200: #E3E7E9;
  --color-neutral-300: #CED2D5;
  --color-neutral-400: #B2B6BA;
  --color-neutral-600: #797E82;
  --color-neutral-800: #404447;

  --color-accent-100: #E2F9FF;
  --color-accent-300: #92DFF5;
  --color-accent-400: #5CC6E1;
  --color-accent-600: #0092AD;
  --color-accent-700: #006C81;
  --color-accent-800: #0E4F5C;
  --color-accent-900: #012F3A;

  --color-accent-2-100: #E7FAEE;
  --color-accent-2-300: #A5E2BD;
  --color-accent-2-600: #1E8E5A;
  --color-accent-2-700: #296F4B;
  --color-accent-2-800: #1B4F34;

  --color-process-yellow: #B5690B;
  --color-red-100: #FDF1EE;
  --color-red-border: #F0C9BA;
  --color-red-700: #A83B1E;

  --color-purple-100: #F4EEFC;
  --color-purple-border: #DDC8F0;
  --color-purple-700: #5C3A8A;

  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-weight-heading: 600;

  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 4px;

  --shadow-lg: 0 12px 32px rgba(39, 42, 44, 0.18);

  --container-max: 1220px;
  --container-pad: clamp(20px, 5vw, 72px);
}

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img { max-width: 100%; display: block; }
a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent-900); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.full-bleed {
  width: 100%;
  box-sizing: border-box;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.eyebrow {
  display: block;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: 14px;
  line-height: 18px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-700); color: var(--color-bg); }
.btn-ghost { color: var(--color-accent-700); padding-inline: 6px; }
.btn-ghost:hover { color: var(--color-accent-900); }
.btn-nav { padding: 9px 18px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
}
.nav-inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 64px;
  display: flex;
  align-items: center;
}
.nav-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: 18px;
  color: var(--color-text);
  white-space: nowrap;
}
.nav-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 14px;
  white-space: nowrap;
}
.nav-links a { color: var(--color-text); }
.nav-links a[aria-current="page"] { color: var(--color-accent-700); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
}
.nav-lang .current { opacity: .85; }
.nav-lang .sep { color: var(--color-neutral-400); }
.nav-lang .other { opacity: .5; cursor: default; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 64px 0 70px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: clamp(40px, 6.2vw, 82px);
  line-height: clamp(43px, 6.7vw, 88px);
  letter-spacing: -0.02em;
  margin: 0 0 0 -0.02em;
  max-width: 24ch;
}
.hero h1 span { display: block; }

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  max-width: 640px;
  margin: 38px 0 0;
  font-size: 17.5px;
  line-height: 28px;
}
.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 17.5px;
  line-height: 28px;
  opacity: 0;
  animation: chipPop .55s cubic-bezier(.2,.9,.25,1) forwards;
}
.chip-see    { background: var(--color-accent-2-100); color: var(--color-accent-2-800); border: 1px solid var(--color-accent-2-300); animation-delay: .25s; }
.chip-flag   { background: var(--color-red-100); color: var(--color-red-700); border: 1px solid var(--color-red-border); animation-delay: .45s; }
.chip-govern { background: var(--color-purple-100); color: var(--color-purple-700); border: 1px solid var(--color-purple-border); animation-delay: .65s; }
@keyframes chipPop {
  0% { opacity: 0; transform: translateY(3px) scale(.96); }
  60% { transform: translateY(0) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .chip { animation: none !important; opacity: 1 !important; }
}

.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* Live agent card */
.agent-card {
  margin-top: 70px;
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  background: var(--color-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-divider);
}
.agent-card-session {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text);
  opacity: .72;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent-600); flex: none; }
.agent-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  padding: 5px 13px 5px 11px;
  font-size: 13.5px;
  background: var(--color-neutral-100);
}
.dot-yellow { width: 6px; height: 6px; border-radius: 50%; background: var(--color-process-yellow); flex: none; }

.agent-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.agent-card-col {
  padding: 26px 24px;
  border-right: 1px solid var(--color-divider);
}
.agent-card-grid > :last-child { border-right: none; }
.agent-card-reason {
  padding: 26px 24px;
  background: var(--color-accent-100);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-neutral-200);
  font-size: 15.5px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}
.kv:last-child { border-bottom: none; }
.kv .k { opacity: .58; }
.quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  line-height: 30px;
  margin: 0;
  color: var(--color-accent-900);
}
.quote-meta { font-size: 14.5px; line-height: 24px; margin: 18px 0 0; color: var(--color-accent-800); }

/* ============================================================
   Section shared
   ============================================================ */
section h2 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}
section > p.lede {
  font-size: 17px;
  line-height: 28px;
  margin: 28px 0 0;
  opacity: .82;
  max-width: 52ch;
}

/* Risk */
.section-risk {
  background: var(--color-accent-2-100);
  padding-block: 70px 84px;
}
.section-risk .eyebrow { color: var(--color-accent-2-700); }
.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
  margin-top: 56px;
}
.risk-card {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  padding: 22px 20px;
}
.risk-card svg { display: block; margin-bottom: 14px; }
.risk-card h3 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: 22px;
  line-height: 28px;
  margin: 0;
  letter-spacing: -0.01em;
}
.risk-card p { font-size: 15.5px; line-height: 28px; margin: 12px 0 0; opacity: .8; }
@media (max-width: 900px) { .risk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .risk-grid { grid-template-columns: 1fr; } }

/* Platform */
.section-platform { padding: 70px 0 84px; }
.section-platform .eyebrow { color: var(--color-accent-700); }
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.platform-card {
  min-height: 280px;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid;
}
.platform-card .num { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.platform-card .big {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 78px 0 0;
}
.platform-card p { font-size: 15.5px; line-height: 28px; margin: 14px 0 0; opacity: .78; }
.platform-card.c1 { background: #EEFAF2; border-color: var(--color-accent-2-300); }
.platform-card.c1 .num, .platform-card.c1 .big { color: var(--color-accent-2-800); }
.platform-card.c2 { background: #FDF3EF; border-color: var(--color-red-border); }
.platform-card.c2 .num, .platform-card.c2 .big { color: var(--color-red-700); }
.platform-card.c3 { background: #F8F3FC; border-color: var(--color-purple-border); }
.platform-card.c3 .num, .platform-card.c3 .big { color: var(--color-purple-700); }
@media (max-width: 900px) { .platform-grid { grid-template-columns: 1fr; } }

/* Workforce / org chart */
.section-floor {
  background: var(--color-neutral-200);
  padding-block: 70px 84px;
}
.section-floor .eyebrow { color: var(--color-accent-700); }
.floor-panel {
  margin-top: 56px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
}
.floor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.floor-head .label { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.floor-head .name { font-family: var(--font-heading); font-weight: var(--font-weight-heading); font-size: 24px; line-height: 32px; margin: 6px 0 0; white-space: nowrap; }
.floor-head .name .role { font-weight: 400; opacity: .62; }
.floor-status {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-accent-600);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  background: var(--color-bg);
}
.floor-status .dot { animation: pulse 2.2s ease-in-out infinite; }
.floor-status span:last-child { font-size: 14px; color: var(--color-accent-800); white-space: nowrap; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.org-tree { margin-top: 32px; overflow-x: auto; }
.org-tree-inner { min-width: 640px; }
.org-stem { position: relative; height: 30px; margin: 0; }
.org-stem::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--color-neutral-400); }
.org-bar { height: 1px; background: var(--color-neutral-400); margin-left: 14px; width: calc(75% + 16px); }

.org-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  margin-top: 0;
}
.org-col-stem { position: relative; height: 26px; }
.org-col-stem::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--color-neutral-400); }
.org-flow {
  position: absolute; left: 12px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-accent-600); animation: flow 2.6s linear infinite;
}
@keyframes flow { 0% { top: -6px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.agent-node {
  position: relative;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: border-color .15s ease;
}
.agent-node:hover { border-color: var(--color-accent-400); }
.agent-node.is-selected { border-color: var(--color-accent-600); box-shadow: inset 0 0 0 1px var(--color-accent-600); }
.agent-node.is-held:hover { border-color: var(--color-process-yellow); }
.agent-node.is-held.is-selected { border-color: var(--color-process-yellow); box-shadow: inset 0 0 0 1px var(--color-process-yellow); }
.agent-node .name { font-family: var(--font-heading); font-weight: var(--font-weight-heading); font-size: 19px; line-height: 26px; margin: 0; }
.agent-node .role { font-size: 14px; line-height: 22px; margin: 2px 0 12px; opacity: .62; }
.agent-node .meta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-size: 13.5px; line-height: 22px; border-top: 1px solid var(--color-divider); padding-top: 8px;
}
.tag { display: inline-flex; align-items: center; font-size: 11px; line-height: 14px; padding: 3px 8px; border-radius: var(--radius-md); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-held { border: 1px solid var(--color-process-yellow); color: var(--color-text); }
.meta .count { opacity: .62; font-variant-numeric: tabular-nums; }

.org-stem-2 { position: relative; height: 22px; }
.org-stem-2::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--color-neutral-300); }
.org-tools { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 14px; }
.tag-outline { display: inline-flex; align-items: center; font-size: 11px; line-height: 14px; padding: 3px 8px; border-radius: var(--radius-md); border: 1px solid var(--color-accent-600); color: var(--color-accent-700); }

.floor-reason {
  margin-top: 36px;
  padding: 22px 20px;
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-divider);
}
.floor-reason .label { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 14px; }
.floor-reason blockquote {
  font-family: var(--font-heading); font-style: italic; font-size: 19px; line-height: 32px;
  margin: 0; max-width: 60ch;
}
.floor-reason .attrib { font-size: 14.5px; line-height: 24px; margin: 14px 0 0; opacity: .7; }
@media (max-width: 760px) { .org-tree-inner { min-width: 560px; } }

/* Contact */
.section-contact {
  background: var(--color-accent-100);
  padding-block: 70px 84px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 42px clamp(28px, 6vw, 96px);
  align-items: start;
}
.section-contact .eyebrow { color: var(--color-accent-800); }
.contact-grid h2 { max-width: 22ch; }
.contact-copy p { font-size: 16px; line-height: 28px; margin: 28px 0 0; opacity: .82; max-width: 40ch; }

.contact-form { display: flex; flex-direction: column; gap: 20px; max-width: 460px; }
.field label { display: block; font-size: 12px; margin-bottom: 5px; opacity: .7; }
.field .input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 14px;
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.field .input::placeholder { color: color-mix(in srgb, var(--color-text) 65%, transparent); opacity: 1; }
.field .input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.field .input:focus-visible { outline: 2px solid var(--color-accent-600); outline-offset: 0; border-color: var(--color-accent-600); }
.contact-form button[type="submit"] { align-self: flex-start; border: none; }

.form-success { display: none; padding: 28px 0; }
.form-success.is-visible { display: block; }
.form-success h3 { font-family: var(--font-heading); font-weight: var(--font-weight-heading); font-size: 24px; line-height: 32px; margin: 0; }
.form-success p { font-size: 15.5px; line-height: 28px; margin: 14px 0 0; opacity: .78; }
.contact-form.is-hidden { display: none; }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; gap: 20px 42px; justify-content: space-between;
  padding: 28px 0 56px; border-top: 1px solid var(--color-text);
  font-size: 13px; line-height: 28px; opacity: .95;
}
.footer-brand { font-family: var(--font-heading); font-weight: var(--font-weight-heading); font-size: 15px; color: var(--color-text); opacity: 1; }
.footer-copy { opacity: .7; }
.footer-links { display: flex; gap: 28px; opacity: .7; }

@media (max-width: 700px) {
  .agent-card-grid { grid-template-columns: 1fr; }
  .agent-card-col { border-right: none; border-bottom: 1px solid var(--color-divider); }
  .floor-head { flex-direction: column; }
}
