/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --navy: #0a1626;
  --navy-deep: #060d17;
  --ink: #f5f7fa;
  --slate: #93a4b8;
  --teal: #2ed9c3;
  --ekg-hit: #39ff88;
  --ekg-idle: #2c4257;

  --scrub: #1f6f6a;
  --scrub-dark: #143f3c;
  --skin: #e2b593;
  --hair-root: #3b2416;
  --hair-mid: #7a4e2c;
  --hair-tip: #d9a86c;
  --dummy-body: #cfd8de;
  --dummy-shade: #9fb0ba;
  --dummy-chest: #e4e9ec;
  --shadow: rgba(0, 0, 0, 0.22);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* 120 BPM compression cadence (within the 100-120 BPM guideline) */
  --beat: 0.5s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--navy-deep);
  font-family: var(--font-body);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #10233a 0%, var(--navy-deep) 75%);
  opacity: 1;
  transition: opacity 0.7s ease;
  will-change: opacity;
}

#loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cpr-anim {
  width: min(70vw, 380px);
  height: auto;
}

.loader-label {
  color: var(--slate);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

/* ---- rigid transform groups: give each its own compositing layer ---- */
.compress-sync,
#woman-hair,
#dummy-chest,
#ekg-flash {
  transform-box: fill-box;
  will-change: transform, opacity;
}

.compress-sync  { transform-origin: 50% 100%; }
#woman-hair    { transform-origin: 50% 0%; }
#dummy-chest   { transform-origin: 50% 100%; }

/* Torso+head (body layer), hair, and hands (hand layer) all share this
   animation so the three layers move in perfect sync despite now being
   separate siblings in the paint order. */
.compress-sync {
  animation: compress var(--beat) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Chest yields at the same instant hands land */
#dummy-chest {
  animation: chest-yield var(--beat) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Hair lags very slightly behind the torso for a natural whip */
#woman-hair {
  animation: hair-bob var(--beat) cubic-bezier(0.4, 0.0, 0.6, 1) infinite;
  animation-delay: 0.035s;
}

/* EKG flashes green right at impact, then fades */
#ekg-flash {
  opacity: 0;
  animation: ekg-flash var(--beat) linear infinite;
}

@keyframes compress {
  0%   { transform: translateY(0); }
  42%  { transform: translateY(9px); }
  58%  { transform: translateY(9px); }
  100% { transform: translateY(0); }
}

@keyframes chest-yield {
  0%   { transform: scaleY(1); }
  42%  { transform: scaleY(0.82); }
  58%  { transform: scaleY(0.82); }
  100% { transform: scaleY(1); }
}

@keyframes hair-bob {
  0%   { transform: translateY(0); }
  48%  { transform: translateY(14px); }
  100% { transform: translateY(0); }
}

@keyframes ekg-flash {
  0%, 34%  { opacity: 0; }
  46%      { opacity: 1; }
  62%      { opacity: 1; }
  78%, 100%{ opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .compress-sync, #woman-hair, #dummy-chest, #ekg-flash {
    animation: none !important;
  }
}

/* ============================================================
   COMING SOON LANDING PAGE
   ============================================================ */
#landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s ease 0.15s;
}

#landing.is-visible { opacity: 1; }

.bg-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/wallpaper.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 13, 23, 0.72) 0%, rgba(6, 13, 23, 0.86) 100%);
  z-index: 1;
}

.landing-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-display);
  color: var(--teal);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.landing-content h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 20px;
}

.lede {
  color: var(--slate);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 34px;
}

.subscribe {
  display: flex;
  width: 100%;
  max-width: 420px;
  gap: 10px;
  margin-bottom: 18px;
}

.subscribe input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.subscribe input::placeholder { color: var(--slate); }

.subscribe input:focus {
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.1);
}

.subscribe button {
  padding: 13px 22px;
  border-radius: 8px;
  border: none;
  background: var(--teal);
  color: var(--navy-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.subscribe button:hover { background: #4de6d1; }
.subscribe button:active { transform: scale(0.97); }

.contact-link {
  color: var(--slate);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  color: var(--ink);
  border-color: var(--teal);
}

@media (max-width: 480px) {
  .subscribe { flex-direction: column; }
}

/* ============================================================
   SOCIAL FOOTER
   ============================================================ */
.social-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--slate);
  font-size: 16px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.social-icons a:hover {
  color: var(--navy-deep);
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.contact-email a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-email a:hover {
  color: var(--ink);
  border-color: var(--teal);
}
