/* ============================================================
   AroWise Automation: homepage styles (dynamic)
   TEROS Digital base + motion layer. Motion concentrates in the
   hero; the rest stays calm. Honors prefers-reduced-motion.
   ============================================================ */
:root {
  --void:#000000; --canvas:#0A0A0B; --surface:#161618; --raised:#1F1F22; --oscura:#2D2D2D;
  --text:#E8E4DD; --text-dim:#EDE8DF;
  --steel:#b0bec5; --muted:#9aa4b2; --border:#2A2A2E; --border-2:#3a3a40;
  --teal:#00cbbb; --teal-deep:#005f63; --red:#c33a2d; --ember:#a9473c; --gold:#c9a14a;
  --font:"Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw:1080px; --gap:22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 400;
  color: var(--text); background: var(--canvas); line-height: 1.55;
  -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 740px; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.kicker { font-family: var(--mono); font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--teal); margin: 0 0 16px; }
.kicker.center { text-align: center; }

/* buttons */
.btn { display: inline-block; font-family: var(--font); font-weight: 500; font-size: 1rem; padding: 14px 26px; cursor: pointer; border: 1px solid transparent; transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-primary { background: var(--teal); color: #06100f; font-weight: 700; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.btn-primary:hover { background: #1ad8c8; box-shadow: 0 0 0 1px var(--teal), 0 0 22px -2px color-mix(in srgb, var(--teal) 70%, transparent); transform: translateY(-1px); }
.btn-sm.btn-primary { clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 18px -6px color-mix(in srgb, var(--teal) 60%, transparent); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--canvas) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--text); white-space: nowrap; }
.wordmark span { color: var(--teal); }
.wordmark.small { font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--muted); font-weight: 400; font-size: .94rem; }
.nav a:not(.btn):hover { color: var(--text); }

/* ============ HERO (dynamic) ============ */
.hero { position: relative; padding: 112px 0 86px; overflow: hidden; background: linear-gradient(180deg, var(--void), var(--canvas) 46%); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }

/* amorphous, morphing aurora blobs (bolder + faster) */
.aurora { position: absolute; filter: blur(82px); mix-blend-mode: screen; will-change: transform, border-radius; }
.aurora-1 { width: 540px; height: 500px; top: -170px; right: -70px; background: var(--teal); opacity: .32; animation: blob1 15s ease-in-out infinite alternate; }
.aurora-2 { width: 480px; height: 460px; bottom: -190px; left: -90px; background: var(--red); opacity: .26; animation: blob2 18s ease-in-out infinite alternate; }
.aurora-3 { width: 320px; height: 300px; top: 18%; left: 44%; background: var(--teal); opacity: .16; animation: blob3 12s ease-in-out infinite alternate; }
@keyframes blob1 {
  0%   { border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%; transform: translate(0,0) scale(1) rotate(0deg); }
  50%  { border-radius: 64% 36% 38% 62% / 56% 62% 38% 44%; transform: translate(-46px,38px) scale(1.14) rotate(18deg); }
  100% { border-radius: 38% 62% 52% 48% / 48% 42% 58% 52%; transform: translate(28px,-26px) scale(1.05) rotate(-10deg); }
}
@keyframes blob2 {
  0%   { border-radius: 58% 42% 40% 60% / 48% 56% 44% 52%; transform: translate(0,0) scale(1) rotate(0deg); }
  50%  { border-radius: 40% 60% 62% 38% / 60% 40% 60% 40%; transform: translate(54px,-32px) scale(1.16) rotate(-16deg); }
  100% { border-radius: 52% 48% 46% 54% / 44% 58% 42% 56%; transform: translate(-30px,30px) scale(1.06) rotate(12deg); }
}
@keyframes blob3 {
  0%   { border-radius: 46% 54% 56% 44% / 52% 46% 54% 48%; transform: translate(0,0) scale(1); }
  50%  { border-radius: 60% 40% 44% 56% / 40% 60% 40% 60%; transform: translate(36px,28px) scale(1.2); }
  100% { border-radius: 44% 56% 52% 48% / 56% 44% 56% 44%; transform: translate(-24px,-22px) scale(1.08); }
}

/* faint schematic dot grid (kept) */
.hero-bg::before { content: ""; position: absolute; inset: 0; opacity: .45; background-image: radial-gradient(color-mix(in srgb, var(--steel) 16%, transparent) 1px, transparent 1px); background-size: 30px 30px; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 72%); mask-image: linear-gradient(180deg, #000 0%, transparent 72%); }

.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--teal); }
.rotator { display: inline-block; }
.rotator-word { display: inline-block; transition: opacity .3s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.rotator-word.out { opacity: 0; transform: translateY(10px); }

.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--steel); max-width: 620px; margin-top: 6px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 32px 0 18px; }
.hero-actions.center { justify-content: center; }
.hero-note { color: var(--muted); font-size: .9rem; font-family: var(--mono); letter-spacing: .01em; }

.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 9px; vertical-align: middle; box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 70%, transparent); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* gentle hero-CTA pulse (marketing surface) */
.hero .hero-actions .btn-primary { animation: cta-glow 3.2s ease-in-out infinite; }
@keyframes cta-glow { 0%,100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 24px -4px color-mix(in srgb, var(--teal) 55%, transparent); } }

/* ============ stat counter band ============ */
.statband { padding: 58px 0; background: var(--canvas); border-bottom: 1px solid var(--border); }
.stat-line { font-weight: 700; line-height: 1; margin: 0 0 12px; }
.stat-num { font-size: clamp(3.4rem, 10vw, 6.2rem); color: var(--teal); letter-spacing: -0.04em; }
.stat-suffix { font-size: clamp(1.4rem, 3.4vw, 2.1rem); color: var(--text); margin-left: .12em; font-weight: 500; }
.stat-cap { color: var(--muted); font-family: var(--mono); font-size: .9rem; letter-spacing: .02em; margin: 0; }

/* ============ sections ============ */
.section { padding: 84px 0; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
.section-title.center { text-align: center; }
.section-sub { color: var(--steel); font-size: 1.1rem; }
.section-sub.center { text-align: center; max-width: 620px; margin-left: auto; margin-right: auto; }
.section-sub.strong { color: var(--text); font-weight: 500; }
.problem { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); margin-top: 46px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); padding: 28px; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease, background .2s ease; }
.card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 14px; height: 14px; border-top: 2px solid var(--teal); border-left: 2px solid var(--teal); opacity: .4; transition: opacity .2s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); background: var(--raised); box-shadow: 0 0 28px -10px color-mix(in srgb, var(--teal) 45%, transparent); }
.card:hover::before { opacity: 1; }
.card:last-child { grid-column: 1 / -1; }
.card-tag { display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); padding: 4px 10px; margin-bottom: 15px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%); }
.card h3 { font-size: 1.22rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.work-foot { text-align: center; color: var(--muted); font-size: .98rem; max-width: 620px; margin: 36px auto 0; }
.contact { background: var(--surface); border-top: 1px solid var(--border); }

/* footer */
.site-footer { background: var(--void); color: var(--muted); padding: 28px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-meta { font-size: .82rem; font-family: var(--mono); letter-spacing: .02em; }

/* ============ scroll reveals (no-JS safe: only hide when html.js) ============ */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }

/* ============ responsive ============ */
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .card:last-child { grid-column: auto; } }
@media (max-width: 620px) {
  .nav a:not(.btn) { display: none; }
  .wordmark { font-size: 1.12rem; }
  .hero { padding: 78px 0 60px; }
  .section { padding: 60px 0; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .aurora, .pulse-dot, .hero .hero-actions .btn-primary { animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
