/* =========================================================================
   EMBER & OAK — "Coming Soon" landing page
   -------------------------------------------------------------------------
   This file is organised top to bottom as:
     1. Design tokens (colors, fonts, spacing) — safe to tweak here
     2. Reset / base styles
     3. Background layer (video, fallback image, overlay)
     4. Page layout & content
     5. Countdown
     6. Contact section
     7. Footer
     8. Animations
     9. Responsive breakpoints
========================================================================= */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   Change colors/fonts here and they update everywhere on the page.
------------------------------------------------------------------------- */
:root {
  /* Palette: warm espresso-black background with a brass/gold accent —
     evokes low restaurant lighting, copper cookware and candlelight. */
  --color-bg:          #0e0b08;
  --color-cream:       #f3ece0;   /* primary text on dark background */
  --color-muted:       #c9beac;   /* secondary text */
  --color-gold:        #c9a15a;   /* accent: buttons, borders, icons */
  --color-gold-bright: #e7c687;   /* countdown glow / hover highlight */
  --color-overlay-1:   rgba(12, 9, 6, 0.55);
  --color-overlay-2:   rgba(8, 6, 4, 0.88);

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing / sizing */
  --content-max-width: 880px;
  --radius-md: 10px;
  --radius-lg: 18px;
}

/* -------------------------------------------------------------------------
   2. RESET / BASE
------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-cream);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Respect users who have asked for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Keep a visible focus ring for keyboard users on all interactive elements */
a:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 4px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   3. BACKGROUND LAYER
   Stacking order (back to front): video -> fallback image -> dark overlay
------------------------------------------------------------------------- */
.bg-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: var(--color-bg); /* shows instantly before any media loads */
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Hidden by default; script.js reveals it only once the video is
     confirmed playable. This keeps the fallback image as the safe
     default on mobile data connections or if playback fails. */
  opacity: 0;
  transition: opacity 1.2s ease;
}

.bg-video.is-visible {
  opacity: 1;
}

.bg-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Dark gradient overlay: darker at top and bottom so the headline and
   contact section stay readable, slightly lighter through the middle
   so the footage is still visible. */
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      var(--color-overlay-2) 0%,
      var(--color-overlay-1) 28%,
      var(--color-overlay-1) 70%,
      var(--color-overlay-2) 100%
    );
}

/* -------------------------------------------------------------------------
   4. PAGE LAYOUT & CONTENT
------------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
  text-align: center;

  /* Page-load fade: the single orchestrated entrance for the page. */
  opacity: 0;
  animation: page-fade-in 1.4s ease forwards;
}

.content {
  width: 100%;
  max-width: var(--content-max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-gold-bright);
  font-weight: 500;
  opacity: 0;
  animation: rise-in 0.9s ease forwards;
  animation-delay: 0.3s;
}

.headline {
  margin: 0 0 2.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.1rem, 5.4vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-cream);
  max-width: 18ch;
  opacity: 0;
  animation: rise-in 0.9s ease forwards;
  animation-delay: 0.45s;
}

.logo {
  width: 108px;
  height: 108px;
  margin-bottom: 1.6rem;
  border-radius: 50%;
  opacity: 0;
  animation: logo-in 1s ease forwards;
  animation-delay: 0.15s;
}

.lede {
  margin: 0 0 3rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-muted);
  max-width: 42ch;
  opacity: 0;
  animation: rise-in 0.9s ease forwards;
  animation-delay: 0.6s;
}

/* -------------------------------------------------------------------------
   5. COUNTDOWN
------------------------------------------------------------------------- */
.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: rise-in 0.9s ease forwards;
  animation-delay: 0.75s;
}

.countdown__box {
  min-width: 84px;
  padding: 1.1rem 0.6rem 0.9rem;
  background: rgba(243, 236, 224, 0.05);
  border: 1px solid rgba(201, 161, 90, 0.35);
  border-radius: var(--radius-md);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  /* Soft, slow gold glow — the page's one "bold" recurring motion. */
  animation: glow-pulse 4.5s ease-in-out infinite;
}

/* Stagger the glow slightly so all four boxes don't pulse in lockstep */
.countdown__box:nth-child(2) { animation-delay: 0.4s; }
.countdown__box:nth-child(3) { animation-delay: 0.8s; }
.countdown__box:nth-child(4) { animation-delay: 1.2s; }

.countdown__value {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--color-gold-bright);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.03em;
}

.launched-message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--color-gold-bright);
  margin-bottom: 3rem;
}

/* -------------------------------------------------------------------------
   6. CONTACT SECTION
------------------------------------------------------------------------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  opacity: 0;
  animation: rise-in 0.9s ease forwards;
  animation-delay: 0.9s;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(201, 161, 90, 0.4);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--color-cream);
  background: rgba(243, 236, 224, 0.03);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.contact__link:hover,
.contact__link:focus-visible {
  background: rgba(201, 161, 90, 0.14);
  border-color: var(--color-gold-bright);
  transform: translateY(-2px);
}

.contact__icon {
  display: inline-flex;
  color: var(--color-gold-bright);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   7. FOOTER
------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-muted);
  opacity: 0.85;
}

/* -------------------------------------------------------------------------
   8. ANIMATIONS
------------------------------------------------------------------------- */
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(231, 198, 135, 0); }
  50%      { box-shadow: 0 0 22px rgba(231, 198, 135, 0.25); }
}

/* -------------------------------------------------------------------------
   9. RESPONSIVE BREAKPOINTS
------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  .page {
    padding-top: 4.5rem;
  }

  .logo {
    width: 92px;
    height: 92px;
  }

  .countdown__box {
    min-width: 74px;
    padding: 0.9rem 0.4rem 0.75rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .page {
    padding: 3.5rem 1.1rem 1.5rem;
  }

  .headline {
    max-width: 22ch;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  .countdown {
    gap: 0.6rem;
  }

  .countdown__box {
    min-width: 66px;
    padding: 0.75rem 0.3rem 0.6rem;
  }

  .countdown__value {
    font-size: 1.35rem;
  }

  .countdown__label {
    font-size: 0.62rem;
  }

  .contact {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .contact__link {
    justify-content: center;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .countdown__box {
    min-width: 58px;
  }
}
