/* Homepage night theme. Overrides shared tokens so header, footer and buttons follow automatically. */
.theme-night {
  --surface-canvas: #0e0b16;
  --surface-panel: #1a1526;
  --surface-subtle: #241d33;
  --text-primary: #f5f2fb;
  --text-secondary: #b9b0cc;
  --text-soft: #948ba9;
  --text-inverse: #0e0b16;
  --border-subtle: #2e2740;
  --border-control: #5b5175;
  --action-primary: #c9b6ff;
  --action-hover: #ffffff;
  --focus-ring: #5fd8ff;
  --accent: #00bce8;
  --night-card: #ffffff06;
  --night-hover: #8f78d8;
  color-scheme: dark;
  position: relative;
}
.theme-night::before { content: ""; position: absolute; inset: 0 0 auto; height: 780px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 30% 30%, #7233e833, transparent 70%), radial-gradient(50% 50% at 75% 35%, #00bce826, transparent 70%), radial-gradient(40% 40% at 55% 70%, #f56d9b1f, transparent 70%); }
.theme-night ::selection { background: #7233e8; color: #fff; }
.theme-night .brand img { width: 160px; }
.theme-night .button-primary { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }
.theme-night .button-primary:hover { background: #ffffff; border-color: #ffffff; color: var(--text-inverse); }
.theme-night .button-outline { border-color: var(--border-control); }
.theme-night .button-outline:hover { background: var(--surface-subtle); }
.theme-night .site-footer, .theme-night .site-header { background: var(--surface-canvas); }

.home-gl { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 42; }

/* Hero */
.home-hero { position: relative; padding-block: clamp(32px, 6vh, 64px) 32px; }
.home-intro { text-align: center; }
.home-intro h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; text-wrap: balance; }
.home-intro h1 span { color: var(--text-secondary); }
.home-intro p { max-width: 620px; margin: 16px auto 0; color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.home-ask { margin: 36px 0 16px; text-align: center; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.home-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-card { display: flex; flex-direction: column; height: 100%; padding-bottom: 18px; border-radius: 20px; border: 1px solid var(--border-subtle); background: linear-gradient(180deg, #ffffff08, #ffffff03); text-decoration: none; transition: border-color 200ms, transform 200ms, background 200ms; }
.home-card:hover, .home-card:focus-visible { border-color: var(--night-hover); background: linear-gradient(180deg, #7233e81c, #ffffff05); transform: translateY(-3px); }
.home-view { position: relative; display: grid; place-items: center; }
.home-card .home-view { height: 190px; }
.home-view .icon { width: 72px; height: 72px; color: var(--text-secondary); stroke-width: 1.1; }
.three-on .home-view .icon, .three-on .home-path-art { visibility: hidden; }
.home-card-name { padding: 0 18px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.home-card-line { padding: 4px 18px 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }
.home-card-go { margin: 14px 18px 0; color: var(--accent); font-size: 14px; font-weight: 500; }
.home-unsure { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; margin-top: 24px; color: var(--text-secondary); font-size: 15px; }
.home-trust { list-style: none; margin: 40px 0 0; padding: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--border-subtle); border-radius: 18px; background: var(--night-card); }
.home-trust li { display: flex; gap: 12px; align-items: flex-start; }
.home-trust svg { flex: none; width: 24px; height: 24px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-trust b { display: block; font-size: 15px; font-weight: 600; }
.home-trust span { color: var(--text-secondary); font-size: 14px; }

/* Bands */
.home-band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--border-subtle); }
.home-band h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.03em; font-weight: 650; text-wrap: balance; }
.home-lede { max-width: 640px; margin-top: 12px; color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.home-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.home-big { height: clamp(280px, 36vw, 420px); border-radius: 22px; border: 1px solid var(--border-subtle); background: radial-gradient(70% 70% at 50% 40%, #7233e822, transparent 70%), var(--night-card); }
.home-path-art { width: 82%; height: auto; }
.home-path-line { fill: none; stroke: #4a3f66; stroke-width: 2; stroke-dasharray: 4 6; }
.home-path-art .stone { fill: #2b2540; stroke-width: 2; }
.home-path-art .s1 { stroke: #7233e8; }.home-path-art .s2 { stroke: #f56d9b; }.home-path-art .s3 { stroke: #00bce8; }
.home-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.home-steps li { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--border-subtle); transition: border-color 300ms, background 300ms; }
.home-steps li.is-on { border-color: var(--night-hover); background: #7233e814; }
.home-steps h3 { margin-bottom: 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.home-steps p { color: var(--text-secondary); font-size: 15px; }

.home-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.home-service { display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 18px; border: 1px solid var(--border-subtle); background: var(--surface-panel); }
.home-service-tag { color: var(--accent); font-size: 14px; font-weight: 500; }
.home-service h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.home-service p:not(.home-service-tag) { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.home-service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: auto; padding-top: 12px; }

.home-logos { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-client { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 12px 12px 14px; border-radius: 20px; border: 1px solid var(--border-subtle); background: var(--night-card); text-decoration: none; text-align: center; transition: border-color 200ms, background 200ms, transform 200ms; }
.home-client:hover, .home-client:focus-visible { border-color: var(--night-hover); background: #7233e812; transform: translateY(-3px); }
.home-plate { display: grid; place-items: center; align-content: center; gap: 6px; height: 132px; padding: 16px; border-radius: 14px; background: #f7f5fb; }
.home-plate img { width: auto; max-width: 100%; height: auto; max-height: 100px; object-fit: contain; }
.home-wordmark { color: #241f33; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.home-client-host { color: var(--text-secondary); font-size: 14px; }
.home-client-host span { color: var(--accent); }
.home-client-next { border-style: dashed; border-color: var(--border-control); background: none; }
.home-client-next .home-plate { background: #ffffff08; }
.home-client-next .home-wordmark { color: var(--text-primary); font-size: 18px; }
.home-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(#7233e8, #f56d9b, #00bce8, #7233e8); color: #fff; font-size: 24px; line-height: 1; }

.home-cta { text-align: center; }
.home-cta .home-lede { margin-inline: auto; }
.home-cta .button { margin-top: 26px; }

/* Floating button */
.home-fab { position: fixed; z-index: 45; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 8px; border-radius: 99px; border: 1px solid #4a3f66; background: #17121fee; color: var(--text-primary); font-weight: 500; text-decoration: none; box-shadow: 0 12px 40px #0009;
  opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 250ms, transform 250ms, visibility 250ms; }
.home-fab.is-visible { opacity: 1; visibility: visible; transform: none; }
.guide-dot { flex: none; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(#7233e8, #f56d9b, #00bce8, #7233e8); }

/* Guided chat */
.guide { position: fixed; z-index: 50; top: 16px; right: 16px; bottom: 16px; width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; background: #17121f; color: var(--text-primary); border: 1px solid #3a3150; border-radius: 22px; box-shadow: 0 30px 80px #000a; opacity: 0; transform: translateX(30px); transition: transform 280ms var(--ease-out), opacity 200ms; }
.guide.is-open { opacity: 1; transform: none; }
.guide-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--border-subtle); }
.guide-head p { color: var(--text-secondary); font-size: 13px; }
.guide-head h2 { font-size: 18px; font-weight: 600; }
.guide-close { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-subtle); background: none; font-size: 22px; line-height: 1; }
.guide-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 6px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg.bot { background: #241d33; border-top-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--text-primary); color: var(--text-inverse); border-top-right-radius: 6px; }
.msg ul { margin: 8px 0 0; padding-left: 18px; }
.msg li span { color: var(--text-secondary); }
.guide-note { margin-top: 8px; color: var(--text-secondary); font-size: 13px; }
.typing span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--text-secondary); animation: guide-blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: 150ms; }.typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes guide-blink { 50% { opacity: 0.25; } }
.guide-choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 14px; }
.opt { min-height: 44px; padding: 9px 16px; border-radius: 99px; border: 1px solid #4a3f66; background: #1f1830; color: var(--text-primary); font-size: 15px; text-align: left; }
.opt:hover { border-color: var(--accent); background: #00bce81a; }
.opt.primary { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); font-weight: 500; }
.guide-choices form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.guide-choices input, .guide-choices textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #4a3f66; background: #0f0b17; color: var(--text-primary); font: 16px/1.5 var(--font-body); }
.guide-choices textarea { min-height: 84px; resize: vertical; }
.guide-row { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-error { color: #ff9fb4; font-size: 13px; }
.guide-foot { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-top: 1px solid var(--border-subtle); font-size: 13px; }
.guide-foot span { margin-left: auto; padding-right: 6px; color: var(--text-soft); }

@media (max-width: 900px) {
  .home-cards, .home-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-card .home-view { height: 160px; }
  .home-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-split, .home-services { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .theme-night .brand img { width: 128px; }
  .home-cards { gap: 10px; }
  .home-card .home-view { height: 128px; }
  .home-view .icon { width: 56px; height: 56px; }
  .home-card-name { padding: 0 14px; font-size: 17px; }
  .home-card-line { padding: 2px 14px 0; font-size: 14px; }
  .home-card-go { margin: 10px 14px 0; }
  .home-trust { grid-template-columns: 1fr; }
  .home-big { height: 260px; }
  .home-logos { gap: 10px; }
  .home-client { padding: 8px 8px 10px; gap: 8px; border-radius: 16px; }
  .home-plate { height: 96px; padding: 10px; border-radius: 10px; }
  .home-plate img { max-height: 72px; }
  .home-wordmark { font-size: 16px; }
  .home-client-next .home-wordmark { font-size: 14px; }
  .home-client-host { font-size: 12px; overflow-wrap: anywhere; }
  .guide { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 82vh; border-radius: 20px; transform: translateY(30px); }
  .home-fab { right: 12px; bottom: 12px; }
}
@media (max-width: 360px) { .theme-night .brand img { width: 108px; } }
@media (prefers-reduced-motion: reduce) {
  .home-card:hover, .home-card:focus-visible, .home-client:hover, .home-client:focus-visible { transform: none; }
}
@media (forced-colors: active) {
  .home-card, .home-client, .home-service, .home-trust, .guide { border: 1px solid CanvasText; }
  .home-plate { forced-color-adjust: none; }
}
