/* ============ uByteLabs static version ============ */
:root {
  --ub-bg: #0c0e0f;
  --ub-surface-lowest: #0c0e0f;
  --ub-primary: #22c55e;
  --ub-on-primary: #003915;
  --ub-on-surface: #e0e3e5;
  --ub-frame: #b8860b;
}

html.light {
  --ub-bg: #f5f7f6;
  --ub-surface-lowest: #ffffff;
  --ub-on-primary: #ffffff;
  --ub-on-surface: #0c0e0f;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--ub-bg);
  color: var(--ub-on-surface);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(34, 197, 94, 0.05) 0px, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.03) 0%, transparent 70%);
  overflow-x: hidden;
}
html.light body {
  background-image:
    radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.10) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(34, 197, 94, 0.06) 0px, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.04) 0%, transparent 70%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.page { position: relative; min-height: 100vh; overflow-x: hidden; }

/* Background gears */
.bg-elements {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.gear-overlay { animation: gear-rotate 40s linear infinite; }
.gear-tl {
  position: absolute;
  color: var(--ub-primary);
  opacity: 0.20;
  font-size: min(1200px, 140vw);
  top: clamp(-400px, -40vw, -120px);
  left: clamp(-400px, -40vw, -120px);
}
.gear-br {
  position: absolute;
  right: -2.5rem;
  bottom: 0;
  color: var(--ub-primary);
  opacity: 0.10;
  font-size: min(400px, 60vw);
}
.logo-bg-left {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  width: min(220px, 28vw);
  height: auto;
  opacity: 0.10;
  pointer-events: none;
  user-select: none;
}

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background-color: rgba(12,14,15,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s;
}
html.light .site-header {
  background-color: rgba(255,255,255,0.8);
  border-bottom-color: rgba(12,14,15,0.08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
@media (min-width: 640px) { .header-inner { height: 96px; padding: 0 1.5rem; } }

.brand { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
@media (min-width: 640px) { .brand { gap: 1rem; } }

.brand-logo {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 3px;
  border-radius: 0.25rem;
}
@media (min-width: 640px) { .brand-logo { width: 56px; height: 56px; } }

.brand-text { display: flex; flex-direction: column; justify-content: center; }
.brand-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ub-primary);
}
@media (min-width: 640px) { .brand-text h1 { font-size: 1.875rem; } }
.brand-text p {
  margin: 0.25rem 0 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
}
html.light .brand-text p { color: rgba(12,14,15,0.55); }
@media (min-width: 640px) { .brand-text p { font-size: 12px; } }

.header-right { display: flex; align-items: center; gap: 0.75rem; }
@media (min-width: 640px) { .header-right { gap: 1rem; } }
.terminal-label {
  display: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
}
html.light .terminal-label { color: rgba(12,14,15,0.45); }
@media (min-width: 768px) { .terminal-label { display: block; } }

.theme-toggle { position: relative; }
.toggle-track {
  position: relative;
  height: 32px; width: 64px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  transition: background-color 0.2s;
}
html.light .toggle-track { background: rgba(12,14,15,0.05); border-color: rgba(12,14,15,0.12); }
.toggle-track:hover { background: rgba(255,255,255,0.1); }
html.light .toggle-track:hover { background: rgba(12,14,15,0.08); }
.toggle-thumb {
  position: absolute;
  top: 4px; left: 4px;
  width: 24px; height: 24px;
  border-radius: 9999px;
  background: var(--ub-primary);
  box-shadow: 0 0 10px rgba(34,197,94,0.5);
  display: flex; align-items: center; justify-content: center;
  color: var(--ub-on-primary);
  transition: transform 0.3s;
}
.toggle-thumb .material-symbols-outlined { font-size: 16px; }
html.light .toggle-thumb { transform: translateX(32px); }

/* Main */
.main {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 1rem 4rem;
  transition: all 0.3s;
}
@media (min-width: 640px) { .main { padding: 8rem 1.5rem 6rem; } }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
  min-height: 55vh;
  margin-bottom: 5rem;
}
@media (min-width: 768px) { .hero { grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 8rem; } }

.hero-text {
  order: 1;
  text-align: center;
  display: flex; flex-direction: column; gap: 1.5rem;
}
@media (min-width: 640px) { .hero-text { gap: 2rem; } }
@media (min-width: 768px) { .hero-text { text-align: left; } }

.pill {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.1);
  padding: 0.25rem 0.75rem;
  color: var(--ub-primary);
  backdrop-filter: blur(4px);
}
@media (min-width: 768px) { .pill { align-self: flex-start; } }
.pill span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; }

