/* ============================================================
   Home + shared page sections
   ============================================================ */

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(52px, 7vw, 92px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 24px 0 0; }
.hero .lede { margin-top: 22px; max-width: 34ch; }
.hero-cta { margin-top: 34px; display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 22px; font-size: 14px; color: var(--ink-faint); display: flex; align-items: center; gap: 9px; }
.hero-note svg { width: 16px; height: 16px; color: var(--cyan-ink); flex: none; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* Invisible-automation diagram (clean, line-based — no glow) */
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 26px; position: relative; }
.flow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.flow-title { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--ink-strong); }
.flow-badge { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--cyan-ink); background: var(--cyan-wash); padding: 5px 11px; border-radius: 100px; display: inline-flex; align-items: center; gap: 6px; }
.flow-badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
@media (prefers-reduced-motion: no-preference) { .js .flow-badge .pulse { animation: pulse 2s ease-in-out infinite; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.flow-body { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.flow-col { display: flex; flex-direction: column; gap: 12px; }
.tool { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); transition: border-color .3s, transform .3s; }
.js .reveal.in .tool { animation: none; }
.tool .t-ico { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 13px; }
.tool .t-name { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.tool .t-sub { font-size: 11px; color: var(--ink-faint); }
.flow-core { width: 92px; height: 92px; border-radius: 18px; background: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-md); position: relative; z-index: 2; }
.flow-core img { width: 52px; height: 52px; }
.flow-core::after { content: "always on"; position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.flow-lines { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.flow-lines path { fill: none; stroke: var(--cyan); stroke-width: 1.6; opacity: 0.5; stroke-dasharray: 5 5; }
@media (prefers-reduced-motion: no-preference) { .js .flow-lines path { animation: dash 1.4s linear infinite; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
.flow-foot { margin-top: 26px; display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.flow-stat .fs-n { font-family: var(--font-head); font-size: 20px; font-weight: 600; color: var(--ink-strong); }
.flow-stat .fs-l { font-size: 12px; color: var(--ink-soft); }
@media (max-width: 460px) {
  .flow-body { grid-template-columns: 1fr; gap: 22px; position: relative; z-index: 0; }
  .flow-lines { display: none; }
  .flow-core { margin: 0 auto; }
  .flow-core::after { display: none; }
  .flow-body::before {
    content: ""; position: absolute; top: 6px; bottom: 6px; left: 50%;
    border-left: 1.6px dashed var(--cyan); opacity: 0.5; z-index: -1;
  }
}

/* ---------- Problem band ---------- */
.problem { background: var(--band); }
.problem-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 68px); align-items: start; }
.problem-grid .h2 { color: #fff; margin-top: 18px; }
.problem-body { display: flex; flex-direction: column; gap: 18px; }
.problem-body p { color: var(--on-band-soft); font-size: 17.5px; line-height: 1.62; }
.problem-body p strong { color: #fff; font-weight: 600; }
@media (max-width: 780px) { .problem-grid { grid-template-columns: 1fr; } }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 30px; border-top: 2px solid var(--line); }
.step .step-bar { position: absolute; top: -2px; left: 0; width: 46px; height: 2px; background: var(--cyan); }
.step-n { font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan-ink); }
.step h3 { margin: 12px 0 12px; }
.step p { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- Before / After ---------- */
.ba { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.ba-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ba-toggle { display: inline-flex; padding: 4px; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 100px; gap: 4px; }
.ba-toggle button { border: 0; background: transparent; color: var(--ink-soft); font-family: var(--font-body); font-weight: 600; font-size: 14px; padding: 9px 17px; border-radius: 100px; transition: background .3s, color .3s, box-shadow .3s; }
.ba-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink-strong); box-shadow: var(--shadow-sm); }
.ba-metric { text-align: right; }
@media (min-width: 761px) { .ba-metric { min-width: 330px; } }
.ba-metric .num { position: relative; height: 1em; font-family: var(--font-head); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; transition: color .4s; white-space: nowrap; }
.ba-metric .cap { position: relative; min-height: 16px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
[data-ba="before"] .ba-metric .num { color: var(--orange-ink); }
[data-ba="after"] .ba-metric .num { color: var(--cyan-ink); }

.ba-stage { padding: 36px 24px 40px; }
.ba-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.ba-line { position: absolute; top: 27px; left: 9%; right: 9%; height: 2px; z-index: 0; }
.ba-line::before { content: ""; position: absolute; inset: 0; border-top: 2px dashed var(--orange); opacity: 1; transition: opacity .45s; }
.ba-line::after { content: ""; position: absolute; inset: 0; border-top: 2px solid var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
[data-ba="after"] .ba-line::before { opacity: 0; }
[data-ba="after"] .ba-line::after { transform: scaleX(1); }
.ba-node { position: relative; z-index: 1; text-align: center; }
.ba-node .ico { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 15px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--orange); color: var(--orange-ink); transition: border-color .45s, color .45s, box-shadow .45s; }
[data-ba="after"] .ba-node .ico { border-color: var(--cyan); color: var(--cyan-ink); box-shadow: 0 0 0 6px var(--cyan-wash); }
.ba-node .ico svg { width: 23px; height: 23px; }
.ba-step { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.ba-node h4 { font-family: var(--font-head); font-weight: 600; font-size: 16px; margin-bottom: 10px; color: var(--ink-strong); }
.ba-swap { position: relative; min-height: 82px; }
.ba-state { position: absolute; inset: 0; transition: opacity .4s, transform .4s; }
.ba-state.bf { opacity: 1; } .ba-state.af { opacity: 0; transform: translateY(6px); }
[data-ba="after"] .ba-state.bf { opacity: 0; transform: translateY(-6px); }
[data-ba="after"] .ba-state.af { opacity: 1; transform: none; }
.ba-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 100px; letter-spacing: 0.02em; }
.ba-tag.manual { background: var(--orange-wash); color: var(--orange-ink); border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); }
.ba-tag.auto { background: var(--cyan-wash); color: var(--cyan-ink); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); }
.ba-sub { font-size: 13px; color: var(--ink-soft); margin-top: 9px; line-height: 1.4; }
@media (max-width: 760px) {
  .ba-flow { grid-template-columns: 1fr; gap: 26px; }
  .ba-line { display: none; }
  .ba-node { display: grid; grid-template-columns: 54px 1fr; gap: 15px; text-align: left; align-items: start; }
  .ba-node .ico { margin: 0; }
  .ba-swap { min-height: 0; position: static; }
  .ba-state { position: static; } .ba-state.af { display: none; }
  [data-ba="after"] .ba-state.bf { display: none; }
  [data-ba="after"] .ba-state.af { display: block; opacity: 1; transform: none; }
  .ba-metric { width: 100%; }
}

/* ---------- Proof teaser ---------- */
.proof-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px,5vw,64px); align-items: center; }
.proof-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 32px; }
.proof-card .pc-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan-ink); }
.proof-card .pc-n { font-family: var(--font-head); font-size: clamp(34px, 4.5vw, 50px); font-weight: 600; letter-spacing: -0.03em; color: var(--ink-strong); margin: 14px 0 6px; line-height: 1; }
.proof-card .pc-desc { color: var(--ink-soft); font-size: 16px; }
.proof-card .pc-meta { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); display: flex; align-items: center; gap: 8px; }
@media (max-width: 820px) { .proof-grid { grid-template-columns: 1fr; } }

/* ---------- Why (navy band) ---------- */
.why { background: var(--band-2); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; }
.why .h2 { color: #fff; }
.why p { color: var(--on-band-soft); font-size: 17.5px; margin-top: 20px; line-height: 1.62; }
.why-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.why-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-band); font-size: 16px; }
.why-points svg { width: 20px; height: 20px; color: var(--cyan-on-band); flex: none; margin-top: 3px; }
@media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; gap: 28px; } }
