/* ============================================================
   RANDEVICA — Coming Soon
   styles.css
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg:           #09090B;
  --text-white:   #FFFFFF;
  --text-sub:     rgba(255, 255, 255, 0.52);
  --text-faint:   rgba(255, 255, 255, 0.28);

  --digit-bg-top: #252528;
  --digit-bg-bot: #1C1C20;
  --digit-fold:   rgba(0, 0, 0, 0.70);
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-white);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
}

/* ── Screen-reader utility ────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Background ───────────────────────────────────────────── */
.bg-environment {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

/* Orb — dark blue arc, only top edge visible */
.orb {
  position: absolute;
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  left: 50%;
  bottom: -920px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at 50% 14%,
    rgba(6, 182, 212, 0.09) 0%,
    rgba(12, 26, 54, 0.55) 28%,
    #0C1530 55%,
    #080D1C 80%,
    #050810 100%
  );
  border: 1px solid rgba(6, 182, 212, 0.20);
  box-shadow:
    0 0  50px 16px rgba(6, 182, 212, 0.07),
    0 0 140px 50px rgba(6, 182, 212, 0.04),
    inset 0 0  50px 16px rgba(6, 182, 212, 0.04);
}

.orb::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 300px;
  border-radius: 50%;
  left: 10%;
  top: -80px;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.07) 0%, transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}

/* Grain texture */
.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.030;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Page Wrapper ─────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 52px;
  background: transparent;
}

.logo {
  display: inline-flex;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px;
  transition: color 0.2s ease;
}

.header-icon:hover {
  color: rgba(255, 255, 255, 0.80);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 52px 90px;
}

/* ── Countdown ────────────────────────────────────────────── */
.countdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.countdown-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--text-sub);
  text-transform: uppercase;
}

.flip-clock {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flip-digit {
  position: relative;
  width: 96px;
  height: 114px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--digit-bg-top) 0%,
    var(--digit-bg-top) 50%,
    var(--digit-bg-bot) 50%,
    var(--digit-bg-bot) 100%
  );
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.65),
    0 2px   8px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Fold line */
.flip-digit::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: calc(50% - 1px);
  height: 2px;
  background: var(--digit-fold);
  z-index: 3;
}

.flip-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-inner span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 68px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1;
  letter-spacing: -0.02em;
  position: relative;
  top: -1px;
}

/* Flip-in animation */
@keyframes flipIn {
  0%   { transform: perspective(400px) rotateX(70deg); opacity: 0.3; }
  100% { transform: perspective(400px) rotateX(0deg);  opacity: 1;   }
}

.flip-digit.flipping .flip-inner {
  animation: flipIn 0.28s cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* ── Headline ─────────────────────────────────────────────── */
.headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.8vw, 64px);
  line-height: 1.20;
  letter-spacing: -0.025em;
  color: var(--text-white);
  max-width: 860px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

/* ── Subtext ──────────────────────────────────────────────── */
.subtext {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-sub);
  max-width: 560px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copy,
.footer-contact {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact:hover { color: var(--text-sub); }

/* ── Revealed (JS trigger) ────────────────────────────────── */
.page-wrapper.revealed .countdown-wrap {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0ms;
}

.page-wrapper.revealed .headline {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 150ms;
}

.page-wrapper.revealed .subtext {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 280ms;
}

/* ── Responsive — Tablet (≤1024px) ───────────────────────── */
@media (max-width: 1024px) {
  .site-header { padding: 28px 40px; }

  .logo-img { height: 36px; }

  .hero { padding: 120px 40px 80px; }

  .flip-digit {
    width: 88px;
    height: 104px;
    border-radius: 12px;
  }

  .flip-inner span { font-size: 62px; }

  .headline  { font-size: clamp(30px, 5.5vw, 56px); }
  .subtext   { font-size: clamp(15px, 2vw, 18px); }
}

/* ── Error Pages ──────────────────────────────────────────── */
.error-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 52px 80px;
  gap: 0;
}

.error-code {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(100px, 18vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.07);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.error-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3.5vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.error-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-sub);
  max-width: 440px;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 13px 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-white);
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s ease, transform 0.65s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Revealed states for error pages */
.page-wrapper.revealed .error-code  { opacity: 1; transform: translateY(0); transition-delay: 0ms;   }
.page-wrapper.revealed .error-title { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.page-wrapper.revealed .error-msg   { opacity: 1; transform: translateY(0); transition-delay: 210ms; }
.page-wrapper.revealed .btn-home    { opacity: 1; transform: translateY(0); transition-delay: 310ms; }

@media (max-width: 640px) {
  .error-hero { padding: 100px 24px 64px; }
  .error-code { font-size: clamp(80px, 22vw, 140px); margin-bottom: 24px; }
  .error-msg  { max-width: 100%; }
}

/* ── Responsive — Mobile (≤640px) ────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 22px 24px; }

  .logo-img { height: 32px; }

  .hero { padding: 100px 24px 64px; }

  .countdown-wrap { gap: 14px; margin-bottom: 44px; }

  .countdown-label { font-size: 11px; letter-spacing: 0.24em; }

  .flip-clock { gap: 8px; }

  .flip-digit {
    width: 76px;
    height: 90px;
    border-radius: 10px;
  }

  .flip-inner span { font-size: 52px; }

  .headline {
    font-size: clamp(28px, 8vw, 44px);
    max-width: 100%;
  }

  .subtext {
    font-size: clamp(14px, 4vw, 17px);
    max-width: 100%;
  }

  .subtext br { display: none; }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 18px 24px;
  }

  .footer-copy,
  .footer-contact { font-size: 12px; }
}

/* ── Responsive — Small Mobile (≤400px) ──────────────────── */
@media (max-width: 400px) {
  .logo-img { height: 28px; }

  .site-header { padding: 18px 18px; }

  .hero { padding: 88px 18px 56px; }

  .flip-digit {
    width: 64px;
    height: 76px;
    border-radius: 8px;
  }

  .flip-inner span { font-size: 43px; }

  .headline { font-size: clamp(26px, 9vw, 36px); }
}
