/* =========================================================
   Holylabs — landing page styles
   Mobile-first: base rules target small screens, desktop
   values are progressively added via min-width media query.
   Fonts: Manrope (self-hosted subset, latin + latin-ext)
   ========================================================= */

@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1E00-1E9F, U+2020;
}

:root {
  --bg: #f4f4f5;
  --arc-from: #ffffff;
  --arc-mid: #fbfbfc;
  --arc-to: #f4f4f6;
  --ink: #000000;
  --brand-blue: #0072db; /* matches the dot in the Holylabs wordmark */
  --focus-ring: #0072db;
  --ease-out: cubic-bezier(0.16, 0.8, 0.32, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Page-load entrance animation ---------- */

@keyframes glow-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateX(0) translateY(14px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateX(0) translateY(0) scale(1);
  }
}

@keyframes arc-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 32px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ---------- Continuous glow motion (loops while the page is open) ---------- */
/* Gentle floating/orbiting drift + brightness pulse. Keyframe 0%/100%
   matches glow-enter's final state exactly, so the hand-off from the
   one-shot entrance to this infinite loop is seamless (no visual jump). */

@keyframes glow-drift {
  0%,
  100% {
    transform: translateX(-50%) translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
  25% {
    transform: translateX(-50%) translateX(7vw) translateY(-16px) scale(1.13);
    opacity: 0.8;
  }
  50% {
    transform: translateX(-50%) translateX(0) translateY(-20px) scale(1.2);
    opacity: 0.6;
  }
  75% {
    transform: translateX(-50%) translateX(-7vw) translateY(-16px) scale(1.13);
    opacity: 0.8;
  }
}

/* Synchronized blur pulse (same duration/easing/delay as glow-drift above)
   — makes the "breathing" motion far more perceptible than transform
   alone, since the glow visibly softens/sharpens as it drifts. */
@keyframes glow-blur-drift {
  0%,
  100% {
    filter: blur(38px);
  }
  50% {
    filter: blur(58px);
  }
}

/* ---------- Hero (single-viewport section) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

/* Soft brand-blue glow. Built as a giant circle *concentric with the arc*
   (same center, radius = arc's radius + R) — this is necessary because the
   arc's curve genuinely dips a lot across the viewport width (hundreds of
   pixels, since it's a huge circle), so anything shaped as a flat/fixed-
   height box would poke out past the arc's own curve near the edges. A
   flat-bottomed dome was tried and rejected for exactly this reason.
   R is generous (200px/160px) so the radial-gradient (fixed-pixel sized,
   positioned to line up with the arc's own peak) can fully fade to
   transparent with real margin left before the outer's hard circular
   clip — giving the blur genuine room to soften the top edge instead of
   being cut short. Two layers:
   - .hero__glow (outer): position/size/animation + circular overflow clip
     + horizontal fade mask, matched to the arc's own mask stops so the
     glow visually spans the full width of the visible curve, edge to edge.
   - .hero__glow__inner: the actual radial-gradient + filter:blur. */
.hero__glow {
  position: absolute;
  top: calc(42% - 130px);
  left: 50%;
  width: calc(180vw + 260px);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 26.7%,
    black 36%,
    black 64%,
    transparent 73.3%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 26.7%,
    black 36%,
    black 64%,
    transparent 73.3%,
    transparent 100%
  );
  pointer-events: none;
  will-change: transform, opacity;
  animation:
    glow-enter 1.4s var(--ease-out) both,
    glow-drift 13s ease-in-out 1.4s infinite;
}

.hero__glow__inner {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 550px 80px at 50% 130px,
    rgba(0, 114, 219, 0.55) 0%,
    rgba(0, 114, 219, 0.34) 25%,
    rgba(0, 114, 219, 0.14) 55%,
    rgba(0, 114, 219, 0) 100%
  );
  filter: blur(38px);
  animation: glow-blur-drift 13s ease-in-out 1.4s infinite;
}

/* Decorative arc rising from the bottom, fading out toward the left and
   right edges of the viewport (mirrors the mockups). */
.hero__arc {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 180vw;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--arc-from) 0%, var(--arc-mid) 45%, var(--arc-to) 100%);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 26.7%,
    black 36%,
    black 64%,
    transparent 73.3%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 26.7%,
    black 36%,
    black 64%,
    transparent 73.3%,
    transparent 100%
  );
  pointer-events: none;
  animation: arc-enter 1.1s var(--ease-out) 0.08s both;
}

@supports not (aspect-ratio: 1 / 1) {
  .hero__arc {
    height: 180vw;
  }
}

.hero__logo {
  position: absolute;
  top: 23%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  margin: 0;
  line-height: 0;
  animation: fade-up 1.1s var(--ease-out) 0.22s both;
}

.hero__logo img {
  display: block;
  width: 52vw;
  height: auto;
}

.hero__contact {
  position: absolute;
  top: 52.3%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  text-align: center;
  width: max-content;
  max-width: 90vw;
  animation: fade-up 1.1s var(--ease-out) 0.42s both;
}

.hero__question {
  margin: 0 0 0.85em;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.hero__email {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--brand-blue);
  text-decoration: none;
}

.hero__email:hover,
.hero__email:focus-visible {
  text-decoration: underline;
}

/* ---------- Desktop (progressive enhancement) ---------- */

@media (min-width: 769px) {
  .hero__glow {
    top: calc(49% - 230px);
    width: calc(132vw + 460px);
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      transparent 10%,
      black 34%,
      black 66%,
      transparent 90%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      transparent 10%,
      black 34%,
      black 66%,
      transparent 90%,
      transparent 100%
    );
  }

  .hero__glow__inner {
    background: radial-gradient(
      ellipse 1000px 130px at 50% 230px,
      rgba(0, 114, 219, 0.55) 0%,
      rgba(0, 114, 219, 0.34) 25%,
      rgba(0, 114, 219, 0.14) 55%,
      rgba(0, 114, 219, 0) 100%
    );
    filter: blur(55px);
    animation-name: glow-blur-drift-desktop;
  }

  @keyframes glow-blur-drift-desktop {
    0%,
    100% {
      filter: blur(55px);
    }
    50% {
      filter: blur(80px);
    }
  }

  .hero__arc {
    top: 49%;
    width: 132vw;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      transparent 18%,
      black 31%,
      black 69%,
      transparent 82%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      transparent 18%,
      black 31%,
      black 69%,
      transparent 82%,
      transparent 100%
    );
  }

  @supports not (aspect-ratio: 1 / 1) {
    .hero__arc {
      height: 132vw;
    }
  }

  .hero__logo {
    top: 33.5%;
  }

  .hero__logo img {
    width: clamp(220px, 18.4vw, 320px);
  }

  .hero__contact {
    top: 78%;
  }

  .hero__question {
    font-size: clamp(15px, 1.05vw, 17px);
  }

  .hero__email {
    font-size: clamp(13px, 0.95vw, 15px);
  }
}

@media print {
  .hero__arc,
  .hero__glow {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero__glow,
  .hero__arc,
  .hero__logo,
  .hero__contact {
    animation: none !important;
  }
}
