/* First Contact — a cinematic Vertex scene with accessible motion controls. */
:root { --electric-base: #050f1c; --electric-teal-rgb: 82,169,155; --electric-gold-rgb: 239,166,0; }
.electric-surface {
  --craft-x: 72; --craft-y: 43; --sky-y: 0; --earth-y: 89;
  position: relative; isolation: isolate; overflow: hidden;
  color: #f3f8fa; background: var(--electric-base); border-color: #25424e;
}
.electric-field { position: absolute; inset: 0; z-index: -2; pointer-events: none; contain: strict; }
.scene-sky { position: absolute; inset: 0; background: #050f1c; }
/* Australia's centre is at 54% of the source image. Translate the original
   composition so that point sits directly beneath the vessel, without stretching. */
.scene-sky::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc((var(--craft-x) - 54) * 1%); right: calc((54 - var(--craft-x)) * 1%); background: url('../images/night-earth-australia.webp') center / 100% 100% no-repeat; -webkit-mask-image: linear-gradient(90deg,transparent,#000 14%); mask-image: linear-gradient(90deg,transparent,#000 14%); }
.scene-earth-glow { position: absolute; inset: 60% 0 0; background: radial-gradient(ellipse at calc(var(--craft-x) * 1%) 70%, #52a99b1a 0, transparent 52%); animation: earth-breathe 9s ease-in-out infinite; animation-play-state: paused; }
.scene-craft { position: absolute; left: calc(var(--craft-x) * 1%); top: calc(var(--craft-y) * 1%); width: min(43vw,580px); transform: translate(-50%,-50%); z-index: 3; }
.scene-craft img { display: block; width: 100%; height: auto; animation: craft-hover 9s ease-in-out infinite; animation-play-state: paused; filter: drop-shadow(0 12px 18px #00000060); }
.electric-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.electric-surface::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg,#050f1cf5 0%,#050f1cdb 31%,#050f1c85 46%,#050f1c0a 63%,transparent 100%); }
.hero.electric-surface .hero-grid { display: block; min-height: 680px; padding-block: 86px 52px; }
.hero-copy { width: min(53%,650px); }
.electric-surface h1 { color: #f3f8fa; }
.hero.electric-surface h1 span { color: #91d8c9; }
.hero.electric-surface .eyebrow { color: #bbd4d9; }
.hero.electric-surface .hero-lead { color: #e1edf0; }
.hero.electric-surface .hero-description,.hero.electric-surface .hero-location { color: #bbced6; }
.hero.electric-surface .hero-location span { color: #91b1bf; }
.hero.electric-surface .button-primary { background: var(--gold); color: var(--navy-deep); }
.hero.electric-surface .button-primary:hover { background: #ffd067; box-shadow: 0 0 28px #efa60035; }
.hero.electric-surface .text-link { color: #dcf0eb; }
.hero.electric-surface .text-link:hover { color: #fff; }
.hero.electric-surface .hero-bottom { border-color: #aacacc30; color: #d1e0e4; text-shadow: 0 1px 4px #000; }
.hero.electric-surface .hero-bottom span { color: #aac6cd; }
.electric-surface a:focus-visible,.electric-motion:focus-visible { outline: 3px solid #ffd067; outline-offset: 5px; }
.electric-toolbar { display: flex; justify-content: flex-end; padding-block: 0 16px; }
.electric-motion { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; color: #d4e6eb; border: 1px solid #7195a170; background: #071b2be8; border-radius: 4px; font: 500 .8125rem/1.4 var(--font); cursor: pointer; }
.electric-motion[hidden] { display: none; }
.electric-motion:hover { background: #15364b; border-color: #8bcdbf; }
.electric-motion-icon { width: 9px; height: 12px; border-inline: 3px solid currentColor; }
.electric-motion[data-paused='true'] .electric-motion-icon { border: 0; width: 0; height: 0; border-block: 6px solid transparent; border-left: 9px solid currentColor; }
.architecture-section { padding-block: 36px; background: #0d2232; border-top: 1px solid #4b7a7d36; }
.architecture-section .architecture { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.architecture-section .architecture-heading { margin-bottom: 24px; }
.architecture-section .architecture-heading h2 { font-size: 1.4rem; }
.architecture-section .architecture-stack { grid-template-columns: repeat(4,1fr); gap: 14px; }
.architecture-section .architecture-layer { gap: 12px; align-items: flex-start; padding: 20px 16px; background: #ffffff03; }
.architecture-section .layer-number { flex: 0 0 auto; }
.architecture-section .architecture-foundation { margin-top: 20px; color: #d3e3e9; }
.contact.electric-surface { --craft-x: 78; --craft-y: 35; --sky-y: 0; --earth-y: 89; }
.contact .scene-craft { width: min(30vw,440px); opacity: 1; }
.contact .electric-field { opacity: .52; }
.contact.electric-surface::after { background: linear-gradient(90deg,#050f1cf5,#050f1cce 68%,#050f1c70); }
.contact .electric-toolbar { padding-block: 24px 0; }
[data-motion='running'] .scene-craft img,[data-motion='running'] .scene-earth-glow { animation-play-state: running; }
[data-motion='paused'] .scene-craft img,[data-motion='paused'] .scene-earth-glow { animation-play-state: paused; }
@keyframes craft-hover { 0%,100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-8px) rotate(.3deg); } }
@keyframes earth-breathe { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@media (min-width: 1600px) { .hero.electric-surface .hero-grid { min-height: 730px; padding-top: 108px; } }
@media (max-width: 1100px) {
  .hero-copy { width: 56%; }
  .hero.electric-surface .hero-grid { min-height: 700px; }
  .hero.electric-surface h1 { font-size: clamp(2.5rem,4.5vw,3.5rem); }
  .architecture-section .architecture-stack { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 800px) {
  .hero.electric-surface { --craft-x: 62; --craft-y: 73; --sky-y: 46; --earth-y: 93; }
  .hero.electric-surface .hero-grid { padding-block: 56px 400px; min-height: 0; }
  .hero-copy { width: 100%; max-width: 640px; }
  .hero.electric-surface::after { background: linear-gradient(180deg,#050f1cf5 0%,#050f1cda 33%,#050f1c60 52%,transparent 68%,#050f1c10 100%); }
  .scene-sky::before { top: auto; bottom: 0; left: calc(var(--craft-x) * 1%); right: auto; width: auto; height: 60%; aspect-ratio: 1672 / 941; transform: translateX(-54%); -webkit-mask-image: linear-gradient(180deg,transparent,#000 10%); mask-image: linear-gradient(180deg,transparent,#000 10%); }
  .scene-craft { width: min(76vw,590px); }
  .hero.electric-surface .hero-bottom { background: #050f1c80; }
  .hero.electric-surface .electric-toolbar { padding-top: 10px; }
  .contact .scene-craft { width: 55vw; }
  .contact.electric-surface { --craft-x: 62; }
  .contact .scene-sky::before { height: 100%; }
  .architecture-section { padding-block: 30px; }
}
@media (max-width: 600px) {
  .hero.electric-surface .hero-grid { padding-block: 42px 360px; }
  .hero.electric-surface h1 { font-size: clamp(2.1rem,8vw,2.85rem); }
  .hero.electric-surface { --craft-x: 62; --craft-y: 75; --sky-y: 55; --earth-y: 93; }
  .scene-craft { width: 76vw; }
  .hero.electric-surface .hero-bottom { gap: 6px; }
  .architecture-section .architecture-stack { grid-template-columns: 1fr; }
  .architecture-section .architecture-layer { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .electric-field canvas,.electric-toolbar { display: none; }
  .scene-craft img,.scene-earth-glow { animation: none; }
}
@media (forced-colors: active) {
  .electric-field,.electric-toolbar,.electric-surface::after { display: none; }
  .electric-surface,.architecture-section { background: Canvas; color: CanvasText; }
  .hero.electric-surface h1,.hero.electric-surface h1 span,.hero.electric-surface .eyebrow,
  .hero.electric-surface .hero-lead,.hero.electric-surface .hero-description,
  .hero.electric-surface .hero-location,.hero.electric-surface .hero-bottom,.hero.electric-surface .text-link { color: CanvasText; }
  .hero.electric-surface .button-primary { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; }
  .hero.electric-surface .hero-grid { min-height: 0; padding-block: 42px; }
}
@media print {
  .electric-field,.electric-toolbar,.electric-surface::after,.architecture-section { display: none !important; }
  .electric-surface { background: #fff !important; color: #000 !important; }
  .hero.electric-surface .hero-grid { min-height: 0; padding-block: 20px; }
  .hero-copy { width: 100%; }
  .hero.electric-surface h1,.hero.electric-surface h1 span,.hero.electric-surface .eyebrow,
  .hero.electric-surface .hero-lead,.hero.electric-surface .hero-description,.hero.electric-surface .hero-location { color: #000; }
}
