/* Brand palette */
:root {
  /* Primary palette */
  --color-soft-sandstone: #f0e6d8;
  --color-rockpool-blue-grey: #425a62;

  /* Secondary palette */
  --color-ocean-mist-blue: #a9c1ca;
  --color-driftwood-taupe: #bbaa99;
  --color-salt-foam-white: #f7f4ef;
  --color-coastal-shadow: #2e3436;

  /* Functional palette */
  --color-coral-alert: #e46a5a;
  --color-muted-desert-beige: #c8a78e;
  --color-coastal-mint: #bfdbc0;
  --color-soft-sky-blue: #dce7f2;
}

/* Root & reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background-color: var(--color-rockpool-blue-grey); /* Fallback behind video */
  color: var(--color-salt-foam-white);
}

/* Layout */
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--color-rockpool-blue-grey);
}

.video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(
    circle at top,
    var(--color-soft-sandstone) 0,
    var(--color-rockpool-blue-grey) 55%
  );
}

/* Videos */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  filter: saturate(1.1) contrast(1.1);
  background-color: var(--color-rockpool-blue-grey); /* Fallback while video loads */
}

.bg-video--active {
  opacity: 1;
}

/* Optional static fallback layer (can be replaced with an image) */
.video-fallback-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(66, 90, 98, 0.75),
      rgba(46, 52, 54, 0.95)
    ),
    radial-gradient(circle at top, #f0e6d8 0, #425a62 40%);
  background-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}

/* Shown if JS detects video failure */
.page.video-fallback .video-fallback-image {
  opacity: 1;
}

/* Overlay content */
.overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.4rem 1.6rem;
}

.content {
  max-width: 34rem;
  text-align: center;
  color: var(--color-salt-foam-white);
  /* Soft fade-in */
  opacity: 0;
  transform: translateY(10px);
  animation: content-fade-in 1.4s ease-out 0.3s forwards;
}

/* Footer */
.site-footer {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 2;
  font-size: 0.78rem;
  color: rgba(247, 244, 239, 0.7);
  text-align: right;
}

.footer-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
}

.footer-link {
  color: rgba(247, 244, 239, 0.9);
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

.footer-separator {
  opacity: 0.6;
}

/* Typography & logo */
.logo {
  margin: 0 0 1.8rem;
}

.logo-image {
  max-width: 260px;
  width: 70vw;
  height: auto;
  display: block;
  margin: 0 auto;
}

.subtitle {
  margin: 0 0 1.8rem;
  font-size: clamp(1rem, 4vw, 1.1rem);
  line-height: 1.6;
  color: var(--color-soft-sandstone);
  text-wrap: balance;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 52, 54, 0.16);
  background-color: var(--color-soft-sandstone);
  color: var(--color-coastal-shadow);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: sentence;
  box-shadow: 0 14px 40px rgba(46, 52, 54, 0.7);
  transition:
    background-position 220ms ease-out,
    box-shadow 220ms ease-out,
    transform 220ms ease-out,
    border-color 220ms ease-out,
    color 220ms ease-out;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(66, 90, 98, 0.45);
  border-color: rgba(46, 52, 54, 0.32);
}

.cta:focus-visible {
  outline: 2px solid var(--color-soft-sandstone);
  outline-offset: 3px;
}

/* Accessibility: ensure visible focus even if browser defaults are removed */
a:focus-visible {
  outline: 2px solid var(--color-soft-sandstone);
  outline-offset: 3px;
}

/* Overlay gradient to keep text readable over bright footage
   (slightly lighter than before so the videos are clearer). */
.overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at top,
      rgba(15, 23, 42, 0.3),
      rgba(15, 23, 42, 0.8)
    ),
    linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.55),
      rgba(15, 23, 42, 0.9)
    );
  pointer-events: none;
}

/* States when video fully unavailable */
.page.video-fallback .bg-video {
  display: none;
}

/* Animations */
@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive tweaks */
@media (min-width: 640px) {
  .subtitle {
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .overlay {
    padding: 3.5rem;
  }

  .content {
    max-width: 38rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .bg-video {
    transition: none;
  }
}


