/* ============================================================
   LOGIC THEORY LAB — Coming Soon
   Dark-first, cyberpunk/circuit-board aesthetic
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
  /* Core palette — dark mode */
  --bg:           #070b14;
  --bg-glass:     rgba(7, 12, 28, 0.82);
  --border:       rgba(0, 245, 255, 0.12);
  --border-hover: rgba(0, 245, 255, 0.35);

  --cyan:       #00f5ff;
  --cyan-rgb:   0, 245, 255;
  --purple:     #a855f7;
  --purple-rgb: 168, 85, 247;
  --green:      #00ff88;
  --green-rgb:  0, 255, 136;
  --orange:     #ff6b2b;
  --orange-rgb: 255, 107, 43;

  --text:       #dde8f8;
  --text-muted: #5e7da8;

  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-card: 1.25rem;
  --transition:  0.3s ease;
}

[data-theme="light"] {
  --bg:           #edf2ff;
  --bg-glass:     rgba(248, 250, 255, 0.88);
  --border:       rgba(8, 145, 178, 0.15);
  --border-hover: rgba(8, 145, 178, 0.4);

  --cyan:       #0891b2;
  --cyan-rgb:   8, 145, 178;
  --purple:     #7c3aed;
  --purple-rgb: 124, 58, 237;
  --green:      #059669;
  --green-rgb:  5, 150, 105;

  --text:       #0f1f3d;
  --text-muted: #4a6280;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* === CANVAS BACKGROUND === */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* === SCANLINES === */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.04) 3px,
    rgba(0, 0, 0, 0.04) 4px
  );
}

[data-theme="light"] .scanlines {
  opacity: 0.4;
}

/* === THEME TOGGLE === */
.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.25);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

/* Show/hide sun vs moon based on theme */
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* === MAIN LAYOUT === */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 10;
}

/* === GLASS CARD === */
.card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2.75rem 2.5rem 2.25rem;
  max-width: 620px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow: hidden;
  animation: card-breathe 6s ease-in-out infinite;
}

@keyframes card-breathe {
  0%,  100% { box-shadow: 0 0 40px rgba(var(--cyan-rgb), 0.06),   0 30px 60px rgba(0,0,0,0.35); }
  33%        { box-shadow: 0 0 40px rgba(var(--purple-rgb), 0.08), 0 30px 60px rgba(0,0,0,0.35); }
  66%        { box-shadow: 0 0 40px rgba(var(--green-rgb), 0.06),  0 30px 60px rgba(0,0,0,0.35); }
}

/* === TOP ACCENT LINE === */
.card-accent-line {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--cyan-rgb), 0.8),
    rgba(var(--purple-rgb), 0.8),
    rgba(var(--green-rgb), 0.8),
    transparent
  );
  background-size: 200% 100%;
  animation: line-sweep 4s linear infinite;
}

@keyframes line-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === HUD CORNER BRACKETS === */
.hud-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.4;
  transition: opacity var(--transition);
}
.card:hover .hud-corner { opacity: 0.75; }

.hud-tl { top: 12px;  left: 12px;  border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.hud-tr { top: 12px;  right: 12px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.hud-bl { bottom: 12px; left: 12px;  border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.hud-br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

/* === LOGO === */
.logo-wrap {
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  height: 56px;
  max-width: 260px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(var(--cyan-rgb), 0.28));
  transition: filter var(--transition);
}

.logo:hover {
  filter: drop-shadow(0 0 22px rgba(var(--cyan-rgb), 0.5));
}

/* Fallback text logo */
.logo-fallback {
  align-items: center;
  gap: 0;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lf-logic { color: var(--text); }
.lf-lab   { color: var(--orange); }

/* === STATUS BAR === */
.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(var(--cyan-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.05);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(var(--green-rgb), 0.8);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,  100% { opacity: 1;   transform: scale(1); }
  50%        { opacity: 0.5; transform: scale(0.8); }
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  border-right: 1.5px solid var(--cyan);
}

/* === HEADLINE === */
.headline {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}

.headline-grad {
  background: linear-gradient(
    135deg,
    var(--cyan)   0%,
    var(--purple) 45%,
    var(--green)  100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: grad-shift 5s ease infinite;
}

@keyframes grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === SUBHEADLINE === */
.subhead {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 2rem;
}

/* === COUNTDOWN === */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 2.25rem;
}

.cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
}

.cd-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(var(--cyan-rgb), 0.45);
  letter-spacing: 0.04em;
  /* Flip animation on change */
  display: inline-block;
  transition: transform 0.15s ease;
}

.cd-num.flip {
  animation: num-flip 0.2s ease;
}

@keyframes num-flip {
  0%   { transform: translateY(-4px); opacity: 0.5; }
  100% { transform: translateY(0);    opacity: 1; }
}

.cd-lbl {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.cd-sep {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--purple);
  opacity: 0.55;
  margin-top: 0;
  padding-top: 0.05em;
  animation: blink-sep 1.2s step-end infinite;
}

@keyframes blink-sep {
  0%,  100% { opacity: 0.55; }
  50%        { opacity: 0.15; }
}

/* === NOTIFY SECTION === */
.notify-wrap {
  margin-bottom: 1.75rem;
}

.notify-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.notify-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.input-wrap {
  flex: 1;
  position: relative;
}

.notify-input {
  width: 100%;
  padding: 0.72rem 1rem;
  background: rgba(var(--cyan-rgb), 0.04);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.notify-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.notify-input:focus {
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.07);
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.1);
}

.notify-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border: none;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.notify-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.notify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(var(--cyan-rgb), 0.35);
}

.notify-btn:hover::before { opacity: 1; }
.notify-btn:active         { transform: translateY(0); }

.btn-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.notify-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Success state */
.notify-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.6rem;
  animation: fade-in 0.4s ease;
}

.notify-success.visible {
  display: flex;
}

.success-icon {
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(var(--green-rgb), 0.7);
}

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

/* === DIVIDER === */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto 1.25rem;
  max-width: 240px;
}

.divider span:first-child,
.divider span:last-child {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-dot {
  flex: none !important;
  width: 4px !important;
  height: 4px !important;
  background: var(--purple) !important;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(var(--purple-rgb), 0.6);
}

/* === SISTER LINK === */
.sister-link {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sister-link a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity var(--transition), text-shadow var(--transition);
}

.sister-link a:hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.5);
}

/* === SITE FOOTER === */
.site-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0.7;
}

.footer-sep {
  font-family: var(--font-mono);
  color: var(--purple);
  opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 520px) {
  .card {
    padding: 2rem 1.25rem 1.75rem;
  }

  .notify-form {
    flex-direction: column;
  }

  .notify-btn {
    justify-content: center;
  }

  .cd-block {
    min-width: 54px;
  }

  .cd-num {
    font-size: 1.8rem;
  }

  .cd-sep {
    font-size: 1.8rem;
  }
}

@media (max-width: 360px) {
  .headline {
    font-size: 1.75rem;
  }

  .countdown {
    gap: 0;
  }

  .cd-block {
    min-width: 46px;
  }
}

/* === ENTRY ANIMATIONS === */
.card {
  animation: card-breathe 6s ease-in-out infinite, card-enter 0.7s ease both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
