/* Hero — full-width image, flush to top, header overlays */
.hero {
  position: relative;
}

.hero__media {
  position: relative;
  z-index: var(--z-background);
  width: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.05) 42%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0.88) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  z-index: var(--z-foreground);
  text-align: center;
  width: 100%;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  margin-inline: auto;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-red-bright);
  margin: 0 0 1.25rem;
}

.hero__headline {
  font-family: var(--font-tagline);
  font-size: clamp(0.65rem, 2.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  transform: translateY(-1rem);
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
  transition: opacity 0.35s ease;
}

@media (max-width: 900px) {
  .hero__media {
    margin-top: var(--header-height);
  }

  .hero__headline {
    font-size: clamp(0.91rem, 3.64vw, 1.5rem);
  }
}

@media (min-width: 640px) {
  .hero__headline {
    white-space: nowrap;
    text-wrap: nowrap;
  }
}

.hero__headline.is-fading {
  opacity: 0;
}

.hero__intro {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 42rem;
  margin: 1.25rem auto 0;
  text-align: left;
  text-wrap: pretty;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.hero__videos {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(0.45rem, 1.44vw, 0.9rem);
  width: min(100%, 43.2rem);
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  padding: 0;
  list-style: none;
}

.hero__videos li {
  flex: 1 1 0;
  min-width: 0;
}

.hero-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.55);
  aspect-ratio: 16 / 9;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform var(--transition);
}

.hero-video-thumb:hover,
.hero-video-thumb:focus-visible {
  transform: translateY(-2px);
  outline: none;
  background: rgba(0, 0, 0, 0.72);
}

.hero-video-thumb__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  pointer-events: none;
}

.hero-video-thumb__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.hero-video-thumb__icon::after {
  content: "";
  width: clamp(1.5rem, 4.2vw, 2.4rem);
  height: clamp(1.5rem, 4.2vw, 2.4rem);
  border-radius: 50%;
  background: rgba(200, 0, 0, 0.88);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  clip-path: polygon(38% 28%, 38% 72%, 72% 50%);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 2vw, 1rem);
}

.video-modal[hidden] {
  display: none;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 80rem, calc((100vh - 2.5rem) * 16 / 9));
  max-height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
}

.video-modal__player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
  box-shadow: var(--shadow-red), 0 24px 64px rgba(0, 0, 0, 0.65);
}

.video-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.video-modal__close:hover,
.video-modal__close:focus-visible {
  color: var(--accent-red-bright);
  background: rgba(0, 0, 0, 0.75);
  outline: none;
}

.video-modal__player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

body.has-video-modal {
  overflow: hidden;
}

.hero__cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--accent-red);
  border: 1px solid var(--accent-red-dark);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.hero__cta:hover {
  background: var(--accent-red-bright);
  color: #fff;
}

/* Foreground: above spaceship; hero/section backgrounds use --z-background */
.lead,
.contact-details,
.contact-form,
.pillar,
.project-card,
.video-embed,
.ad-card,
.hero__videos,
.hero-video-thumb,
.taglines li,
.form-group input,
.form-group textarea,
.form-submit {
  position: relative;
  z-index: var(--z-foreground);
  isolation: isolate;
}

/* Section content */
.lead {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-body);
  max-width: var(--content-width);
  margin-bottom: 2rem;
}

.video-embed {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 0 2rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius);
  max-width: 20rem;
}

/* Taglines — static grid */
.taglines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-width: var(--container);
}

@media (min-width: 640px) {
  .taglines {
    grid-template-columns: 1fr 1fr;
  }
}

.taglines li {
  padding: 0.875rem 1rem;
  border-left: 2px solid var(--accent-red);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-tagline);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-silver);
}

/* Ad card */
.ad-card {
  margin-top: 2.5rem;
  padding: 1.75rem;
  max-width: var(--content-width);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent-red);
  border-radius: var(--radius-lg);
}

.ad-card h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.ad-card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.ad-card__cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-silver);
  border: 1px solid var(--star-trail);
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
}

.ad-card__cta:hover {
  border-color: var(--accent-red);
  color: #fff;
}

/* Launchpad pillars */
.pillars {
  display: grid;
  gap: 1rem;
  margin-top: 0;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .pillars {
    grid-template-columns: repeat(5, 1fr);
  }
}

.pillar {
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.pillar,
.project-card,
.form-submit {
  transition: border-color 0.25s ease, background 0.25s ease;
}

.pillar::before,
.pillar::after,
.project-card::before,
.project-card::after,
.form-submit::before,
.form-submit::after,
.hero-video-thumb::before,
.hero-video-thumb::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    #800000,
    #c80000,
    #d32f2f,
    #ff6600,
    #ffaa00,
    #ffd000,
    #800000,
    #c80000,
    #d32f2f,
    #ff6600,
    #ffaa00,
    #ffd000
  );
  background-size: 400%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pillar::before,
.project-card::before,
.form-submit::before,
.hero-video-thumb::before {
  inset: -1px;
  padding: 1px;
  filter: saturate(0.85);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.pillar::after,
.project-card::after,
.form-submit::after,
.hero-video-thumb::after {
  inset: -20px;
  filter: blur(14px) saturate(0.85);
  z-index: -2;
}

.pillar:hover,
.project-card:hover,
.form-submit:hover,
.hero-video-thumb:hover,
.hero-video-thumb:focus-visible {
  border-color: transparent;
}

.pillar:hover,
.project-card:hover {
  background: var(--bg-elevated);
}

.pillar:hover::before,
.project-card:hover::before,
.form-submit:hover::before,
.hero-video-thumb:hover::before,
.hero-video-thumb:focus-visible::before {
  opacity: 1;
  animation: ember-border 8s linear infinite;
}

.pillar:hover::after,
.project-card:hover::after,
.form-submit:hover::after,
.hero-video-thumb:hover::after,
.hero-video-thumb:focus-visible::after {
  opacity: 0.15;
  animation: ember-border 8s linear infinite;
}

@keyframes ember-border {
  0% {
    background-position: 400% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.pillar__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  object-fit: contain;
  opacity: 0.9;
}

.pillar h3 {
  color: var(--text-silver);
  font-size: 1rem;
}

.pillar p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0;
  list-style: none;
  padding: 0;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.project-card__visual {
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, rgba(200, 0, 0, 0.15) 0%, #141414 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.project-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.project-card__body p {
  margin: 0;
  color: var(--text-body);
  max-width: none;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 0;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.4fr);
    align-items: start;
  }
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-block dt {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-block dd {
  margin: 0;
}

.contact-block a {
  color: var(--text-silver);
  text-decoration: none;
  font-size: 1rem;
}

.contact-block a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.social-links a:hover {
  border-color: var(--accent-red);
  color: var(--text-silver);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-silver);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-red);
}

.form-group textarea {
  min-height: 7rem;
  resize: vertical;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--accent-red-bright);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--accent-red-bright);
  margin: 0.3rem 0 0;
}

.form-submit {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #2d6a4f;
  border: 1px solid #1b4332;
  border-radius: var(--radius);
  cursor: pointer;
}

.form-submit:hover {
  background: #1b4332;
}

.form-status {
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.25rem;
}

.form-status.is-success {
  color: #8fd48f;
}

.mailto-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.mailto-hint a {
  color: var(--accent-red-bright);
}
