/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Size variables so we can quickly tune the window and frame scale */
:root {
  /* Nearly full-screen frame */
  --frame-size: min(96vmin, 1040px);
  /* Radius of the transparent window opening */
  --window-radius: 42vmin;
  /* Extra scroll length to drive the flight path; tune to sync map vs. cards */
  --flight-extra-space: 200vh;
}

/* Sticky-scrolling track */
#earth-track {
  position: relative;
}

/* Fixed full-viewport map backdrop */
#map {
  position: fixed;
  inset: 0;
  z-index: 1; /* behind mask and overlays */
  pointer-events: none; /* non-interactive – scroll drives camera */
  width: 100%;
  height: 100vh; /* explicit height ensures render */
}

.scroll-spacer { height: var(--flight-extra-space); }

/* Legacy panel caption (not used now) removed */

.page-end {
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 1200px at 50% 40%, rgba(255,255,255,.06), transparent 60%);
}
.page-end .content { text-align: center; padding: 8rem 1rem; }
.page-end h2 { margin: 0 0 .25rem; font-size: 2rem; }
.page-end p { margin: .25rem 0; color: #cfd8dc; }
.page-end .hint { color: #90a4ae; font-size: .9rem; }

/* Logo frame overlay */
.logo-frame {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--frame-size);
  height: auto;
  opacity: .95;
  pointer-events: none;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.75));
}

/* Viewport mask: dark cabin with circular cutout */
.viewport-mask {
  position: fixed;
  inset: 0;
  z-index: 20; /* Must sit above #map (z-index:1) */
  pointer-events: none;
  /* Create a transparent circle using radial-gradient mask */
  --r: var(--window-radius);
  background:
    radial-gradient(circle at 50% 50%, transparent var(--r), #000 var(--r));
}

/* Brand header */
.brand {
  position: fixed;
  z-index: 40;
  left: 1rem;
  top: 1rem;
}
.brand-inner {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .5rem;
  background: rgba(0,0,0,.35);
  border-radius: .5rem;
  backdrop-filter: blur(6px);
}
.brand-mark { width: 32px; height: 32px; object-fit: contain; }
.brand-text h1 { font-size: 1rem; margin: 0; }
.brand-text p { font-size: .8rem; margin: 0; color: #b0bec5; }

/* Responsiveness */
@media (max-width: 680px) {
  .brand-text { display: none; }
}


/* Info cards as a staggered scroll stream */
.card-stream {
  position: relative;
  z-index: 45; /* above logo frame (30) and mask (20) so they aren't occluded */
  max-width: 1200px;
  margin: 5rem auto 2rem;
  padding: 0 1rem;
}

.card {
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

.card h3 { margin: 0 0 .5rem; font-size: 1.1rem; text-align: center; }
.card p { margin: 0; color: #d0d7de; }
.card + .card { margin-top: 16vh; }
.card .meta { display: block; margin-top: .5rem; color: #9fb3c8; text-align: center; }

.card.left { max-width: 520px; margin-left: 0; margin-right: auto; }
.card.right { max-width: 520px; margin-left: auto; margin-right: 0; }
.card.center { max-width: 900px; margin-left: auto; margin-right: auto; }
.card.large { padding: 1.25rem 1.25rem; }

.bullets { margin: .5rem 0 0; padding-left: 1.15rem; color: #d0d7de; }
.bullets li { margin: .35rem 0; }

/* Card media */
.card-figure {
  margin: 0 0 .75rem;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.card-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}
.card-figure figcaption {
  margin-top: .35rem;
  font-size: .85rem;
  color: #9fb3c8;
  text-align: center;
}

/* Removed extra pseudo spacing after cards to tighten layout */

.contact-list {
  list-style: none;
  padding: .5rem 0 0;
  margin: 0;
  display: grid;
  gap: .25rem;
}

.contact-list a.tel { color: #fff; text-decoration: none; }
.contact-list a.tel:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .card-stream { margin-top: 5.25rem; }
  .card.left, .card.right { max-width: none; }
}

/* Contact form */
.contact-form { margin-top: .75rem; display: grid; gap: .75rem; }
.contact-form .field { display: grid; gap: .35rem; }
.contact-form label { font-size: .9rem; color: #c9d4df; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  border-radius: .5rem;
  padding: .6rem .7rem;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: #90caf9; box-shadow: 0 0 0 3px rgba(144,202,249,.18); }
.contact-form .actions { display: flex; justify-content: flex-end; }
.contact-form button {
  background: #ffffff;
  color: #000;
  border: none;
  border-radius: .5rem;
  padding: .6rem .9rem;
  cursor: pointer;
}
.contact-form button:hover { filter: brightness(.9); }


