/* ponytail: plain static CSS, no Tailwind/framework.
   Stitch "Interactive Tech Redirect - Light 3D Edition" reconstructed
   with locally hosted background image (assets/img/bg-3d.jpg). */

:root {
  --primary: #6366f1;
  --secondary: #545f73;
  --ink: #191c1e;
  --ink-variant: #464554;
  --bg: #f7f9fb;
  --surface-bright: #f7f9fb;
  --surface-container-low: #f2f4f6;
  --surface-container: #eceef0;
  --surface-container-high: #e6e8ea;
  --surface-container-highest: #e0e3e5;
  --bg-3d: url("../img/bg-3d.jpg");
  --bg-3d-opacity: 0.15;
  --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --radius-pill: 9999px;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --pad-mobile: 20px;
  --pad-desktop: 64px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Playfair Display", "DM Sans", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* Visible focus */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------- Background image layer ------- */
.bg-3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--bg-3d);
  background-size: cover;
  background-position: center;
  opacity: var(--bg-3d-opacity);
  filter: blur(4px);
  pointer-events: none;
}

/* ------- Stage ------- */
.stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--pad-mobile);
  text-align: center;
}

@media (min-width: 768px) {
  .stage {
    padding: var(--pad-desktop);
  }
}

/* ------- Status indicator ------- */
.status {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary);
}

.status-dot {
  position: relative;
  display: inline-flex;
  height: 8px;
  width: 8px;
}
.status-dot__ping {
  position: absolute;
  inset: 0;
  display: inline-flex;
  border-radius: 9999px;
  background: var(--primary);
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.status-dot__core {
  position: relative;
  display: inline-flex;
  border-radius: 9999px;
  height: 8px;
  width: 8px;
  background: var(--primary);
}

@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.75; }
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ------- Brand / glitch title ------- */
.brand-wrap {
  margin-bottom: 48px;
  overflow: visible;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0;
  cursor: default;
  user-select: none;
  text-transform: none;
  animation: glitch-rgb-light 3s infinite linear alternate-reverse;
}
@media (min-width: 768px) {
  .brand {
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
}

@keyframes glitch-rgb-light {
  0%   { transform: translate(0); text-shadow: -2px 0 rgba(6, 182, 212, 0.4), 2px 0 rgba(99, 102, 241, 0.4); }
  25%  { transform: translate(1px, -1px); text-shadow: -1px 0 rgba(6, 182, 212, 0.3), 1px 0 rgba(99, 102, 241, 0.3); }
  50%  { transform: translate(-1px, 1px); text-shadow: 2px 0 rgba(6, 182, 212, 0.4), -2px 0 rgba(99, 102, 241, 0.4); }
  75%  { transform: translate(1px, 1px); text-shadow: -2px 0 rgba(6, 182, 212, 0.3), 2px 0 rgba(99, 102, 241, 0.3); }
  100% { transform: translate(0); text-shadow: -2px 0 rgba(6, 182, 212, 0.4), 2px 0 rgba(99, 102, 241, 0.4); }
}

/* ------- Glass panel terminal ------- */
.glass-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.terminal {
  width: 100%;
  max-width: 28rem;
  border-radius: var(--radius-pill);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ------- Countdown ------- */
.countdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 140px;
  justify-content: center;
}
.countdown {
  font-family: var(--font-mono);
  font-size: 6rem;
  font-weight: 700;
  color: rgba(25, 28, 30, 0.9);
  line-height: 1;
  display: inline-block;
}
@media (min-width: 768px) {
  .countdown { font-size: 8rem; }
}
.countdown.countdown-animation {
  animation: countdown-snap 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.countdown-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--ink-variant);
  margin: 8px 0 0;
  opacity: 0.6;
}

@keyframes countdown-snap {
  0%   { transform: scale(0.92); opacity: 0; }
  15%  { transform: scale(1.04); opacity: 1; }
  30%  { transform: scale(1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ------- Progress bar ------- */
.progress-row {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-variant);
  padding: 0 4px;
  letter-spacing: 0.1em;
}
.progress-track {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.5);
  height: 6px;
  background: rgba(224, 227, 229, 0.4);
}
.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #6366f1 100%);
  background-size: 200% 100%;
  transition: width 100ms linear;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  animation: gradientMove 3s linear infinite;
}
@keyframes gradientMove {
  0%   { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

/* ------- Button ------- */
.action-row {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.btn-enter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 48px;
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.5s, box-shadow 0.5s, opacity 0.3s;
}
.btn-enter:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.btn-enter:active { transform: scale(0.95); }
.btn-enter:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-enter__shimmer {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s;
}
.btn-enter:hover .btn-enter__shimmer { transform: translateY(0); }

.btn-enter__label,
.btn-enter__icon {
  position: relative;
}
.btn-enter__icon {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  transition: transform 0.3s;
}
.btn-enter:hover .btn-enter__icon { transform: translateX(4px); }

.btn-enter.btn-pulsate {
  animation: pulsate-glow-light 2s infinite ease-in-out;
}
@keyframes pulsate-glow-light {
  0%, 100% { box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.3); transform: scale(1); }
  50%      { box-shadow: 0 15px 40px -5px rgba(99, 102, 241, 0.5); transform: scale(1.02); }
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(70, 69, 84, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.meta-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: rgba(70, 69, 84, 0.2);
  border-radius: 9999px;
}
.ui-glow {
  cursor: default;
}
.ui-glow:hover {
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  transition: text-shadow 0.3s ease;
}

/* ------- Ambient text ------- */
.ambient {
  position: fixed;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  display: none;
}
@media (min-width: 768px) {
  .ambient { display: block; }
}
.ambient--bl {
  bottom: var(--pad-mobile);
  left: var(--pad-mobile);
  color: rgba(70, 69, 84, 0.8);
  text-align: left;
}
.ambient--tr {
  top: var(--pad-mobile);
  right: var(--pad-mobile);
  color: rgba(70, 69, 84, 0.7);
  text-align: right;
  letter-spacing: 0.05em;
}
.hl--primary { color: var(--primary); font-weight: 700; }
.hl--secondary { color: var(--secondary); font-weight: 700; }
.hl--ink { color: var(--ink); font-weight: 700; }
.dim { opacity: 0.6; }
/* ------- Reduced motion ------- */
@media (prefers-reduced-motion: reduce) {
  .rgb-glitch,
  .countdown.countdown-animation,
  .progress-bar,
  .status-dot__ping,
  .btn-enter.btn-pulsate {
    animation: none !important;
  }
  .stage {
    transform: none !important;
  }
  body {
    overflow: auto;
  }
}