/* ============================================================
   Ambient Intelligence — shared design system
   userinterviews.com-inspired: warm serif + green/burgundy.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F6F4F0;
  --surface: #FFFFFF;
  --ink: #1B1B18;
  --muted: #5A5A52;
  --border: #E7E3DB;
  --green: #14614F;
  --green-hover: #0E4A3C;
  --green-tint: #E4EFE9;
  --burgundy: #6E2440;
  --forest-deep: #0F241E;
  --maxw: 1160px;
  --display: 'Space Grotesk', 'Figtree', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
  --shadow-card: 0 1px 2px rgba(20,30,26,0.04), 0 8px 24px rgba(20,30,26,0.06);
  --shadow-lift: 0 12px 32px rgba(20,30,26,0.10);
}

/* ---- Reset / base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
*, *::before, *::after { -webkit-text-size-adjust: 100%; }
img, svg, video, canvas { max-width: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.025em;
}
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--burgundy); letter-spacing: 0; }
a { color: var(--green); }
a[class*="btn"], a.nav-cta { text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--green); font-weight: 700; margin-bottom: 18px;
}

/* ---- Buttons (pills) ---- */
.btn-primary, .btn-outline {
  display: inline-block; font-family: var(--sans); font-size: 15px;
  font-weight: 600; cursor: pointer; border-radius: 999px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--green); color: #fff; border: none; padding: 13px 28px; }
.btn-primary:hover { background: var(--green-hover); }
.btn-outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); padding: 11.5px 26px; }
.btn-outline:hover { background: var(--green-tint); }
.arrow-link { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--green); }
.arrow-pulse, .arrow-chatledger { color: var(--green); }

/* ---- Nav ---- */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: box-shadow .3s ease, border-color .3s ease; }
nav.scrolled { box-shadow: 0 2px 16px rgba(20,30,26,0.06); border-bottom-color: var(--border); }
.nav-container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; height: 78px; }
.nav-logo { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink);
  text-decoration: none; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.nav-logo .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); display: inline-block; }
.nav-links { display: flex; gap: 34px; align-items: center; flex: 1; margin-left: 52px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover { color: var(--green); }
.nav-cta { display: flex; gap: 14px; align-items: center; }

/* ---- Hero ---- */
.hero { margin-top: 78px; padding: 104px 40px 72px; position: relative; overflow: hidden;
  background:
    radial-gradient(680px 380px at 82% -8%, rgba(20,97,79,0.07) 0%, rgba(20,97,79,0) 60%),
    radial-gradient(620px 360px at 12% 8%, rgba(110,36,64,0.05) 0%, rgba(110,36,64,0) 62%),
    var(--bg); }
.hero-container { max-width: 900px; margin: 0 auto; text-align: center; }
.hero-content { opacity: 0; transform: translateY(24px); animation: revealUp .8s ease .1s forwards; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.12; margin-bottom: 24px; }
.hero p { font-size: 18px; color: var(--muted); margin: 0 auto 34px; line-height: 1.7; max-width: 720px; }
.hero-buttons { display: flex; gap: 14px; justify-content: center; margin-bottom: 20px; }
.logo-strip { max-width: 1000px; margin: 40px auto 0; display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  opacity: 0; animation: revealUp .8s ease .3s forwards; }
.logo-strip .brand { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); opacity: 0.55; letter-spacing: -0.02em; }
.logo-strip .brand span { font-family: var(--sans); font-size: 11px; color: var(--muted); }

/* ---- Credentials band (burgundy) ---- */
.credentials-bar { background: var(--burgundy); padding: 34px 40px; }
.credentials-container { max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 36px; text-align: center; }
.credentials-item { color: rgba(255,255,255,0.92); font-size: 14px; font-weight: 500; }

