/* ==========================================================================
   Melodix Software — base.css
   Design tokens, reset, typography, background layers, utilities.
   ========================================================================== */

:root {
  /* surfaces */
  --bg:            #07070f;
  --bg-soft:       #0b0b16;
  --surface:       #11111f;
  --surface-2:     #16162a;
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* brand + product accents */
  --violet:        #7c5cff;
  --violet-light:  #a99bff;
  --cyan:          #22d3ee;
  --mint:          #34d399;
  --gold:          #ffb020;
  --rose:          #fb7185;

  /* text */
  --text:      #f2f4f8;
  --text-mid:  rgba(242, 244, 248, 0.68);
  --text-dim:  rgba(242, 244, 248, 0.42);

  /* geometry */
  --wrap:      1180px;
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  /* motion */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --dur:       0.45s;

  /* elevation */
  --shadow:    0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);

  /* the signature gradient */
  --grad: linear-gradient(100deg, var(--violet-light) 0%, var(--cyan) 45%, var(--gold) 100%);
}

/* --------------------------------------------------------- reset / defaults */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.5rem); }
h2 { font-size: clamp(1.95rem, 3.9vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
h4 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }

p { margin: 0; }

.lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  color: var(--text-mid);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.hint {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* wider than the reading width — used where a grid needs the extra room
   (the team portraits), while the text inside stays comfortably narrow */
.wrap--wide { max-width: 1360px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--violet);
  font-weight: 650;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ------------------------------------------------- decorative backgrounds */

.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.bg-aurora .blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 380px;
  min-height: 380px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  will-change: transform;
}

.blob--violet { top: -16vw;  left: -12vw;  background: var(--violet); opacity: 0.26; animation: drift 26s var(--ease) infinite alternate; }
.blob--cyan   { top: 40vh;   right: -18vw; background: var(--cyan);   opacity: 0.12; animation: drift 34s var(--ease) infinite alternate-reverse; }
.blob--gold   { top: 118vh;  right: -14vw; background: var(--gold);   opacity: 0.05; animation: drift 30s var(--ease) infinite alternate; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.16); }
}

/* faint five-line staff running down the whole page */
.bg-staff {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 13px
  );
  mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 25%, transparent 78%);
}

/* --------------------------------------------------------- scroll reveal */

/* Hidden only when JS is available to reveal it again — no JS, no blank page. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
}

.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
