/* ==========================================================================
   HOME PAGE
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */
.home-hero { padding: calc(var(--header-height) + 64px) 0 24px; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }

.home-hero-title {
  font-size: clamp(2.1rem, 3.9vw, 3.3rem);
  font-weight: 900;
  line-height: 1.45;
  margin: 0 0 22px;
  max-width: 15em;
}
.home-hero-lead { font-size: 1.15rem; line-height: 2.05; color: var(--text-muted); max-width: 52ch; }
.home-hero .hero-buttons { margin-top: 34px; }

/* The voice instrument: a waveform you can play and scrub */
.home-voice {
  background: var(--lapis-900);
  border-radius: var(--radius-xl);
  padding: 30px 30px 24px;
  box-shadow: var(--shadow-luxury);
  color: #eef2fa;
  position: relative;
  overflow: hidden;
}
html:not([data-theme="light"]) .home-voice { background: var(--lapis-800); }

.home-voice-wave {
  display: flex; align-items: center; gap: 3px;
  height: 190px; direction: rtl; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-voice-wave i {
  flex: 1 1 0; min-width: 2px; height: 100%;
  background: rgba(238, 242, 250, 0.3);
  border-radius: 3px;
  transform: scaleY(var(--h, 0.4));
  transition: background-color 0.12s linear;
}
.home-voice-wave i.is-played { background: var(--saffron); }
.home-voice-wave i.is-now { background: #fff; }

.home-voice-bar { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.home-voice-play {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  border: 0; background: var(--saffron); color: var(--lapis-900);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.home-voice-play:hover { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(246, 185, 59, 0.25); }
.home-voice-play .icon-pause { display: none; }
.home-voice.is-playing .icon-play { display: none; }
.home-voice.is-playing .icon-pause { display: block; }
.home-voice-meta { display: flex; flex-direction: column; line-height: 1.7; min-width: 0; }
.home-voice-meta strong { font-weight: 800; color: #fff; font-size: 0.98rem; }
.home-voice-meta span { color: #9fb0d1; font-size: 0.86rem; }
.home-voice-time { white-space: nowrap; margin-inline-start: auto; color: #b6c1d8; font-size: 0.88rem; font-variant-numeric: tabular-nums; }

/* Facts ------------------------------------------------------------------ */
.home-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px; border-top: 1px solid var(--border-hover); }
.home-facts > div { padding: 22px 0 8px; padding-inline-end: 24px; }
.home-facts > div + div { padding-inline-start: 24px; border-inline-start: 1px solid var(--border-glass); }
.home-facts dt { font-size: 1.55rem; font-weight: 900; line-height: 1.4; color: var(--text-main); }
.home-facts dd { margin-top: 4px; font-size: 0.92rem; line-height: 1.85; color: var(--text-muted); }

/* Products: the flagship leads */
.home-page .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-page .card-glass.is-flagship {
  grid-column: span 2;
  position: relative; overflow: hidden;
  background: var(--lapis-900); border-color: var(--lapis-900); color: #eef2fa;
  padding: 40px;
}
html:not([data-theme="light"]) .home-page .card-glass.is-flagship { background: var(--lapis-800); border-color: rgba(246, 185, 59, 0.5); }
.is-flagship::after {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-end: 0;
  width: 55%; height: 55%; pointer-events: none; opacity: 0.9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 100' preserveAspectRatio='none'%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Crect x='0' y='60' width='5' height='40' rx='2'/%3E%3Crect x='10' y='40' width='5' height='60' rx='2'/%3E%3Crect x='20' y='25' width='5' height='75' rx='2'/%3E%3Crect x='30' y='50' width='5' height='50' rx='2'/%3E%3Crect x='40' y='15' width='5' height='85' rx='2'/%3E%3Crect x='50' y='45' width='5' height='55' rx='2'/%3E%3Crect x='60' y='30' width='5' height='70' rx='2'/%3E%3Crect x='70' y='62' width='5' height='38' rx='2'/%3E%3Crect x='80' y='20' width='5' height='80' rx='2'/%3E%3Crect x='90' y='42' width='5' height='58' rx='2'/%3E%3Crect x='100' y='8' width='5' height='92' rx='2'/%3E%3Crect x='110' y='35' width='5' height='65' rx='2'/%3E%3Crect x='120' y='55' width='5' height='45' rx='2'/%3E%3Crect x='130' y='22' width='5' height='78' rx='2'/%3E%3Crect x='140' y='48' width='5' height='52' rx='2'/%3E%3Crect x='150' y='30' width='5' height='70' rx='2'/%3E%3Crect x='160' y='64' width='5' height='36' rx='2'/%3E%3Crect x='170' y='38' width='5' height='62' rx='2'/%3E%3Crect x='180' y='52' width='5' height='48' rx='2'/%3E%3Crect x='190' y='70' width='5' height='30' rx='2'/%3E%3Crect x='200' y='56' width='5' height='44' rx='2'/%3E%3Crect x='210' y='74' width='5' height='26' rx='2'/%3E%3Crect x='220' y='66' width='5' height='34' rx='2'/%3E%3Crect x='230' y='80' width='5' height='20' rx='2'/%3E%3C/g%3E%3C/svg%3E") no-repeat bottom left / 100% 100%;
}
.is-flagship > * { position: relative; z-index: 1; }
.is-flagship .product-icon-wrap { background: var(--saffron); color: var(--lapis-900); }
.is-flagship .product-tag { color: var(--saffron); }
.is-flagship .product-title { color: #fff; font-size: 1.7rem; }
.is-flagship .product-desc { color: #c3cde2; max-width: 46ch; }
.is-flagship .product-footer { border-top-color: rgba(255, 255, 255, 0.16); }
.is-flagship .link-arrow { color: #fff; }
.is-flagship .product-version { color: #9fb0d1; }

/* Principles: heading holds still while the list scrolls */
.home-principles { background: var(--bg-section-alt); }
.home-principles-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
.home-principles-head { position: sticky; inset-block-start: calc(var(--header-height) + 32px); }
.home-principles-list { border-top: 1px solid var(--border-hover); }
.home-principles-list li { padding: 28px 0; border-bottom: 1px solid var(--border-glass); }
.home-principles-list h3 { font-size: 1.25rem; font-weight: 900; margin-bottom: 8px; }
.home-principles-list p { color: var(--text-muted); font-size: 1rem; line-height: 2; max-width: 56ch; }

/* Inquiry form helpers */
.inquiry-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.inquiry-status { min-height: 1.6em; margin-top: 14px; font-size: 0.93rem; font-weight: 700; color: #435176; }
.inquiry-status.is-error { color: #b42318; }
.inquiry-status.is-ok { color: #0a7a80; }
.inquiry-form.is-done { text-align: center; padding: 48px 28px; }
.inquiry-form.is-done h4 { font-size: 1.35rem; font-weight: 900; margin-bottom: 8px; }
.inquiry-form.is-done p { color: #435176; line-height: 2; }

.home-blog { background: var(--bg-section-alt); }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .home-hero-title { max-width: none; }
  .home-facts { grid-template-columns: 1fr 1fr; }
  .home-facts > div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .home-facts > div:nth-child(n + 3) { border-top: 1px solid var(--border-glass); margin-top: 8px; }
  .home-page .products-grid { grid-template-columns: 1fr 1fr; }
  .home-principles-grid { grid-template-columns: 1fr; gap: 36px; }
  .home-principles-head { position: static; }
}
@media (max-width: 680px) {
  .home-hero { padding-top: calc(var(--header-height) + 36px); }
  .home-voice { padding: 22px 18px 18px; }
  .home-voice-wave { height: 140px; gap: 2px; }
  .home-voice-meta span { display: none; }
  .home-hero .hero-buttons .btn { width: 100%; }
  .home-page .products-grid { grid-template-columns: 1fr; }
  .home-page .card-glass.is-flagship { grid-column: auto; padding: 28px 22px; }
  .home-facts { margin-top: 48px; }
}
