/* Author: Sunil Jain, 2026-10-28 — Shared Aggie presentation for the public Home page. */
:root{color-scheme:light;--ink:#233746;--muted:#556878;--border:#dee6eb;--bg:#f6f8fa;--accent:#167e88;--white:#fff}*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px;line-height:1.5}
a{text-decoration:none;color:inherit}a:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:5px}
.site-top{min-height:72px;background:#fff;border-bottom:1px solid var(--border);padding:12px max(22px,calc((100vw - 1240px)/2));display:flex;align-items:center;gap:28px}
.brand{font-weight:850;font-size:27px;letter-spacing:-1.5px;display:flex;align-items:center;gap:9px}.brand-mark{height:24px;width:10px;background:var(--accent);border-radius:8px}

main{max-width:1240px;margin:auto;padding:0 22px}.hero{padding:66px 0 52px}
.eyebrow{font-size:12px;letter-spacing:.13em;font-weight:800;color:var(--accent);margin:0 0 13px}.hero h1{font-size:clamp(39px,5.2vw,67px);line-height:1.04;letter-spacing:-.055em;margin:0}.hero h1 em{font-style:normal;color:var(--accent)}.lead{font-size:19px;color:var(--muted);max-width:600px;line-height:1.6;margin:24px 0}


.journey{padding:0 0 56px}.section-title{margin-bottom:18px}.section-title h2{font-size:13px;letter-spacing:.13em;font-weight:850;color:var(--accent);margin:0}
.phase-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.phase{background:#fff;border:1px solid var(--border);border-top:4px solid var(--color);border-radius:12px;padding:19px 18px;min-height:165px;display:flex;flex-direction:column;box-shadow:0 2px 8px #17334708;transition:transform .15s,border-color .15s}.phase:hover{transform:translateY(-3px);border-color:var(--color)}.phase-num{color:var(--color);font-size:15px;font-weight:850}.phase h3{font-size:19px;margin:18px 0 7px;letter-spacing:-.02em}.phase p{font-size:14px;color:var(--muted);margin:0}
footer{border-top:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:24px max(22px,calc((100vw - 1240px)/2));font-size:13px;color:#657785}footer strong{color:var(--accent);font-size:19px;letter-spacing:-.05em}footer span:last-child{margin-left:auto}
@media(max-width:1100px){.phase-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){.hero{padding:42px 0 34px}.phase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-top{flex-wrap:wrap;gap:8px;padding:13px 18px}}
@media(max-width:440px){.phase-grid{grid-template-columns:1fr}.phase{min-height:160px}.phase h3{margin-top:9px}.hero h1{font-size:39px}footer{flex-wrap:wrap}footer span:last-child{margin-left:0}}
@media(prefers-reduced-motion:reduce){.phase{transition:none}}


/* Aggie stays quiet until requested. The chapter grid remains unchanged. */
.aggie-invite{display:inline-flex;align-items:center;gap:9px;vertical-align:middle;margin:6px 0 0;padding:5px 8px 5px 4px;border:0;border-radius:18px;background:transparent;color:#087f79;font:inherit;font-size:19px;font-weight:800;cursor:pointer;text-decoration:underline;text-decoration-color:#a8d3d1;text-underline-offset:5px}
.aggie-invite:hover,.aggie-invite:focus-visible{background:#e7f4f1;text-decoration-color:#087f79;outline-offset:3px}
.aggie-face,.aggie-chat-face{display:inline-grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#ffd648 6%,#ff916b 53%,#ef70c4 100%);box-shadow:0 2px 10px #ef70c455;font-size:28px;width:41px;height:41px;line-height:1;transform-origin:50% 80%}
.aggie-face{animation:aggie-wiggle 4.8s ease-in-out infinite}
@keyframes aggie-wiggle{0%,82%,100%{transform:rotate(0)}85%{transform:rotate(-14deg)}89%{transform:rotate(13deg)}93%{transform:rotate(-8deg)}97%{transform:rotate(6deg)}}
.aggie-chat[hidden]{display:none!important}
.aggie-chat{position:fixed;z-index:30;right:22px;bottom:22px;width:min(390px,calc(100vw - 28px));height:min(540px,calc(100dvh - 28px));display:flex;flex-direction:column;background:#fff;border:1px solid #bfd7d9;border-radius:16px;box-shadow:0 16px 50px #132e4140;overflow:hidden;color:var(--ink)}
.aggie-top{display:flex;align-items:center;justify-content:space-between;background:#e7f6f3;border-bottom:1px solid #cce3e0;padding:10px 14px}.aggie-identity{display:flex;align-items:center;gap:10px;font-size:18px}.aggie-chat-face{width:34px;height:34px;font-size:24px}.aggie-bot-note{font-size:12px;color:#59717b;font-weight:500}.aggie-close{border:0;background:transparent;color:#314c55;font-size:30px;width:44px;height:44px;cursor:pointer;line-height:1;border-radius:8px}.aggie-close:hover{background:#d4ece8}
.aggie-messages{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.aggie-msg{white-space:pre-wrap;overflow-wrap:anywhere;border-radius:12px;padding:10px 13px;margin:0;max-width:94%;font-size:15px;line-height:1.5}.aggie-msg-bot{align-self:flex-start;background:#eaf5f3}.aggie-msg-user{align-self:flex-end;background:#176c72;color:#fff}
.aggie-compose{padding:12px 14px 10px;border-top:1px solid #dce8e9;background:#fff}.aggie-label{display:block;font-size:13px;font-weight:750;margin-bottom:6px}.aggie-compose-row{display:flex;gap:9px;align-items:flex-end}.aggie-compose textarea{flex:1;min-width:0;resize:vertical;max-height:120px;min-height:62px;border:1px solid #acbfc5;border-radius:8px;padding:10px;font:inherit;font-size:16px;color:var(--ink)}.aggie-send{background:#176c72;color:#fff;min-width:66px;min-height:46px;border:0;border-radius:8px;font-weight:750;cursor:pointer}.aggie-send:disabled{opacity:.5;cursor:wait}.aggie-status{font-size:12px;color:#627781;margin:7px 0 0}.aggie-status.is-error{color:#9a341c}
@media(max-width:600px){.aggie-chat{right:7px;bottom:7px;width:calc(100vw - 14px);height:min(570px,calc(100dvh - 14px))}.aggie-invite{font-size:17px}.aggie-messages{padding:12px}}
@media(prefers-reduced-motion:reduce){.aggie-face{animation:none}}

/* Chapter accents live in CSS so the public CSP does not block them. */
.phase-01{--color:#16869A}
.phase-02{--color:#326DB3}
.phase-03{--color:#7759B2}
.phase-04{--color:#A87A25}
.phase-05{--color:#C76B3D}
.phase-06{--color:#16847D}
.phase-07{--color:#3C855E}
.phase-08{--color:#B34E7A}
.phase-09{--color:#566F91}
.phase-10{--color:#28323B}

/* Home and all chapters use the same full-height chat geometry. */
#aggie-chat {
  position:fixed; z-index:3000; top:12px; right:12px; bottom:12px;
  width:min(510px,calc(100vw - 24px)); height:calc(100dvh - 24px);
  max-height:none; min-height:0; display:flex; flex-direction:column;
  box-sizing:border-box; overflow:hidden;
}
#aggie-chat[hidden] {display:none!important}
#aggie-messages {flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain}
#aggie-chat .aggie-top,#aggie-chat .aggie-compose {flex:0 0 auto}
@media(max-width:600px) {
  #aggie-chat {top:5px;right:5px;bottom:5px;width:calc(100vw - 10px);height:calc(100dvh - 10px);max-height:none}
}


/* v43: Public, collapsed-by-default product rationale. No JavaScript required. */
.factory-why{position:relative;isolation:isolate;max-width:920px;margin:0 auto 68px;border-radius:14px}
.why-details{position:relative;z-index:1;background:rgba(255,255,255,.68);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:0 2px 12px #14354908}
.why-details summary{list-style:none;cursor:pointer;padding:23px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.why-details summary::-webkit-details-marker{display:none}
.why-details summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.why-details summary>span:first-child{display:flex;flex-direction:column;gap:4px}
.why-eyebrow{font-size:11px;letter-spacing:.13em;font-weight:800;color:var(--accent)}
.why-details summary strong{font-size:24px;letter-spacing:-.035em;color:var(--ink)}
.why-subtitle{font-size:14px;color:var(--muted)}
.why-toggle{flex:0 0 40px;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--border);border-radius:50%;font-size:26px;color:var(--accent)}
.why-details[open] .why-toggle{transform:rotate(45deg)}
.why-content{border-top:1px solid var(--border);padding:4px 28px 26px;background:rgba(255,255,255,.38)}
.why-content article{padding:20px 0 12px;border-bottom:1px solid var(--border)}
.why-content article:last-child{border-bottom:0}
.why-content h3{font-size:21px;letter-spacing:-.03em;margin:0 0 12px}
.why-content p{color:#425768;line-height:1.7;max-width:76ch}
.why-content blockquote{margin:22px 0;padding:15px 20px;border-left:4px solid var(--accent);background:#eef7f7;color:#254957;font-weight:650}
.why-content ol{padding-left:22px}.why-content li{margin:10px 0;color:#425768}
.why-content .why-note{font-size:13px;color:#61727e;margin-top:18px}
@media(max-width:600px){.factory-why{margin-bottom:38px}.why-details summary{padding:19px}.why-content{padding:4px 19px 20px}}

footer a{margin-left:auto;color:var(--accent);text-decoration:underline;text-underline-offset:3px}footer a:focus-visible{outline:2px solid currentColor;outline-offset:4px}

/* v43.2.1: Existing fabric threads now sit behind the collapsible Why Agiparel panel. */
.fabric-wave-art{position:absolute;inset:0;z-index:0;overflow:hidden;border-radius:14px;pointer-events:none;background:linear-gradient(130deg,#f5f8fa,#e9f4f4 54%,#e9f0f8)}
.fabric-wave-art canvas{display:block;width:100%;height:100%;pointer-events:none}
@media(prefers-reduced-motion:reduce){.fabric-wave-art canvas{transition:none}}

/* v43.2.2: public navigation only. Existing hero, chapters and fabric waves unchanged. */
.site-links{display:flex;align-items:center;gap:20px;margin-left:auto;white-space:nowrap}
.site-link{font-size:14px;font-weight:650;color:#344d5c;display:inline-flex;align-items:center;gap:6px;min-height:40px}
.site-link:hover{color:var(--accent)}
.account-symbol{width:19px;height:19px;flex:0 0 auto}
.site-register{background:var(--accent);color:#fff;font-size:14px;font-weight:750;padding:10px 16px;border-radius:9px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}
.site-register:hover{background:#0d646e}
@media(max-width:550px){.site-top{flex-wrap:wrap;gap:9px}.site-links{margin-left:auto;gap:11px}.site-link,.site-register{font-size:12px}.site-register{padding:9px 11px}.account-symbol{width:17px;height:17px}}
@media(max-width:360px){.site-links{width:100%;justify-content:space-between}.site-top{padding:10px 15px}}
/* About and account entry pages reuse the exact public color palette. */
.about-main{max-width:1050px;margin:0 auto;padding:0 22px 66px}
.about-intro{padding:62px 0 24px;max-width:770px}
.about-intro h1,.account-intro h1{font-size:clamp(34px,5.1vw,58px);line-height:1.1;letter-spacing:-.045em;margin:0 0 22px}
.about-intro h1 em{font-style:normal;color:var(--accent)}
.about-intro p,.account-intro p{font-size:18px;color:var(--muted);line-height:1.65}
.about-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0 32px}
.about-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px}
.about-card .eyebrow{margin-bottom:16px}.about-card h2{font-size:22px;letter-spacing:-.035em;margin:0 0 12px}
.about-card p{color:var(--muted);margin:0;font-size:15px;line-height:1.65}
.about-note{background:#eaf4f5;border-left:4px solid var(--accent);padding:20px 24px;border-radius:0 10px 10px 0;max-width:900px;color:#304f5d;line-height:1.65}
.about-note p{margin:0}
.about-back{display:inline-flex;margin:24px 0 0;font-weight:700;color:var(--accent)}
.account-main{min-height:min(70vh,560px);max-width:760px;margin:0 auto;padding:60px 22px}
.account-panel{background:#fff;border:1px solid var(--border);border-radius:16px;padding:32px;box-shadow:0 8px 26px #1435490a}
.account-intro .eyebrow{font-size:12px}.account-intro h1{font-size:clamp(32px,4vw,46px)}
.account-status{background:#edf5f5;color:#35535e;border-left:4px solid var(--accent);padding:16px 18px;border-radius:0 8px 8px 0;font-size:15px;line-height:1.65}
.account-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:24px}.account-actions a{padding:11px 18px;border-radius:9px;font-weight:700;border:1px solid var(--border)}.account-actions .primary{background:var(--accent);color:white;border-color:var(--accent)}
@media(max-width:700px){.about-grid{grid-template-columns:1fr}.about-intro{padding-top:40px}.account-main{padding-top:34px}.account-panel{padding:24px}}
