/* Home page story: plain-language sections and their animations. Tokens come from app.css. */

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.story-hero { padding-bottom: 5rem; }
.hero-points { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.hero-points li { color: #8ea0bf; font-size: .88rem; border-left: 2px solid rgba(34, 211, 238, .5); padding-left: .8rem; }
.hero-points strong { display: block; color: #fff; font-size: 1rem; margin-bottom: .15rem; }

.hq-stage { position: relative; }
.hq { width: 100%; height: auto; display: block; animation: hq-float 7s ease-in-out infinite; }
.hq-wall { fill: rgba(255, 255, 255, .04); stroke: rgba(148, 178, 230, .45); stroke-width: 2; }
.hq-windows rect { fill: rgba(122, 162, 255, .16); stroke: rgba(148, 178, 230, .35); }
.hq-windows rect:nth-child(2n) { animation: hq-window 5s ease-in-out infinite; }
.hq-windows rect:nth-child(3n) { animation: hq-window 6s 1.5s ease-in-out infinite; }
.hq-server { fill: #13203d; stroke: #3b5a96; stroke-width: 2; }
.hq-slots rect { fill: #1e3a6b; }
.hq-leds circle { fill: var(--brand-2); filter: drop-shadow(0 0 4px var(--brand-2)); animation: pulse 2.2s infinite; }
.hq-leds circle:nth-child(2) { animation-delay: .5s; } .hq-leds circle:nth-child(3) { animation-delay: 1s; } .hq-leds circle:nth-child(4) { animation-delay: 1.5s; }
.hq-path { fill: none; stroke: rgba(34, 211, 238, .25); stroke-width: 1.5; stroke-dasharray: 3 5; }
.hq-packet { fill: var(--brand-2); filter: drop-shadow(0 0 6px var(--brand-2)); }
.hq-shield path:first-child { fill: rgba(34, 211, 238, .14); stroke: var(--brand-2); stroke-width: 2; }
.hq-tick { fill: none; stroke: var(--brand-2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: hq-draw 4s ease-in-out infinite; }
.hq-cloud path { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; }
.hq-cloud line { stroke: #ff6b7a; stroke-width: 3; stroke-linecap: round; }

.chat-card { position: absolute; left: -6%; bottom: -4%; width: min(330px, 88%); background: rgba(13, 22, 42, .92); border: 1px solid rgba(148, 178, 230, .25); border-radius: 14px; padding: .9rem 1rem; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); backdrop-filter: blur(6px); }
.chat-line { font-size: .88rem; min-height: 2.6em; color: #e8ecf1; }
.chat-line + .chat-line { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid rgba(148, 178, 230, .15); }
.chat-line .who { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8ea0bf; }
.chat-line.ai .who { color: var(--brand-2); }
.chat-line .typing::after { content: "▍"; margin-left: 1px; animation: blink 1s steps(2) infinite; color: var(--brand-2); }

/* ---------- industries ---------- */
.sector-band { border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 1.1rem 0; }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { color: var(--text-3); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

/* ---------- problem / answer scenes ---------- */
.story-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.story-split.reverse { grid-template-columns: .95fr 1.05fr; }
.problem-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.problem-list li { display: flex; gap: .9rem; align-items: flex-start; color: var(--text-2); font-size: .95rem; }
.problem-list strong { display: block; color: var(--text); }
.ico { flex: none; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.ico.warn { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .65rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 999px; background: color-mix(in srgb, var(--ok) 16%, transparent); }
.ticks li::after { content: ""; position: absolute; left: .42rem; top: .42em; width: .32rem; height: .6rem; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.answer-band { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }

.scene { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow); }
.scene-svg { width: 100%; height: auto; display: block; }
.sc-building { fill: color-mix(in srgb, var(--brand) 6%, transparent); stroke: var(--text-3); stroke-width: 2; }
.sc-building.safe { stroke: var(--ok); fill: color-mix(in srgb, var(--ok) 6%, transparent); }
.sc-desk { fill: var(--surface-2); stroke: var(--text-3); stroke-width: 1.5; }
.sc-server { fill: var(--navy-2); stroke: var(--brand); stroke-width: 2; }
.sc-led { fill: var(--brand-2); animation: pulse 2s infinite; }
.sc-cloud path { fill: var(--surface-2); stroke: var(--text-3); stroke-width: 1.5; }
.sc-cloud text, .sc-label { fill: var(--text-3); font: 600 11px var(--font); }
.sc-path { fill: none; stroke-width: 2; stroke-dasharray: 5 6; animation: dash 1.2s linear infinite; }
.sc-path.bad { stroke: var(--err); }
.sc-path.good { stroke: var(--ok); }
.sc-doc rect { fill: var(--surface); stroke-width: 2; }
.sc-doc line { stroke-width: 1.5; }
.sc-doc.bad rect, .sc-doc.bad line { stroke: var(--err); }
.sc-doc.good rect, .sc-doc.good line { stroke: var(--ok); }
.sc-lock rect { fill: color-mix(in srgb, var(--ok) 18%, transparent); stroke: var(--ok); stroke-width: 2; }
.sc-lock path { fill: none; stroke: var(--ok); stroke-width: 2.5; }

/* ---------- workday ---------- */
.workday { list-style: none; padding: 0; margin: 0 auto 1rem; max-width: 920px; display: grid; gap: 1rem; position: relative; }
.workday::before { content: ""; position: absolute; left: 119px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), var(--brand-2)); opacity: .35; }
.workday li { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; align-items: start; }
.wd-meta { text-align: right; padding-top: .9rem; padding-right: 1.6rem; position: relative; }
.wd-meta::after { content: ""; position: absolute; right: -7px; top: 1.2rem; width: 12px; height: 12px; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.wd-time { display: block; font-weight: 800; font-size: 1.05rem; }
.wd-team { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; }
.wd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: .55rem; }
.say { margin: 0; padding: .6rem .85rem; border-radius: 14px; max-width: 78%; font-size: .95rem; }
.say.you { background: var(--surface-2); justify-self: start; border-bottom-left-radius: 4px; }
.say.ai { background: var(--brand); color: var(--brand-ink); justify-self: end; border-bottom-right-radius: 4px; }
.workday li .say { opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.workday li.in .say.you { opacity: 1; transform: none; transition-delay: .25s; }
.workday li.in .say.ai { opacity: 1; transform: none; transition-delay: .9s; }

/* ---------- places, journey, sizes, trust ---------- */
.place-ico, .trust-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: .9rem; }
.story-icon { width: 24px; height: 24px; }
.place-card .best { font-size: .85rem; font-weight: 600; color: var(--text); margin: 0; padding-top: .75rem; border-top: 1px solid var(--line); }
.card.reveal:hover, .size-card:hover { transform: translateY(-4px); }
.place-card, .size-card { transition: transform .3s var(--ease), box-shadow .3s, opacity .7s var(--ease); }

.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.journey::before { content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px; background: var(--line); }
.journey::after { content: ""; position: absolute; top: 22px; left: 22px; height: 2px; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 2.4s var(--ease) .3s; }
.journey.in-view::after { width: calc(100% - 44px); }
.journey li { position: relative; z-index: 1; }
.j-num { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); margin-bottom: 1rem; }
.journey li.in .j-num { animation: story-pop .6s var(--ease); }
.journey li:nth-child(2) { transition-delay: .25s; } .journey li:nth-child(3) { transition-delay: .5s; } .journey li:nth-child(4) { transition-delay: .75s; }

.size-card { display: flex; flex-direction: column; gap: .2rem; color: var(--text); }
.size-card:hover { color: var(--text); border-color: var(--brand); }
.size-people { font-size: .78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.size-go { margin-top: auto; font-weight: 600; color: var(--brand); font-size: .9rem; }

.trust h3 { font-size: 1.05rem; }
.it-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- questions and talk ---------- */
.faq-plain details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq-plain summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-plain summary::-webkit-details-marker { display: none; }
.faq-plain summary::after { content: "+"; color: var(--brand); font-weight: 800; transition: transform .25s; }
.faq-plain details[open] summary::after { transform: rotate(45deg); }
.faq-plain details p { color: var(--text-2); margin: .75rem 0 0; }
.talk-band { background: radial-gradient(700px 360px at 90% 0%, var(--brand-soft), transparent 70%), var(--bg-2); }

/* ---------- keyframes ---------- */
@keyframes hq-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes hq-window { 0%, 100% { fill: rgba(122, 162, 255, .16); } 50% { fill: rgba(250, 214, 120, .35); } }
@keyframes hq-draw { 0%, 15% { stroke-dashoffset: 40; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 40; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes dash { to { stroke-dashoffset: -22; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes story-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- small screens ---------- */
@media (max-width: 1024px) {
  .story-split, .story-split.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .story-split.reverse .scene { order: 2; }
  .journey { grid-template-columns: 1fr 1fr; }
  .journey::before, .journey::after { display: none; }
  .hq-stage { max-width: 460px; margin: 1rem auto 2.5rem; }
}
@media (max-width: 760px) {
  .hero-points { grid-template-columns: 1fr; gap: .8rem; }
  .workday::before { left: 6px; }
  .workday li { grid-template-columns: 1fr; gap: .4rem; padding-left: 1.6rem; }
  .wd-meta { text-align: left; padding: 0; display: flex; gap: .6rem; align-items: baseline; }
  .wd-meta::after { left: -1.6rem; right: auto; top: .35rem; }
  .say { max-width: 92%; }
  .journey { grid-template-columns: 1fr; }
  .chat-card { position: static; margin: -1.5rem auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .workday li .say { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hq, .marquee-track, .sc-path, .hq-tick, .hq-windows rect, .sc-led, .hq-leds circle { animation: none !important; }
  .hq-tick { stroke-dashoffset: 0; }
  .journey::after { transition: none; }
}

/* ---------- navigation call to action ---------- */
.main-nav { align-items: center; }
.main-nav a.nav-cta { margin-left: auto; background: var(--brand); color: var(--brand-ink); padding: .45rem 1rem; }
.main-nav a.nav-cta:hover { background: color-mix(in srgb, var(--brand) 88%, black); color: var(--brand-ink); }

/* ---------- phone header: one call to action, nothing that overflows ---------- */
.mobile-cta { display: none; }
.toast-host { max-width: calc(100vw - 2rem); }
@media (max-width: 760px) {
  .topbar-actions .region-picker, .topbar-actions .cart-link, .topbar-actions .icon-btn, .topbar-actions > .btn-ghost { display: none; }
  .mobile-cta { display: inline-flex; }
  .topbar-inner { gap: .5rem; }
  .brand { font-size: .95rem; white-space: nowrap; }
}

/* ---------- cookie choice ---------- */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200; max-width: 560px; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .92rem; color: var(--text-2); }
.consent a { color: var(--brand); text-decoration: underline; }
.consent-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.footer-links a { color: var(--text-2); text-decoration: underline; }
