/* ============================================================
   Voldatunnelen – Coming Soon
   style.css
   ============================================================ */


/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:          #1a2e4a;
  --navy-dark:     #0f1e32;
  --accent:        #f0a500;
  --accent-dark:   #c98a00;
  --text-light:    rgba(255, 255, 255, 0.85);
  --text-muted:    rgba(255, 255, 255, 0.50);
  --text-faint:    rgba(255, 255, 255, 0.30);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', sans-serif;

  --transition: 0.2s ease;
}


/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Fluid base font: 14px on 320px → 16px on 1200px */
  font-size: clamp(14px, 1.2vw + 10px, 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--navy-dark);
  color: white;
  min-height: 100vh;
  min-height: 100dvh; /* dvh respekterer nettleserens adresselinje på mobil */
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}


/* ── Background ─────────────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;

  /* pointer-events none is critical — prevents blocking clicks */
  pointer-events: none;

  background: linear-gradient(
    160deg,
    rgba(15, 30, 50, 0.97)  0%,
    rgba(26, 46, 74, 0.92)  60%,
    rgba(10, 18, 30, 0.98)  100%
  );
}

/* Subtle grid texture */
.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 165, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 165, 0, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Soft glow */
.bg::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 120vw);
  height: min(800px, 120vw);
  background: radial-gradient(ellipse, rgba(240, 165, 0, 0.06) 0%, transparent 70%);
}


/* ── Page wrapper ───────────────────────────────────────────── */
.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh; /* dvh tar hensyn til nettleserens UI-elementer */
  display: flex;
  flex-direction: column;
}


/* ── Main content ───────────────────────────────────────────── */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* Generous padding — scales with viewport */
  padding: clamp(5rem, 10vh, 8rem) clamp(1rem, 5vw, 3rem) clamp(2rem, 4vh, 3rem);
}


/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(240, 165, 0, 0.12);
  border: 1px solid rgba(240, 165, 0, 0.30);
  color: var(--accent);
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 2px;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  animation: fadeUp 0.7s ease both;
}

/* Pulsing dot */
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.4; transform: scale(0.7); }
}


/* ── Title ──────────────────────────────────────────────────── */
.title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  animation: fadeUp 0.7s 0.1s ease both;
}

.title-accent {
  color: var(--accent);
}


/* ── Divider ────────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: clamp(1.25rem, 3vw, 1.75rem) auto;
  animation: fadeUp 0.7s 0.2s ease both;
}


/* ── Description ────────────────────────────────────────────── */
.desc {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-light);
  max-width: min(520px, 90vw);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  animation: fadeUp 0.7s 0.3s ease both;
}


/* ── Stats ──────────────────────────────────────────────────── */
.stats {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
  animation: fadeUp 0.7s 0.4s ease both;

  /* Wrap gracefully on very small screens */
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 60px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: clamp(0.6rem, 1.5vw, 0.7rem);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-sep {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;

  /* Hide separator when stats wrap to avoid orphaned lines */
}

@media (max-width: 360px) {
  .stat-sep { display: none; }
}


/* ── Contact block ──────────────────────────────────────────── */
.contact-block {
  animation: fadeUp 0.7s 0.5s ease both;
}

.contact-label {
  font-size: clamp(0.68rem, 1.5vw, 0.75rem);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 165, 0, 0.30);
  padding-bottom: 2px;
  transition: border-color var(--transition), opacity var(--transition);

  /* Prevent overflow on very small screens */
  max-width: 90vw;
  word-break: break-all;
}

.contact-email:hover {
  opacity: 0.8;
  border-color: var(--accent);
}

.contact-email svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}


/* ── Road decoration ────────────────────────────────────────── */
.road {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 40px,
    transparent    40px,
    transparent    70px
  );
  opacity: 0.4;
}


/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;

  padding: clamp(1rem, 2.5vh, 1.5rem) clamp(1rem, 5vw, 2rem);
  font-size: clamp(0.72rem, 1.8vw, 0.8rem);
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  text-align: center;

  animation: fadeUp 0.7s 0.6s ease both;
}

.footer-sep {
  color: var(--text-faint);
}

.footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color var(--transition);
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}


/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ── Breakpoints ────────────────────────────────────────────── */

/* Large phones and up (≥ 480px) — default styles handle this well */

/* Small phones (< 480px) */
@media (max-width: 479px) {
  .page {
    justify-content: flex-start;
    padding-top: max(6rem, 15vh);
  }

  .stats {
    gap: 1rem;
  }
}

/* Very small phones (< 360px — e.g. iPhone SE 1st gen) */
@media (max-width: 359px) {
  .title {
    font-size: 2.4rem;
  }

  .contact-email {
    font-size: 0.82rem;
  }
}

/* Tablets and up (≥ 768px) */
@media (min-width: 768px) {
  .stats {
    gap: 3rem;
  }
}

/* Large screens (≥ 1200px) */
@media (min-width: 1200px) {
  .page {
    padding-top: 0;
    justify-content: center;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .page {
    padding-top: 2rem;
    justify-content: flex-start;
  }

  .badge {
    margin-bottom: 0.75rem;
  }

  .divider {
    margin: 0.75rem auto;
  }

  .desc {
    margin-bottom: 1.25rem;
  }

  .stats {
    margin-bottom: 1.5rem;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}