.hero-title {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #ffffff;
}
html.light .hero-title { color: #0c0e0f; }
@media (min-width: 640px) { .hero-title { font-size: 56px; } }
@media (min-width: 1024px) { .hero-title { font-size: 72px; } }

.text-glow { text-shadow: 0 0 20px rgba(34,197,94,0.3); }
html.light .text-glow { text-shadow: 0 0 18px rgba(34,197,94,0.25); }

.hero-desc {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.625;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}
html.light .hero-desc { color: rgba(12,14,15,0.9); }
@media (min-width: 640px) { .hero-desc { font-size: 1.125rem; } }
@media (min-width: 768px) { .hero-desc { margin-left: 0; margin-right: 0; } }

.hero-icons-row {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-bottom: 0.5rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) { .hero-icons-row { margin-left: -4rem; margin-right: 0; } }

.hero-icon-btn {
  display: flex; align-items: center; justify-content: center;
  height: 48px; width: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #ffffff;
  transition: all 0.2s;
}
html.light .hero-icon-btn {
  border-color: rgba(12,14,15,0.12);
  background: rgba(12,14,15,0.04);
  color: #0c0e0f;
}
.hero-icon-btn:hover {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: var(--ub-primary);
  transform: translateY(-4px);
}
.hero-icon-btn:active { transform: scale(0.95); }
.hero-icon-btn svg { width: 20px; height: 20px; }

.progress-row {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
@media (min-width: 768px) { .progress-row { justify-content: flex-start; } }
.progress-bar {
  height: 6px; width: 128px;
  overflow: hidden; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.05);
}
html.light .progress-bar { background: rgba(12,14,15,0.04); border-color: rgba(12,14,15,0.08); }
.progress-fill {
  height: 100%; width: 98%;
  background: var(--ub-primary);
  box-shadow: 0 0 10px rgba(34,197,94,0.5);
}
.progress-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--ub-primary);
}

