/* ─── LANDING PAGE (index.html only) ─────────────────────────────────────────
   Holding-page layout: PS2-style boot logo + URDF arm canvas behind it.
────────────────────────────────────────────────────────────────────────────── */

html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Hero container ──────────────────────────────────────────────────────── */
#hero {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* WebGL canvas fills the hero, sits behind the text */
#arm-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* ── Hero inner layout — robot photo (~1/3) + logo/text column ─────────────── */
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(90px, 14vh, 160px) 48px 60px;
}

.hero-visual {
  flex: 0 1 33%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-robot {
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(74, 184, 232, 0.18));
  opacity: 0;
  animation: fade-in 1s 0.4s forwards ease-out;
}

.hero-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  pointer-events: none;
}

.boot-eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: rgba(74, 184, 232, 0.55);
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0;
  animation: fade-in 0.8s 0.4s forwards ease-out;
}

/* The H13 logo — PS2-boot-style emergence.
   Pulse intentionally avoided: animating multi-layer text-shadow forces
   Firefox to re-rasterise the blurred shadows every frame, which combined
   with the CRT screen-blend overlay tanks paint cost on big viewports. */
.hero-text .logo-wrap span {
  /* font-family: 'W95FA', 'Courier New', monospace;  was inheriting var(--font) */
  font-family: 'Silkscreen', monospace;
  font-size: clamp(56px, 11vw, 170px);
  font-weight: normal;
  /* font-weight: 900; */
  letter-spacing: 0.08em;
  -webkit-font-smoothing: none;
  color: #fff;
  text-shadow:
    0 0 10px var(--cyan),
    0 0 28px var(--cyan-mid),
    0 0 60px var(--cyan-dark);
  display: inline-block;
  opacity: 0;
  transform: scale(0.92);
  animation: boot-emerge 1.6s 0.8s forwards ease-out;
}

@keyframes boot-emerge {
  0%   { opacity: 0; transform: scale(0.92); filter: blur(6px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}

.tagline {
  margin-top: 22px;
  font-size: clamp(10px, 1.4vw, 13px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--cyan-mid);
  text-shadow: 0 0 10px var(--cyan-dark);
  clip-path: inset(0 0 100% 0);
  animation: wipe-in 0.9s 2.0s forwards ease-out;
}

.boot-status {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(74, 184, 232, 0.5);
  opacity: 0;
  animation:
    fade-in 0.8s 2.6s forwards ease-out,
    blink   1.6s step-end infinite 3.4s;
}

@keyframes wipe-in { to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes blink   { 50% { opacity: 0.35; } }

.hero-desc {
  margin-top: 26px;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.85;
  color: var(--text);
  max-width: 420px;
  opacity: 0;
  animation: fade-in 0.8s 2.9s forwards ease-out;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  pointer-events: auto; /* .hero-text disables clicks — re-enable for the buttons */
  opacity: 0;
  animation: fade-in 0.8s 3.2s forwards ease-out;
}

/* Footer sits flush to bottom */
#site-footer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #site-header { padding: 16px 22px; }
  #site-header nav { gap: 18px; }

  .hero-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: clamp(72px, 13vh, 120px) 24px 40px;
  }
  .hero-visual { flex: 0 0 auto; width: 55%; max-width: 240px; }
  .hero-text { align-items: center; text-align: center; }
  .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-text *,
  .hero-text .logo-wrap span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
  }
  .hero-robot {
    animation: none !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 40px rgba(74, 184, 232, 0.18)) !important;
  }
}


/* Deprecated */
/* ── Work section ───────────────────────────────────────────────────────── */
.work-section {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 90px;
}

.work-eyebrow {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(74, 184, 232, 0.55);
  margin-bottom: 28px;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.work-card {
  display: flex;
  align-items: center;
  gap: 32px;
  text-decoration: none;
  color: inherit;
}

/* alternate: even cards mirror image to the right */
.work-card:nth-child(even) {
  flex-direction: row-reverse;
}

.work-photo-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(74, 184, 232, 0.25);
  overflow: hidden;
}

.work-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-photo-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--cyan-mid);
  background: rgba(74, 184, 232, 0.06);
}

.work-photo-wrap.photo-missing .work-photo,
.work-photo-wrap.work-photo-placeholder-only .work-photo { display: none; }

.work-photo-wrap.photo-missing .work-photo-placeholder,
.work-photo-wrap.work-photo-placeholder-only .work-photo-placeholder { display: flex; }

.work-info {
  flex: 1 1 auto;
}

.work-title {
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0 0 6px;
}

.work-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.work-card-wip .work-title,
.work-card-wip .work-desc {
  color: rgba(255, 255, 255, 0.35);
}

.work-card:hover .work-photo-wrap {
  border-color: var(--cyan-mid);
}

@media (max-width: 768px) {
  .work-card,
  .work-card:nth-child(even) {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .work-photo-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}