/* ---- Thesis ---- */
.thesis { padding: 96px 40px; background: var(--bg); }
.thesis-container { max-width: 1000px; margin: 0 auto; text-align: center; }
.thesis h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.2; margin: 12px 0 22px; }
.thesis p { font-size: 17px; color: var(--muted); line-height: 1.8; max-width: 780px; margin: 0 auto; }
.thesis-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 56px; text-align: left; }
.thesis-step { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-card); transition: transform .25s ease, box-shadow .25s ease; }
.thesis-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.thesis-step .num { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--green);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.thesis-step h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.thesis-step p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---- Products ---- */
.products { padding: 96px 40px; background: var(--bg-alt); }
.products-head { max-width: var(--maxw); margin: 0 auto 56px; text-align: center; }
.products-head h2 { font-size: clamp(30px, 4vw, 42px); margin: 12px 0 16px; }
.products-head p { font-size: 16px; color: var(--muted); max-width: 720px; margin: 0 auto; line-height: 1.7; }
.product-list { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.product-card { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(24px); animation: revealUp .8s ease forwards; }
.product-card:nth-child(2) { animation-delay: .1s; }
.pc-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.pc-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; margin-bottom: 14px; }
.k-navy, .k-green { color: var(--green); }
.product-card h3 { font-size: 30px; margin-bottom: 8px; }
.pc-tagline { font-size: 15px; font-weight: 600; color: var(--burgundy); margin-bottom: 14px; }
.pc-desc { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pc-tag { background: var(--green-tint); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--green); }
.pc-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pc-visual { padding: 40px; display: flex; align-items: center; justify-content: center; }
.pc-pulse { background: linear-gradient(135deg, var(--forest-deep) 0%, var(--green) 100%); }
.pc-chatledger { background: linear-gradient(135deg, #2A1020 0%, var(--burgundy) 100%); }

/* ---- Industries ---- */
.industries { padding: 96px 40px; background: var(--bg); }
.ind-wrap { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.ind-wrap h2 { font-size: clamp(30px, 4vw, 42px); margin: 12px 0 16px; }
.ind-wrap p { font-size: 16px; color: var(--muted); max-width: 720px; margin: 0 auto 52px; line-height: 1.7; }
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ind-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 20px;
  text-decoration: none; box-shadow: var(--shadow-card); transition: all .2s ease; display: block; }
.ind-tile:hover { border-color: var(--green); transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.ind-tile .ico { font-size: 30px; margin-bottom: 12px; display: flex; justify-content: center; }
.ind-tile .ico svg { width: 40px; height: 40px; }
.ind-tile h3 { font-size: 19px; color: var(--ink); margin-bottom: 4px; }
.ind-tile .via { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ---- Trust band (deep forest) ---- */
.trust-section { background: var(--forest-deep); color: #fff; padding: 96px 40px; }
.trust-container { max-width: var(--maxw); margin: 0 auto; }
.trust-head { text-align: center; margin-bottom: 52px; }
.trust-head .eyebrow { color: #7FC8B0; }
.trust-head h2 { color: #fff; font-size: clamp(28px, 3.6vw, 40px); margin: 12px 0 16px; }
.trust-head p { font-size: 16px; color: rgba(255,255,255,0.75); max-width: 720px; margin: 0 auto; line-height: 1.7; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 28px; }
.trust-card .ti { font-size: 26px; margin-bottom: 12px; }
.trust-card h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.trust-card p { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* ---- CTA ---- */
.cta-section { background: var(--bg-alt); padding: 96px 40px; text-align: center; }
.cta-container { max-width: 720px; margin: 0 auto; }
.cta-section h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 16px; }
.cta-section p { font-size: 16px; color: var(--muted); margin-bottom: 30px; line-height: 1.7; }
.cta-section .btn-primary { padding: 15px 34px; font-size: 15px; }

/* ---- Footer ---- */
footer { background: var(--forest-deep); color: #fff; padding: 60px 40px 32px; }
.footer-container { max-width: var(--maxw); margin: 0 auto 48px; display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
.footer-column h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px;
  font-weight: 700; color: #7FC8B0; }
.footer-column a { display: block; margin-bottom: 12px; font-size: 14px; color: rgba(255,255,255,0.7);
  text-decoration: none; transition: color .2s; }
.footer-column a:hover { color: #fff; }
.footer-brand { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; margin-bottom: 8px; color: #fff; display: flex; align-items: center; gap: 8px; }
.footer-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 32px; text-align: center;
  font-size: 13px; color: rgba(255,255,255,0.5); }

@keyframes revealUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   SVG graphics + motion
   ============================================================ */
@keyframes dashFlow   { to { stroke-dashoffset: -28; } }
@keyframes floatY     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes softPulse  { 0% { transform: scale(.6); opacity:.55; } 70% { transform: scale(1.7); opacity:0; } 100% { opacity:0; } }
@keyframes barGrow    { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* Hero flow pipeline */
.hero-flow { max-width: 720px; margin: 46px auto 0; opacity: 0; transform: translateY(24px);
  animation: revealUp .9s ease .35s forwards; position: relative; z-index: 1; }
.hero-flow svg { width: 100%; height: auto; display: block; overflow: visible; }
.flow-station rect.card { fill: #fff; stroke: var(--border); stroke-width: 1.4; }
.flow-station .st-label { font-family: var(--display); font-weight: 600; font-size: 12px; fill: var(--ink); letter-spacing: -0.01em; }
.flow-line { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 5 7; animation: dashFlow 1.1s linear infinite; opacity: .6; }
.flow-dot { fill: var(--green); }
.wave-bar { fill: var(--green); transform-box: fill-box; transform-origin: center; }
.wave-bar { animation: floatY 1.6s ease-in-out infinite; }
.chip-row { rx: 3; }
.pulse-ring { fill: var(--green); transform-box: fill-box; transform-origin: center; animation: softPulse 2.4s ease-out infinite; }

/* Product illustration scenes */
.pc-illus { width: 100%; max-width: 380px; }
.pc-illus svg { width: 100%; height: auto; display: block; overflow: visible; }
.illus-card { fill: rgba(255,255,255,0.97); }
.illus-soft { fill: rgba(255,255,255,0.14); stroke: rgba(255,255,255,0.28); stroke-width: 1; }
.illus-label { font-family: var(--display); font-weight: 600; font-size: 12.5px; fill: var(--ink); }
.illus-head  { font-family: var(--display); font-weight: 600; font-size: 10px; fill: #8A8A80; letter-spacing: .06em; }
.illus-chip  { font-family: var(--display); font-weight: 600; font-size: 10.5px; fill: #fff; }
.illus-row   { font-family: var(--sans); font-size: 11px; fill: #3A3A36; }
.illus-out   { font-family: var(--display); font-weight: 600; font-size: 12px; fill: var(--green); }
.illus-flow { fill: none; stroke: rgba(255,255,255,0.75); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 5 7; animation: dashFlow 1.15s linear infinite; }
.illus-bar { transform-box: fill-box; transform-origin: bottom; animation: barGrow .9s ease both; }
.live-dot { animation: floatY 2s ease-in-out infinite; }

/* Thesis step icons + connector */
.thesis-steps { position: relative; }
.thesis-connector { position: absolute; top: 52px; left: 12%; right: 12%; height: 2px; z-index: 0; }
.thesis-connector svg { width: 100%; height: 4px; display: block; overflow: visible; }
.thesis-connector .conn { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 6 8;
  opacity: .5; animation: dashFlow 1.4s linear infinite; }
.thesis-step { position: relative; z-index: 1; }
.step-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--green-tint);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step-ico svg { width: 19px; height: 19px; stroke: var(--green); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.thesis-step .num .n { color: var(--muted); font-size: 13px; }

/* Heading underline flourish */
.underline-word { position: relative; white-space: nowrap; }
.underline-word svg { position: absolute; left: 0; right: 0; bottom: -0.34em; width: 100%; height: .32em; overflow: visible; }
.underline-word path { fill: none; stroke: var(--burgundy); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 340; stroke-dashoffset: 340; opacity: .55;
  animation: drawStroke 1s ease .7s forwards; }

@media (prefers-reduced-motion: reduce) {
  *, .flow-line, .illus-flow, .thesis-connector .conn, .wave-bar, .pulse-ring, .live-dot, .underline-word path
  { animation: none !important; }
  .underline-word path { stroke-dashoffset: 0; }
}

/* ---- Hamburger (hidden on desktop) ---- */
.nav-toggle { display: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-container { padding: 0 20px; height: 68px; gap: 8px; }
  .nav-logo { font-size: 15px; flex: 1 1 auto; min-width: 0; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; flex: 0 0 auto; }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green); border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-cta { flex: 0 0 auto; margin-left: 4px; }
  .nav-cta .btn-primary { padding: 10px 16px; font-size: 13px; }
  .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 68px; left: 0; right: 0; margin: 0; padding: 4px 18px 14px;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(10px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.1); border-top: 1px solid var(--border);
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    max-height: calc(100vh - 64px); overflow-y: auto; z-index: 999; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; width: 100%; padding: 15px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .hero { margin-top: 68px; padding: 60px 20px; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn-primary, .hero-buttons .btn-outline { width: 100%; text-align: center; }
  section { padding-left: 20px; padding-right: 20px; }
  section:not(.hero) { padding-top: 64px; padding-bottom: 64px; }
  footer { padding: 48px 20px 28px; }
  h1 { overflow-wrap: break-word; }
  .credentials-container { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .thesis-steps { grid-template-columns: 1fr 1fr; }
  .thesis-connector { display: none; }
  .hero-flow { margin-top: 34px; }
  .product-card { grid-template-columns: 1fr; }
  .pc-visual { order: -1; padding: 32px 28px; }
  .ind-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 430px) {
  .nav-logo { font-size: 14px; }
  .hero h1 { font-size: 29px; }
  .hero p { font-size: 15px; }
  section:not(.hero) { padding-top: 52px; padding-bottom: 52px; }
  .thesis-steps { grid-template-columns: 1fr; }
  .credentials-container { grid-template-columns: 1fr; }
}