/* Hero image */
.hero-image {
  order: 2;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.image-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 320px;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
@media (min-width: 640px) { .image-frame { max-width: 28rem; } }

.engineer-backdrop {
  position: absolute;
  inset: 1.5rem;
  border-radius: 1.5rem;
  opacity: 0.9;
  background:
    radial-gradient(circle at 30% 25%, rgba(184,134,11,0.28), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(34,197,94,0.18), transparent 60%),
    linear-gradient(135deg, #1a1410 0%, #0c0e0f 60%, #0a1410 100%);
}
html.light .engineer-backdrop {
  background:
    radial-gradient(circle at 30% 25%, rgba(184,134,11,0.22), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(34,197,94,0.18), transparent 60%),
    linear-gradient(135deg, #fffaf0 0%, #f5f7f6 60%, #eef5ef 100%);
}

.zigzag-svg-wrap { position: absolute; inset: 0; z-index: 0; }
.zigzag-svg { height: 100%; width: 100%; filter: drop-shadow(0 0 30px rgba(34,197,94,0.2)); }
.zigzag-fill { fill: rgba(255,255,255,0.05); stroke: rgba(255,255,255,0.2); }
.reflective-border {
  stroke: var(--ub-primary);
  stroke-dasharray: 200;
  animation: reflective-flow 6s linear infinite;
}

.zigzag-cutout-container {
  position: relative;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  height: 100%; width: 100%;
  clip-path: polygon(0% 10%, 10% 0%, 20% 10%, 30% 0%, 40% 10%, 50% 0%, 60% 10%, 70% 0%, 80% 10%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 80% 90%, 70% 100%, 60% 90%, 50% 100%, 40% 90%, 30% 100%, 20% 90%, 10% 100%, 0% 90%);
}

.worker-animate {
  position: relative;
  height: 80%; width: 80%;
  display: flex; align-items: center; justify-content: center;
  animation: worker-float 4s ease-in-out infinite;
}
.yellow-frame {
  position: absolute; inset: 0;
  border-radius: 0.5rem;
  pointer-events: none;
  border: 3px solid #b8860b;
  box-shadow: 0 0 0 1px rgba(184,134,11,0.35) inset, 0 18px 40px rgba(184,134,11,0.25);
}
.engineer-img {
  position: relative;
  height: 100%; width: 100%;
  object-fit: contain;
  padding: 0.75rem;
  filter: drop-shadow(0 18px 40px rgba(184,134,11,0.25));
}

/* Services */
.services { margin-bottom: 5rem; }
@media (min-width: 640px) { .services { margin-bottom: 8rem; } }
.section-head { margin-bottom: 3rem; text-align: center; }
@media (min-width: 640px) { .section-head { margin-bottom: 4rem; } }
.section-head h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
}
html.light .section-head h3 { color: #0c0e0f; }
@media (min-width: 640px) { .section-head h3 { font-size: 1.875rem; } }
@media (min-width: 1024px) { .section-head h3 { font-size: 2.25rem; } }
.section-underline {
  margin: 0 auto;
  height: 4px; width: 96px;
  border-radius: 9999px;
  background: var(--ub-primary);
  box-shadow: 0 0 10px rgba(34,197,94,0.5);
}

.services-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 640px) { .services-grid { gap: 1.5rem; } }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  border-radius: 1rem;
  background: rgba(255,255,255,0.04);
  padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
html.light .service-card { background: rgba(12,14,15,0.04); }
@media (min-width: 640px) { .service-card { padding: 2rem; } }
.service-card.wide { grid-column: 1 / -1; }

.service-icon {
  margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  height: 56px; width: 56px;
  border-radius: 1rem;
  border: 1px solid rgba(34,197,94,0.2);
  background: rgba(34,197,94,0.08);
  box-shadow: 0 0 15px rgba(34,197,94,0.1);
  transition: transform 0.3s;
}
.service-card:hover .service-icon { transform: scale(1.1); }
.service-icon .material-symbols-outlined { color: var(--ub-primary); font-size: 32px; }
@media (min-width: 640px) {
  .service-icon { margin-bottom: 1.5rem; height: 64px; width: 64px; }
}
.service-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem; font-weight: 700; color: #ffffff;
}
html.light .service-card h4 { color: #0c0e0f; }
@media (min-width: 640px) { .service-card h4 { margin-bottom: 0.75rem; font-size: 1.25rem; } }
.service-card p {
  margin: 0;
  font-size: 0.875rem; line-height: 1.625;
  color: rgba(255,255,255,0.6);
  max-width: 42rem;
}
html.light .service-card p { color: rgba(12,14,15,0.7); }
@media (min-width: 640px) { .service-card p { font-size: 1rem; } }

/* Glass card shared */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html.light .glass-card { background: rgba(12,14,15,0.03); border-color: rgba(12,14,15,0.08); }
.glass-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(34,197,94,0.4);
}

/* CTA */
.cta {
  position: relative;
  margin: 0 auto;
  max-width: 56rem;
  overflow: hidden;
  border-radius: 2rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
@media (min-width: 640px) { .cta { padding: 3rem; } }
.cta-hover {
  position: absolute; inset: 0;
  background: rgba(34,197,94,0.05);
  opacity: 0;
  transition: opacity 0.3s;
}
.cta:hover .cta-hover { opacity: 1; }
.cta h3 {
  position: relative; z-index: 10;
  margin: 0 0 0.75rem;
  font-size: 1.5rem; font-weight: 700;
  color: #ffffff;
}
html.light .cta h3 { color: #0c0e0f; }
@media (min-width: 640px) { .cta h3 { margin-bottom: 1rem; font-size: 1.875rem; } }
@media (min-width: 1024px) { .cta h3 { font-size: 2.25rem; } }
.cta p {
  position: relative; z-index: 10;
  margin: 0 0 2rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
}
html.light .cta p { color: rgba(12,14,15,0.7); }
@media (min-width: 640px) { .cta p { margin-bottom: 2.5rem; font-size: 1.125rem; } }

.cta-buttons {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
@media (min-width: 640px) { .cta-buttons { gap: 1rem; } }
@media (min-width: 768px) { .cta-buttons { flex-direction: row; } }

.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 14px 24px;
  font-weight: 700;
  transition: all 0.2s;
}
@media (min-width: 640px) { .btn { padding: 16px 32px; } }
.btn:hover { transform: translateY(-4px); }
.btn:active { transform: scale(0.95); }
.btn-primary {
  background: var(--ub-primary);
  color: var(--ub-on-primary);
}
.btn-primary:hover { box-shadow: 0 10px 20px rgba(34,197,94,0.3); }
.btn-secondary {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}
html.light .btn-secondary { border-color: rgba(12,14,15,0.12); background: rgba(12,14,15,0.04); color: #0c0e0f; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
html.light .btn-secondary:hover { background: rgba(12,14,15,0.08); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Progress stripe band */
.stripe-wrap {
  position: relative; z-index: 20;
  height: 12px; width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.4);
}
html.light .stripe-wrap { background: rgba(255,255,255,0.4); border-top-color: rgba(12,14,15,0.08); }
.stripe-slide {
  position: absolute; top: 0; left: 0;
  display: flex;
  height: 100%; width: 200%;
  animation: infinite-slide 10s linear infinite;
}
.progress-stripe {
  height: 100%; width: 50%;
  opacity: 0.6;
  background: repeating-linear-gradient(45deg, #22c55e, #22c55e 20px, #16a34a 20px, #16a34a 40px);
}

/* Footer */
.site-footer {
  position: relative; z-index: 10;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(12,14,15,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem 1rem;
  transition: all 0.3s;
}
html.light .site-footer { background: rgba(255,255,255,0.8); border-top-color: rgba(12,14,15,0.08); }
@media (min-width: 640px) { .site-footer { padding: 3rem 1.5rem; } }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 640px) { .footer-inner { gap: 2rem; } }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }
.footer-brand { display: flex; flex-direction: column; align-items: center; }
.footer-logo {
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ub-primary);
}
@media (min-width: 640px) { .footer-logo { font-size: 1.5rem; } }
.footer-copy {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
}
html.light .footer-copy { color: rgba(12,14,15,0.55); }
.slogan {
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: rgba(34,197,94,0.8);
  text-transform: none;
}
.footer-right {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.5rem;
}
@media (min-width: 640px) { .footer-right { gap: 2rem; } }
@media (min-width: 768px) { .footer-right { flex-direction: row; } }
.footer-links { display: flex; gap: 1.5rem; }
@media (min-width: 640px) { .footer-links { gap: 2rem; } }
.footer-links a {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
html.light .footer-links a { color: rgba(12,14,15,0.55); }
.footer-links a:hover { color: var(--ub-primary); }
.powered-by {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
}
html.light .powered-by { color: rgba(12,14,15,0.55); }
.powered-by a {
  color: var(--ub-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.powered-by a:hover { color: #ffffff; }
html.light .powered-by a:hover { color: #0c0e0f; }

/* Scroll top */
.scroll-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  height: 48px; width: 48px;
  border-radius: 9999px;
  background: var(--ub-primary);
  color: var(--ub-on-primary);
  box-shadow: 0 10px 30px rgba(34,197,94,0.4);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}
.scroll-top .material-symbols-outlined { font-size: 26px; }
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { transform: translateY(-4px); }
.scroll-top.visible:hover { transform: translateY(-4px); }
.scroll-top:active { transform: scale(0.9); }

/* Blur when modal open */
.page.blurred .site-header,
.page.blurred .main,
.page.blurred .site-footer {
  filter: blur(4px) grayscale(1);
  opacity: 0.5;
}

/* ============ Modal ============ */
.modal-root {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-root[hidden] { display: none; }
@media (min-width: 640px) { .modal-root { padding: 1.5rem; } }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
html.light .modal-backdrop { background: rgba(255,255,255,0.55); }

.modal-wrap {
  position: relative;
  width: 100%;
  max-width: 56rem;
  display: flex; flex-direction: column; align-items: center;
  animation: modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-zigzag-top, .modal-zigzag-bottom {
  height: 12px; width: 100%;
  background: var(--ub-primary);
}
.modal-zigzag-top { box-shadow: 0 -10px 20px rgba(34,197,94,0.2); }
.modal-zigzag-bottom { box-shadow: 0 10px 20px rgba(34,197,94,0.2); }
.zigzag-border-top {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' width='20' height='10'%3E%3Cpolygon points='0,10 10,0 20,10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' width='20' height='10'%3E%3Cpolygon points='0,10 10,0 20,10'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  -webkit-mask-size: 20px 10px; mask-size: 20px 10px;
}
.zigzag-border-bottom {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' width='20' height='10'%3E%3Cpolygon points='0,0 10,10 20,0'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' width='20' height='10'%3E%3Cpolygon points='0,0 10,10 20,0'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  -webkit-mask-size: 20px 10px; mask-size: 20px 10px;
}

.modal-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(12,14,15,0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 50px 100px -20px rgba(0,0,0,0.8);
  padding: 3rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
html.light .modal-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(12,14,15,0.1);
  box-shadow: 0 50px 100px -20px rgba(12,14,15,0.25);
}
@media (min-width: 640px) { .modal-card { padding: 4rem 2.5rem; } }
@media (min-width: 768px) { .modal-card { padding: 5rem; } }

.modal-bg-logo, .modal-bg-logo-right {
  position: absolute;
  top: 1.5rem;
  opacity: 0.10;
  pointer-events: none;
}
.modal-bg-logo { left: -1.5rem; }
.modal-bg-logo-right { right: -1.5rem; }
.modal-bg-logo img, .modal-bg-logo-right img {
  height: 180px; width: 180px;
  object-fit: contain;
  opacity: 0.85;
}
@media (min-width: 640px) {
  .modal-bg-logo { left: 0.5rem; top: -1.5rem; }
  .modal-bg-logo-right { right: 0.5rem; top: -1.5rem; }
  .modal-bg-logo img, .modal-bg-logo-right img { height: 274px; width: 274px; }
}
@media (min-width: 768px) {
  .modal-bg-logo img, .modal-bg-logo-right img { height: 304px; width: 304px; }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  display: flex; align-items: center; justify-content: center;
  height: 44px; width: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
html.light .modal-close { border-color: rgba(12,14,15,0.12); color: rgba(12,14,15,0.6); }
.modal-close:hover { color: var(--ub-primary); background: rgba(255,255,255,0.1); }
html.light .modal-close:hover { background: rgba(12,14,15,0.08); }
.modal-close:active { transform: scale(0.9); }
.modal-close .material-symbols-outlined {
  font-size: 24px; line-height: 1; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 640px) {
  .modal-close { top: 1.5rem; right: 1.5rem; height: 48px; width: 48px; }
}

.modal-content {
  position: relative; z-index: 10;
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
}

.secure-pill-wrap {
  margin-bottom: 1.5rem;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}
@media (min-width: 640px) { .secure-pill-wrap { margin-bottom: 2rem; } }
.secure-zigzag-top, .secure-zigzag-bottom {
  height: 6px;
  width: 100%;
  background: var(--ub-primary);
  opacity: 0.3;
}
.secure-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1.25rem;
  background: rgba(34,197,94,0.1);
  border: none;
  border-left: 1px solid rgba(34,197,94,0.3);
  border-right: 1px solid rgba(34,197,94,0.3);
  backdrop-filter: blur(12px);
}
.secure-pill span {
  font-size: 11px; font-weight: 700;
  color: var(--ub-primary);
  letter-spacing: 0.25em;
}
@media (min-width: 640px) { .secure-pill span { font-size: 12px; } }

.email-block {
  margin-bottom: 2.5rem;
  position: relative;
  width: 100%;
}
@media (min-width: 640px) { .email-block { margin-bottom: 3rem; } }
.email-glow {
  position: absolute;
  inset: -2.5rem;
  border-radius: 9999px;
  background: rgba(34,197,94,0.1);
  filter: blur(48px);
  opacity: 0.5;
  transition: opacity 0.5s;
}
.email-block:hover .email-glow { opacity: 1; }
.email-inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.email-icon {
  color: var(--ub-primary);
  margin-bottom: 0.5rem;
  font-size: 56px;
  font-variation-settings: "FILL" 1;
}
.email-address {
  margin: 0;
  font-weight: 800; letter-spacing: -0.05em;
  color: #ffffff;

  font-size: clamp(16px, 6.5vw, 28px);
  white-space: nowrap;
}
html.light .email-address { color: #0c0e0f; }
@media (min-width: 640px) { .email-address { font-size: 40px; } }
@media (min-width: 768px) { .email-address { font-size: 56px; } }
@media (min-width: 1024px) { .email-address { font-size: 64px; } }
.email-sub {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  max-width: 28rem;
}
html.light .email-sub { color: rgba(12,14,15,0.6); }

.modal-actions {
  width: 100%; max-width: 42rem;
  display: flex; flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) { .modal-actions { gap: 1.5rem; } }
@media (min-width: 768px) { .modal-actions { flex-direction: row; } }
.modal-btn {
  flex: 1;
  padding: 16px 24px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .modal-btn { padding: 24px 32px; gap: 1rem; font-size: 15px; }
}
.modal-btn.btn-primary:hover { box-shadow: 0 0 30px rgba(34,197,94,0.5); }
.modal-btn.btn-secondary { border-width: 2px; }

.encrypted-note {
  margin-top: 2rem;
  display: flex; align-items: center; gap: 0.5rem;
  opacity: 0.5;
}
@media (min-width: 640px) { .encrypted-note { margin-top: 2.5rem; } }
.encrypted-note .material-symbols-outlined { font-size: 14px; }
.green-separator {
  color: var(--ub-primary);
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
}
.encrypted-note p {
  margin: 0;
  font-size: clamp(8px, 2.5vw, 10px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}
html.light .encrypted-note p { color: rgba(12,14,15,0.75); }
@media (min-width: 640px) { .encrypted-note p { font-size: 11px; letter-spacing: 0.1em; } }

/* Animations */
@keyframes gear-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin {
  animation: gear-rotate 6s linear infinite;
}
@keyframes worker-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(12px) rotate(0.5deg); }
}
@keyframes reflective-flow {
  0%   { stroke-dashoffset: 1000; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { stroke-dashoffset: -1000; opacity: 0; }
}
@keyframes infinite-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
