/* ==========================================================================
   UNITED ECHOES — homepage (index.php only). Loaded after style.css.
   Concept: "the echo room": a spinning record at the centre of a live sound ring,
   in an aurora of the brand violet. Purple is always #763AED; the other tones are
   steps of it (deep violet, lavender) plus tiny magenta / electric-blue glints.
   Motion: one entrance after the loading screen, the record, the ring and slow
   background waves. With "reduce motion" everything stands still.
   ========================================================================== */

.home {
  --hx-deep: #4B1FB8;        /* deeper violet */
  --hx-lav: #C9B5FA;         /* light lavender */
  --hx-mist: #EFE7FD;        /* soft tint */
  --hx-magenta: #C13AED;     /* small highlights only */
  --hx-blue: #3A62ED;        /* small highlights only */
  --hx-bg: linear-gradient(180deg, #F4EFFC 0%, var(--bg) 78%);
  --hx-orb-a: rgba(118, 58, 237, .20);
  --hx-orb-b: rgba(201, 181, 250, .75);
  --hx-orb-c: rgba(193, 58, 237, .12);
  --hx-wave: rgba(118, 58, 237, .22);
  --hx-grain: .05;
  --hx-glass: rgba(255, 255, 255, .72);
  --hx-glass-line: rgba(118, 58, 237, .18);
  --hx-disc: #17121F;
  --hx-groove: rgba(255, 255, 255, .07);
  --hx-label: #F1EAFE;
}
:root[data-theme="dark"] .home {
  --hx-bg: #000000;
  --hx-orb-a: rgba(118, 58, 237, .34);
  --hx-orb-b: rgba(75, 31, 184, .45);
  --hx-orb-c: rgba(193, 58, 237, .16);
  --hx-wave: rgba(183, 151, 247, .20);
  --hx-grain: .07;
  --hx-glass: rgba(14, 14, 15, .78);
  --hx-glass-line: rgba(183, 151, 247, .2);
  --hx-disc: #050505;
  --hx-groove: rgba(255, 255, 255, .06);
  --hx-label: #EDE4FF;
}

/* ---- Hero shell ------------------------------------------------------------ */
.hx {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100svh - var(--header-h) - 56px);
  padding-block: clamp(1.75rem, 5vw, 3rem) clamp(4.25rem, 7vw, 5.25rem);
  background: var(--hx-bg);
}
.hx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hx-bg::after { /* fine grain, so the gradients look like light rather than plastic */
  content: ''; position: absolute; inset: 0; opacity: var(--hx-grain); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .hx-bg::after { mix-blend-mode: screen; }
.hx-orb { position: absolute; border-radius: 50%; will-change: transform; }
.hx-orb-1 { width: 62vmax; height: 62vmax; right: -18vmax; top: -24vmax; background: radial-gradient(closest-side, var(--hx-orb-a), transparent); animation: hx-drift 22s ease-in-out infinite alternate; }
.hx-orb-2 { width: 55vmax; height: 55vmax; left: -22vmax; bottom: -30vmax; background: radial-gradient(closest-side, var(--hx-orb-b), transparent); animation: hx-drift 26s ease-in-out -8s infinite alternate-reverse; }
.hx-orb-3 { width: 30vmax; height: 30vmax; right: 18%; bottom: -12vmax; background: radial-gradient(closest-side, var(--hx-orb-c), transparent); animation: hx-drift 18s ease-in-out -4s infinite alternate; }
@keyframes hx-drift { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }
.hx-waves { position: absolute; left: 0; bottom: 0; width: 200%; height: 110px; animation: hx-waves 38s linear infinite; }
.hx-wave { fill: none; stroke: var(--hx-wave); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hx-wave-2 { opacity: .7; }
.hx-wave-3 { opacity: .45; }
@keyframes hx-waves { to { transform: translateX(-50%); } }

.hx-grid { display: grid; gap: 1.5rem; align-items: center; }
.hx-copy { min-width: 0; }

/* ---- Words ------------------------------------------------------------------- */
.hx-eyebrow { display: inline-flex; align-items: center; gap: .55rem; max-width: 100%; margin: 0 0 1rem; padding: .4rem .8rem .4rem .7rem; border: 1px solid var(--hx-glass-line); border-radius: var(--r-pill); background: var(--hx-glass); color: var(--text-muted); font-size: .75rem; font-weight: 500; letter-spacing: .02em; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hx-live { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.hx-live span { width: 3px; height: 100%; border-radius: 2px; background: var(--brand); transform-origin: bottom; animation: ue-eq 1.1s ease-in-out infinite; }
.hx-live span:nth-child(2) { animation-delay: -.4s; }
.hx-live span:nth-child(3) { animation-delay: -.7s; }
.hx-title { margin: 0; font-family: 'Bricolage Grotesque', var(--font-body); font-weight: 800; font-size: clamp(2.6rem, 12vw, 5.25rem); line-height: .95; letter-spacing: -.035em; color: var(--text); text-wrap: balance; font-optical-sizing: auto; }
.hx-tagline { margin: .7rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 4.6vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
.hx-sub { max-width: 46ch; margin: 1.1rem 0 0; color: var(--text-muted); font-size: clamp(1.0625rem, 2.6vw, 1.1875rem); line-height: 1.55; }

/* ---- Buttons and chips ------------------------------------------------------------ */
.hx-actions { display: grid; gap: .65rem; margin-top: 1.6rem; }
.hx-actions .btn { width: 100%; gap: .55rem; }
.hx-btn { position: relative; box-shadow: 0 10px 28px -10px rgba(118, 58, 237, .65); transition: transform .25s var(--ease), box-shadow .25s ease, background-color .2s; will-change: transform; }
.hx-btn .icon { transition: transform .25s var(--ease); }
.hx-btn:hover { box-shadow: 0 14px 34px -10px rgba(118, 58, 237, .85), 0 0 0 4px rgba(118, 58, 237, .14); }
.hx-btn:hover .icon { transform: translateX(3px); }
.hx-btn:active, .hx-btn-2:active { transform: scale(.98); }
.hx-btn-2 { background: var(--hx-glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hx-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.4rem 0 0; padding: 0; }
.hx-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--hx-glass); color: var(--text); font-size: .875rem; font-weight: 500; text-decoration: none; transition: border-color .2s, color .2s, transform .2s var(--ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hx-chip .icon { color: var(--brand-text); }
.hx-chip:hover { border-color: var(--brand-line); color: var(--brand-text); transform: translateY(-2px); }
@media (pointer: coarse) { .hx-chip { min-height: 44px; } }

/* ---- Visual: record + sound ring --------------------------------------------------------- */
.hx-visual { position: relative; order: -1; justify-self: center; width: min(62vw, 250px); margin-top: .25rem; }
.hv { position: relative; aspect-ratio: 1; --px: 0; --py: 0; }
.hv > * { position: absolute; }
.hv-halo { inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(118, 58, 237, .28), rgba(118, 58, 237, .08) 60%, transparent); transform: translate3d(calc(var(--px) * -6px), calc(var(--py) * -6px), 0); }
.hv-ring { inset: 13%; border-radius: 50%; border: 1px dashed var(--brand-line); }
.js .hv-ring { display: none; }  /* the live ring is drawn on the canvas */
.hv-canvas { inset: 0; width: 100%; height: 100%; transform: translate3d(calc(var(--px) * -4px), calc(var(--py) * -4px), 0); }
.hv-vinyl { inset: 23%; border-radius: 50%; box-shadow: 0 18px 40px -12px rgba(29, 10, 70, .55), 0 0 0 1px rgba(118, 58, 237, .25); transform: translate3d(calc(var(--px) * 10px), calc(var(--py) * 10px), 0); }
.hv-disc { display: block; width: 100%; height: 100%; animation: hv-spin 7.2s linear infinite; }
.hv-disc-body { fill: var(--hx-disc); }
.hv-grooves circle { fill: none; stroke: var(--hx-groove); stroke-width: .8; }
.hv-sheen { fill: rgba(255, 255, 255, .06); }
.hv-label { position: absolute; inset: 31%; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF, var(--hx-label) 60%, var(--hx-lav)); box-shadow: inset 0 0 0 3px rgba(118, 58, 237, .35); animation: hv-spin 7.2s linear infinite; }
.hv-label img { width: 66%; height: auto; }
@keyframes hv-spin { to { transform: rotate(360deg); } }
.hx.is-paused .hv-disc, .hx.is-paused .hv-label,
.hx.is-paused .hx-orb, .hx.is-paused .hx-waves, .hx.is-paused .hx-live span { animation-play-state: paused; }


/* ---- Numbers ------------------------------------------------------------------------- */
.hx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: .5rem 0 0; border: 1px solid var(--hx-glass-line); border-radius: var(--r-lg); background: var(--hx-glass); overflow: hidden; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hx-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .15rem; padding: .9rem 1rem; border-color: var(--hx-glass-line); border-style: solid; border-width: 0; }
.hx-stat:nth-child(odd) { border-right-width: 1px; }
.hx-stat:nth-child(-n+2) { border-bottom-width: 1px; }
.hx-stat dt { color: var(--text-muted); font-size: .8125rem; line-height: 1.35; }
.hx-stat dd { margin: 0; font: 600 clamp(1.6rem, 6vw, 2.1rem)/1.1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--text); }

/* ---- Scroll cue ------------------------------------------------------------------------ */
.hx-scroll { position: absolute; left: 50%; bottom: 1rem; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; color: var(--text-muted); }
.hx-scroll-mouse { display: block; width: 22px; height: 34px; border: 2px solid currentColor; border-radius: 12px; opacity: .7; }
.hx-scroll-mouse span { display: block; width: 4px; height: 7px; margin: 6px auto 0; border-radius: 2px; background: var(--brand); animation: hx-scroll 1.8s ease-in-out infinite; }
@keyframes hx-scroll { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
.hx-scroll:hover { color: var(--brand-text); }

/* ---- Entrance (after the loading screen; only when JavaScript runs) ---------------------------- */
.js .hx-in { opacity: 0; transform: translateY(18px); }
.ue-ready .hx-in { animation: hx-in .8s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }
.js .hx-visual.hx-in { transform: translateY(10px) scale(.94); }
@keyframes hx-in { to { opacity: 1; transform: none; } }

/* ---- Larger screens ------------------------------------------------------------------------ */
@media (min-width: 600px) {
  .hx-eyebrow { font-size: .8125rem; }
  .hx-actions { display: flex; flex-wrap: wrap; }
  .hx-actions .btn { width: auto; }
  .hx-visual { width: min(60vw, 360px); }
}
@media (min-width: 900px) {
  .hx-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); column-gap: clamp(2rem, 5vw, 4.5rem); row-gap: 2.25rem; }
  .hx-visual { order: 0; width: min(100%, 470px); justify-self: end; margin: 0; }
  .hx-title { font-size: clamp(3.6rem, 6.2vw, 5.4rem); }
  .hx-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
  .hx-stat { padding: 1rem 1.4rem; border-width: 0 1px 0 0 !important; }
  .hx-stat:last-child { border-right-width: 0 !important; }
}
@media (min-width: 1200px) {
  .hx-visual { width: 500px; }
}
/* Laptop screens that are not very tall (e.g. 1366 × 768): tighten so the numbers stay in view */
@media (max-height: 860px) and (min-width: 900px) {
  .hx { padding-block: 1.5rem 4rem; }
  .hx-title { font-size: clamp(3.3rem, 5.5vw, 4.7rem); }
  .hx-tagline { font-size: clamp(1.25rem, 2vw, 1.65rem); margin-top: .5rem; }
  .hx-eyebrow { margin-bottom: .75rem; }
  .hx-sub { margin-top: .8rem; }
  .hx-actions { margin-top: 1.2rem; }
  .hx-chips { margin-top: 1rem; }
  .hx-chip { min-height: 36px; padding: .3rem .75rem; font-size: .8125rem; }
  .hx-visual { width: min(100%, 410px); }
  .hx-grid { row-gap: 1.5rem; }
  .hx-stat { padding: .75rem 1.25rem; }
}

/* ==========================================================================
   Sections under the hero
   ========================================================================== */
.home .section { position: relative; }
.hm-head { max-width: 640px; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hm-head h2 { margin-bottom: .4rem; font-size: clamp(1.9rem, 4.6vw, 2.75rem); letter-spacing: -.02em; }
.hm-head .lead { margin: 0; color: var(--text-muted); }
.hm-more { margin: 1.75rem 0 0; }

/* Services: numbered cards */
.hm-services { background: var(--surface); border-block: 1px solid var(--line); }
.hm-svc-grid { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.hm-svc { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .9rem; align-items: start; padding: 1.15rem 1.15rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); color: inherit; text-decoration: none; overflow: hidden; transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.hm-svc::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, var(--brand-tint), transparent 60%); opacity: 0; transition: opacity .3s; }
.hm-svc:hover { color: inherit; border-color: var(--brand-line); transform: translateY(-3px); box-shadow: 0 16px 36px -22px rgba(118, 58, 237, .6); }
.hm-svc:hover::before { opacity: 1; }
.hm-svc .card-icon { grid-row: span 2; margin: 0; }
.hm-svc h3 { position: relative; margin: .35rem 2rem .25rem 0; font-size: 1.0625rem; }
.hm-svc p { position: relative; margin: 0; color: var(--text-muted); font-size: .9375rem; }
.hm-svc-n { position: absolute; right: 1rem; top: .9rem; color: var(--text-dim); font: 500 .8125rem var(--font-body); font-variant-numeric: tabular-nums; }
.hm-svc-go { position: absolute; right: 1rem; bottom: 1rem; color: var(--brand-text); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s var(--ease); }
.hm-svc:hover .hm-svc-go, .hm-svc:focus-visible .hm-svc-go { opacity: 1; transform: none; }

/* Offers: a violet line along the top of each card */
.hm-offer { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.hm-offer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--hx-lav), var(--hx-magenta)); }
.hm-offer .checklist .icon { color: var(--brand-text); }

