/* Home page only (loaded by layout.php for the home template), after style.css. */

/* ─── Hero: the "Nuit" sky of Orneos OS, the prism at architectural scale, the product on stage ─── */
.hx-hero { --hx-tail: 260px; position: relative; overflow: hidden; color: #FFFFFF; padding-block: 84px 130px;
  background:
    linear-gradient(to top, var(--bg) var(--hx-tail), transparent var(--hx-tail)),
    radial-gradient(42% 46% at 70% 44%, color-mix(in srgb, var(--safran) 15%, transparent), transparent 72%),
    radial-gradient(60% 60% at 26% 8%, color-mix(in srgb, var(--mark-2) 26%, transparent), transparent 72%),
    linear-gradient(165deg, var(--night-0), var(--night-1) 50%, var(--night-2)); }
.hx-sky { position: absolute; inset: 0 0 var(--hx-tail); overflow: hidden; pointer-events: none; }
.hx-prism { position: absolute; left: max(76%, calc(50% + 420px)); top: 400px; width: 1340px; max-width: none; transform: translate(-50%, -50%); }
.hx-hero-text { position: relative; display: grid; justify-items: start; }
.hx-trust { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-trust li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .04);
  font: 500 .75rem/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--on-night-muted); }
.hx-trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--safran); }
.hx-hero h1 { max-width: 13ch; font-size: clamp(2.5rem, 5.6vw, 4.5rem); font-weight: 850; line-height: .98; letter-spacing: -.048em; color: #FFFFFF; }
.hx-hero h1 em { font-style: normal; color: var(--safran); }
.hx-lede { margin-top: 24px; max-width: 50ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--on-night-muted); }
.hx-cta { margin-top: 34px; gap: 12px; }
.hx-fine { margin-top: 14px; font-size: .875rem; color: var(--on-night-muted); opacity: .8; }

.hx-stage { position: relative; max-width: 1080px; margin: 72px auto 0; }
.hx-window { margin: 0; padding: 8px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px -40px rgba(5, 11, 22, .55), 0 18px 40px -24px rgba(5, 11, 22, .45); }
.hx-window img { display: block; width: 100%; height: auto; border-radius: 11px; }

/* The phone is drawn, its "photos" are the landscapes of the Photos capture */
.hx-phone { position: absolute; left: -44px; bottom: -54px; width: 200px; aspect-ratio: 9 / 19.2; padding: 7px; border-radius: 36px;
  background: var(--night-1); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 40px 80px -24px rgba(5, 11, 22, .7); }
.hx-phone-screen { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 30px 9px 9px; border-radius: 29px; background: var(--surface); overflow: hidden; }
.hx-phone-title { padding-left: 3px; font: 800 1.125rem/1 var(--font-ui); letter-spacing: -.02em; color: var(--ink); }
.hx-phone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.hx-phone-grid i { position: relative; overflow: hidden; display: block; aspect-ratio: 1; border-radius: 3px; background: linear-gradient(var(--s1), var(--s2)); }
.hx-phone-grid i::before { content: ""; position: absolute; left: 44%; top: 16%; width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%); }
.hx-phone-grid i::after { content: ""; position: absolute; inset: 52% 0 0; background: var(--l);
  clip-path: polygon(0 34%, 14% 12%, 28% 36%, 47% 0, 66% 30%, 84% 10%, 100% 30%, 100% 100%, 0 100%); }
