/* ===== Variables ===== */
:root {
  --navy: #1a1a1a;
  --navy-dark: #0a0a0a;
  --navy-deep: #000000;
  --gray: #5c6470;
  --gray-light: #8b929c;
  --accent: #ffd500;
  --white: #ffffff;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--white);
  line-height: 1.5;
  background: var(--navy-dark);
  cursor: default;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* Hide native cursor only where the custom ring is active (desktop, fine pointer) */
body.has-cursor-ring, body.has-cursor-ring a, body.has-cursor-ring button {
  cursor: none;
}

/* ===== Custom cursor ring ===== */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 1px solid rgba(255, 213, 0, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.3s var(--ease-premium), height 0.3s var(--ease-premium), margin 0.3s var(--ease-premium), border-color 0.3s ease, background 0.3s ease;
}
.cursor-ring.active { opacity: 1; }
.cursor-ring.hover {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  background: rgba(255, 213, 0, 0.08);
  border-color: rgba(255, 213, 0, 1);
}

/* ===== Page shell ===== */
.page {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-section {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== Background layers (parallax depth) ===== */
.page-bg {
  position: absolute;
  inset: -3%;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: 50% 80%;
  will-change: transform, background-position;
  transform: scale(1.06);
  animation: bgDrift 28s ease-in-out infinite;
}
.page-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255, 213, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 213, 0, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse at center, black 15%, transparent 70%);
  will-change: transform, background-position;
  animation: gridDrift 44s linear infinite;
}
/* Slow autonomous drift — independent of the transform-based mouse parallax below,
   since it animates background-position rather than transform, the two never fight. */
@keyframes bgDrift {
  0%, 100% { background-position: 50% 80%; }
  50% { background-position: 52% 77%; }
}
@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 46px 46px; }
}
.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  will-change: transform, opacity;
}
.page-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.7) 55%, rgba(0, 0, 0, 0.85) 100%);
}

/* ===== HUD corner marks (engineering readout) ===== */
.hud-corner {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
}
.hud-tl { top: clamp(16px, 3vh, 28px); left: clamp(16px, 3vw, 32px); }
.hud-br { bottom: clamp(16px, 3vh, 28px); right: clamp(16px, 3vw, 32px); flex-direction: row-reverse; }
.hud-bracket {
  width: 14px;
  height: 14px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  opacity: 0.8;
}
.hud-br .hud-bracket {
  border-top: none;
  border-left: none;
  border-bottom: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
}
.hud-label {
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  white-space: nowrap;
}

/* ===== Main content ===== */
.page-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  padding: 2vh 32px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Logo (top center, above headline) ===== */
.logo-slot {
  width: 100%;
  height: clamp(92px, 14vh, 175px);
}
/* Positioned/sized via JS to match .logo-slot exactly (see syncLogoBlend in script.js).
   It lives as a sibling of the photo/overlay layers, not inside .page-content, because
   .page-content's z-index creates a stacking context that would trap mix-blend-mode
   and stop it from blending against the photo behind it. */
.logo-blend {
  position: absolute;
  z-index: 4;
  object-fit: contain;
  opacity: 1;
  mix-blend-mode: screen;
  pointer-events: none;
  left: 50%;
  top: clamp(16px, 3vh, 28px);
  height: clamp(92px, 14vh, 175px);
  width: auto;
  transform: translateX(-50%);
}

/* ===== Hero headline (choreographed reveal) ===== */
.hero-headline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--white);
}
.line-mask {
  display: block;
  overflow: hidden;
}
.line-inner {
  display: inline-block;
  will-change: transform;
}
.word {
  display: inline-block;
  will-change: transform, opacity;
}
.hl {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg, var(--accent) 20%, #fff6cc 40%, var(--white) 50%, #fff6cc 60%, var(--accent) 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.hl.sweep {
  animation: sweepGradient 5s linear infinite;
}
.hl.sweep::after {
  content: '';
  position: absolute;
  inset: -30% -10%;
  background: radial-gradient(ellipse at center, rgba(255, 213, 0, 0.35) 0%, transparent 70%);
  z-index: -1;
  animation: glowPulse 3.4s ease-in-out infinite;
}
@keyframes sweepGradient {
  0% { background-position: 0% 0; }
  100% { background-position: -220% 0; }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.hero-subtext {
  font-size: clamp(13.5px, 1.6vw, 16.5px);
  color: #cfcfcf;
  max-width: 560px;
  line-height: 1.7;
}

.hero-divider { width: 64px; height: 8px; }
.hero-divider svg { width: 100%; height: 100%; overflow: visible; }
.hero-divider line {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

/* ===== Services list ===== */
.services-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6vh 30px;
}
.services-list li {
  font-family: var(--font-head);
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: 500;
  color: #e0e0e0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  transition: color var(--transition), transform var(--transition), text-shadow var(--transition);
}
.li-mark {
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  background: transparent;
  display: inline-block;
  transition: transform 0.5s var(--ease-premium), background var(--transition);
}
.services-list li:hover {
  color: var(--white);
  transform: translateY(-2px);
  text-shadow: 0 0 18px rgba(255, 213, 0, 0.55);
}
.services-list li:hover .li-mark {
  transform: rotate(135deg);
  background: var(--accent);
}

/* ===== CTA button (magnetic, physical) ===== */
.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.8vh, 16px) clamp(30px, 4vw, 44px);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-dark);
  background: var(--accent);
  border-radius: 3px;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}
.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-premium);
}
.cta-button:hover::before { transform: translateX(120%); }
.cta-button:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.cta-glow {
  position: absolute;
  inset: -40%;
  z-index: -2;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 65%);
  opacity: 0;
  transition: opacity var(--transition);
}
.cta-button:hover .cta-glow { opacity: 1; }

/* ===== Contact row ===== */
.contact-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3vh 48px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.contact-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
}
.contact-item a,
.contact-item span:last-child {
  color: var(--white);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 500;
  transition: color var(--transition);
  display: inline-block;
}
.contact-item a:hover { color: var(--accent); }

/* ===== Footer ===== */
.page-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 2vh 24px 2.2vh;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-company {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 6px;
}
.footer-name {
  font-family: var(--font-head);
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 600;
  color: var(--white);
}
.footer-tagline {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-line {
  color: #a8a8a8;
  font-size: 11.5px;
  margin-bottom: 3px;
}
.footer-copy {
  color: #7a7a7a;
  font-size: 11px;
  margin-top: 6px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hl.sweep, .hl.sweep::after, .page-bg, .page-grid { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ===== Fallback: allow scroll on very short/small screens ===== */
@media (max-height: 700px), (max-width: 480px) {
  html, body { overflow-y: auto; }
  .page { height: auto; min-height: 100vh; }
  .page-content { gap: 3vh; padding: 6vh 24px; }
  .hud-corner { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .cursor-ring { display: none; }
  body.has-cursor-ring, body.has-cursor-ring a, body.has-cursor-ring button { cursor: auto; }
}