/* Process: steps joined by a line */
.hm-process { background: var(--surface); border-block: 1px solid var(--line); }
.hm-steps li::before { background: var(--bg); border-color: var(--brand); color: var(--brand-text); }
.hm-steps li:not(:last-child)::after { content: ''; position: absolute; left: calc(1.05rem - 1px); top: 2.35rem; bottom: -1.1rem; width: 2px; background: linear-gradient(var(--brand-line), transparent); }

/* Featured work */
.hm-work-grid .release { border-radius: var(--r-lg); transition: transform .3s var(--ease), border-color .25s, box-shadow .3s; }
.hm-work-grid .release:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(118, 58, 237, .7); }
.hm-work-grid .cover { overflow: hidden; }
.hm-work-grid .cover img { transition: transform .5s var(--ease); }
.hm-work-grid a.release:hover .cover img { transform: scale(1.04); }
.hm-empty { border: 1px dashed var(--brand-line); border-radius: var(--r-lg); background: radial-gradient(70% 90% at 50% 0%, var(--brand-tint), transparent 70%); }

.hm-person .avatar { background: linear-gradient(135deg, var(--brand), var(--hx-deep)); color: #fff; border: 0; }
.hm-quote { position: relative; border-radius: var(--r-lg); }
.hm-quote::before { content: '“'; position: absolute; right: 1rem; top: -.2rem; font: 500 4.5rem/1 var(--font-display); color: var(--brand-tint); }

/* Call to action band: the one big block of brand violet on the page */
.hm-cta { position: relative; overflow: hidden; isolation: isolate; padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem); border-radius: 18px; background: radial-gradient(90% 120% at 100% 0%, var(--hx-magenta), transparent 55%), linear-gradient(135deg, var(--brand), var(--hx-deep)); color: #fff; text-align: left; }
.hm-cta h2 { max-width: 18ch; margin: 0 0 .5rem; color: #fff; font-size: clamp(1.9rem, 4.6vw, 2.75rem); letter-spacing: -.02em; }
.hm-cta .lead { max-width: 46ch; margin: 0 0 1.5rem; color: rgba(255, 255, 255, .88); }
.hm-cta-wave { position: absolute; right: -5%; bottom: 0; z-index: -1; width: 70%; height: 60%; opacity: .35; }
@media (min-width: 900px) { .hm-cta-wave { width: 56%; } }   /* the wave stays to the right of the buttons on laptops */
.hm-cta-wave path { fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hm-cta .btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
/* Colours go through the button's own variables, so they stay the same after the link has been visited */
.hm-cta-btn { --_bg: #fff; --_bd: #fff; --_fg: #3B1590; --_bg-h: #F1EAFE; --_bd-h: #F1EAFE; --_fg-h: #3B1590; --_bg-a: #E6DBFD; }
.hm-cta-btn-2 { --_bg: rgba(255, 255, 255, .14); --_bd: rgba(255, 255, 255, .8); --_fg: #fff; --_bg-h: rgba(255, 255, 255, .24); --_bd-h: #fff; --_fg-h: #fff; --_bg-a: rgba(255, 255, 255, .3); }
.hm-cta-btn:visited, .hm-cta-btn-2:visited { color: var(--_fg); }
.hm-cta :focus-visible { outline-color: #fff; }
@media (max-width: 599px) { .hm-cta .btn { width: 100%; } }

@media (min-width: 700px) {
  .hm-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .hm-svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .hm-steps li:not(:last-child)::after { display: none; }
}

/* Gentle reveal for the sections below (assets/js/hero.js marks only what starts below the fold) */
.js [data-reveal].is-pending { opacity: 0; transform: translateY(22px); }
.js [data-reveal] { transition: opacity .7s ease, transform .7s var(--ease); }

/* ---- Reduce motion: a still, complete picture ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hx-orb, .hx-waves, .hv-disc, .hv-label, .hx-live span, .hx-scroll-mouse span { animation: none !important; }
  .js .hx-in, .ue-ready .hx-in { opacity: 1; transform: none; animation: none; }
  .js [data-reveal].is-pending { opacity: 1; transform: none; }
  .hx-btn, .hx-chip, .hm-svc, .hm-work-grid .release { transition: none; }
}