.t-a, .t-g { --s1: #E06A6E; --s2: #F4BBAA; --l: #6E3463; }
.t-b, .t-h { --s1: #F7D46E; --s2: #FBEAB4; --l: #7A5000; }
.t-c, .t-i { --s1: #8E7CC3; --s2: #CDBDE8; --l: #1A5F7A; }
.t-d, .t-j { --s1: #6FA3B0; --s2: #D1E5E8; --l: #2F7D6D; }
.t-e, .t-k { --s1: #F3A86F; --s2: #FCE0C2; --l: #A9581A; }
.t-f, .t-l { --s1: #79ADE3; --s2: #D3E8F8; --l: #3B6F22; }
.hx-phone-grid i:nth-child(n+7) { filter: saturate(.85) brightness(.97); }
.hx-phone-done { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 8px 9px; border-radius: 12px; background: var(--tint-vdg); color: var(--ok); font: 600 .6875rem/1.2 var(--font-data); }
.hx-phone-done .icon { width: 14px; height: 14px; }

.hx-ornis { position: absolute; right: -46px; top: 40%; display: flex; gap: 12px; width: 300px; padding: 16px 18px 16px 16px; border-radius: 14px; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-left: 3px solid var(--safran); box-shadow: 0 30px 70px -24px rgba(5, 11, 22, .6); }
.hx-ornis-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--tint-prusse); }
.hx-ornis-text { display: grid; justify-items: start; gap: 10px; }
.hx-ornis-text b { font-size: .9375rem; line-height: 1.35; }
.hx-ornis-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-ctl); background: var(--action); color: var(--on-action); font-size: .8125rem; font-weight: 600; }
.hx-ornis-btn .icon { width: 14px; height: 14px; }

.hx-chip { position: absolute; right: 9%; bottom: -26px; margin: 0; display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px rgba(5, 11, 22, .45); font-size: .9375rem; }
.hx-chip b { font: 500 1rem var(--font-data); color: var(--action); }

.hx-who { padding-top: 120px; }

/* ─── Apps: the same tiles as the cloud and Orneos OS ─── */
.hx-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 30px 12px; }
.hx-apps a { display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.hx-tile { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 22px; color: #FFFFFF;
  background: linear-gradient(150deg, color-mix(in srgb, var(--fam-fg) 68%, #FFFFFF), var(--fam-fg) 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 30px -16px color-mix(in srgb, var(--fam-fg) 85%, transparent);
  transition: transform var(--t-fast), box-shadow var(--t-fast); }
.hx-tile .icon { width: 34px; height: 34px; }
.hx-apps a:hover .hx-tile, .hx-apps a:focus-visible .hx-tile { transform: translateY(-5px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 24px 36px -16px color-mix(in srgb, var(--fam-fg) 90%, transparent); }
.hx-apps-band .h-more { margin-top: 36px; }

/* Search: a live-looking results card */
.hx-kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 .8125rem/1.2 var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--action); }
.hx-kicker .icon { width: 16px; height: 16px; }
.hx-search { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 44px;
  border-radius: 20px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color var(--t-fast); }
.hx-search:hover { border-color: var(--action); }
.hx-search-text { display: grid; justify-items: start; }
.hx-search h3 { margin: 14px 0 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hx-search p { color: var(--muted); }
.hx-search .more { margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; color: var(--action); font-size: .9375rem; }
.hx-search .more .icon { width: 16px; height: 16px; }
.hx-search-mock { display: grid; gap: 10px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(15, 36, 64, .4); }
.hx-sbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 2px solid var(--action); color: var(--ink); font-size: 1.0625rem; }
.hx-sbar .icon { color: var(--action); }
.hx-typed { display: inline-block; max-width: 20ch; overflow: hidden; white-space: nowrap; vertical-align: bottom; transition: max-width 1.1s steps(16) .3s; }
.hx-sbar::after { content: ""; width: 2px; height: 1.2em; margin-left: -8px; background: var(--action); animation: hx-blink 1.1s steps(1) infinite; }
.hx-sgroup { margin-top: 8px; font: 500 .75rem/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hx-shit { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--tint-teal); font-weight: 600; font-size: .9375rem; }
.hx-sic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--fam-fg); color: #FFFFFF; }
.hx-sic .icon { width: 18px; height: 18px; }
.hx-sline { display: grid; gap: 7px; padding: 4px 2px; }
.hx-sline i { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); width: 92%; }
.hx-sline i:first-child { width: 52%; background: color-mix(in srgb, var(--action) 32%, var(--surface-2)); }

/* ─── Ornis: the colour moment, Klein into night ─── */
.hx-ornis-band { position: relative; overflow: hidden; color: #FFFFFF; padding-block: 104px;
  background:
    radial-gradient(46% 70% at 88% 18%, color-mix(in srgb, var(--safran) 20%, transparent), transparent 72%),
    linear-gradient(135deg, var(--field) 0%, color-mix(in srgb, var(--field) 55%, var(--night-1)) 60%, var(--night-1) 100%); }
.hx-ornis-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.hx-ornis-copy { display: grid; justify-items: start; }
.hx-ornis-band .hx-kicker { color: var(--safran); }
.hx-ornis-band h2 { margin: 16px 0 16px; font-size: clamp(2.125rem, 4.6vw, 3.5rem); font-weight: 850; line-height: 1; letter-spacing: -.045em; }
.hx-ornis-copy > p { max-width: 44ch; font-size: 1.125rem; color: var(--on-field-muted); }
.hx-ornis-points { list-style: none; margin: 30px 0 36px; padding: 0; display: grid; gap: 16px; }
.hx-ornis-points li { display: grid; gap: 2px; padding-left: 16px; border-left: 2px solid var(--safran); }
.hx-ornis-points b { font-size: 1.0625rem; }
.hx-ornis-points span { color: var(--on-field-muted); font-size: .9375rem; }
.hx-ornis-band .btn-ghost { color: #FFFFFF; border-color: rgba(255, 255, 255, .55); }
.hx-ornis-band .btn-ghost:hover { border-color: #FFFFFF; }
.hx-ornis-shot { margin: 0; perspective: 1800px; }
.hx-ornis-shot img { display: block; width: 100%; height: auto; border-radius: 14px; transform: rotateY(-9deg) rotateX(3deg); transform-origin: left center;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .08), 0 60px 110px -36px rgba(5, 11, 22, .8); }

/* ─── Last call: the night again, the prism on the side ─── */
.hx-final { position: relative; overflow: hidden; color: #FFFFFF;
  background: radial-gradient(40% 80% at 80% 50%, color-mix(in srgb, var(--safran) 12%, transparent), transparent 70%),
    linear-gradient(160deg, var(--night-0), var(--night-1) 55%, var(--night-2)); }
.hx-final .container { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; padding-block: 112px; }
.hx-final h2 { max-width: 14ch; font-size: clamp(2.125rem, 4.6vw, 3.5rem); font-weight: 850; line-height: 1; letter-spacing: -.045em; }
.hx-final p { margin-top: 14px; max-width: 46ch; color: var(--on-night-muted); font-size: 1.125rem; }
.hx-final-prism { position: absolute; right: -220px; top: 50%; width: 900px; max-width: none; transform: translateY(-50%); pointer-events: none; opacity: .9; }

/* ─── Motion: the hero arrives, sections rise in as they come (never with "reduce motion") ─── */
.prism-blades { transform-box: view-box; transform-origin: 18px 18px; }
@keyframes hx-rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes hx-turn { from { opacity: 0; transform: rotate(-28deg) scale(.9); } }
@keyframes hx-glow { 50% { opacity: .2; } }
@keyframes hx-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hx-hero .prism-blades { animation: hx-turn 1.6s cubic-bezier(.2, .7, .2, 1) both; }
  .hx-hero .prism-halo { animation: hx-glow 6s ease-in-out 1.6s infinite; }
  .hx-hero-text > * { animation: hx-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hx-hero-text > :nth-child(2) { animation-delay: .08s; }
  .hx-hero-text > :nth-child(3) { animation-delay: .16s; }
  .hx-hero-text > :nth-child(n+4) { animation-delay: .24s; }
  .hx-stage { animation: hx-rise 1s cubic-bezier(.2, .7, .2, 1) .3s both; }
  .hx-ornis { animation: hx-rise .8s cubic-bezier(.2, .7, .2, 1) 1s both; }
  .hx-phone { animation: hx-rise .8s cubic-bezier(.2, .7, .2, 1) .8s both; }
  .hx-chip { animation: hx-rise .8s cubic-bezier(.2, .7, .2, 1) 1.2s both; }
  .reveal [data-reveal] { transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
  .reveal [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(32px); }
  .reveal .hx-apps[data-reveal] { opacity: 1; transform: none; }
  .reveal .hx-apps li { transition: opacity .6s, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 35ms); }
  .reveal .hx-apps:not(.is-in) li { opacity: 0; transform: translateY(18px) scale(.94); }
  .reveal .hx-search:not(.is-in) .hx-typed { max-width: 0; }
  .reveal .hx-ornis-shot img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
  .reveal .hx-ornis-shot:not(.is-in) img { transform: rotateY(-22deg) rotateX(6deg) translateX(40px); }
}
@media (prefers-reduced-motion: reduce) {
  .hx-sbar::after { animation: none; }
}

/* ─── Narrower screens ─── */
@media (max-width: 1180px) {
  .hx-phone { left: -8px; }
  .hx-ornis { right: -8px; }
}
@media (max-width: 960px) {
  .hx-hero { --hx-tail: 180px; padding-block: 56px 64px; }
  .hx-prism { left: 78%; top: 300px; width: 1000px; opacity: .55; }
  .hx-stage { margin-top: 48px; }
  .hx-phone { width: 150px; bottom: -40px; border-radius: 28px; }
  .hx-phone-screen { border-radius: 22px; padding-top: 22px; }
  .hx-ornis { top: auto; bottom: 18%; width: 260px; }
  .hx-apps { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .hx-search, .hx-ornis-grid { grid-template-columns: minmax(0, 1fr); }
  .hx-search { padding: 28px; gap: 32px; }
  .hx-ornis-band { padding-block: 72px; }
  .hx-ornis-shot img { transform: none; }
  .reveal .hx-ornis-shot:not(.is-in) img { transform: translateY(24px); }
  .hx-final-prism { right: -360px; opacity: .5; }
}
@media (max-width: 640px) {
  .hx-hero { --hx-tail: 110px; padding-block: 40px 44px; }
  .hx-prism { left: 92%; top: 150px; width: 640px; opacity: .45; }
  .hx-trust li:nth-child(n+3) { display: none; }
  .hx-cta .btn { flex: 1 1 100%; }
  .hx-stage { margin-top: 40px; }
  .hx-window { padding: 4px; border-radius: 12px; box-shadow: 0 18px 36px -22px rgba(5, 11, 22, .5); }
  .hx-window img { border-radius: 8px; }
  .hx-phone { width: 96px; left: -4px; bottom: -28px; padding: 4px; border-radius: 18px; }
  .hx-phone-screen { padding: 12px 5px 5px; border-radius: 14px; gap: 5px; }
  .hx-phone-title { font-size: .6875rem; }
  .hx-phone-done { display: none; }
  .hx-ornis { display: none; }
  .hx-chip { right: 4px; bottom: -22px; padding: 9px 14px; font-size: .8125rem; }
  .hx-chip b { font-size: .875rem; }
  .hx-who { padding-top: 88px; }
  .hx-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 6px; }
  .hx-tile { width: 60px; height: 60px; border-radius: 17px; }
  .hx-tile .icon { width: 26px; height: 26px; }
  .hx-apps a { font-size: .8125rem; gap: 8px; }
  .hx-search { padding: 20px; }
  .hx-final .container { padding-block: 80px; }
  .hx-final .btn { flex: 1 1 100%; }
}

/* Dark theme: the tiles keep their family colour as a tinted glass */
@media (prefers-color-scheme: dark) {
  .hx-tile { color: var(--fam-fg); background: color-mix(in srgb, var(--fam-fg) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--fam-fg) 30%, transparent);
    box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .8); }
  .hx-apps a:hover .hx-tile { box-shadow: 0 24px 36px -18px rgba(0, 0, 0, .9); }
  .hx-sic { color: var(--night-1); }
}
