/* Dreotech — Obsidian Aurora production styles */

:root {
  --bg: #050505;
  --surface: #141313;
  --panel: #1c1b1b;
  --panel-alt: #201f1f;
  --line: rgba(255, 255, 255, 0.12);
  --text: #e5e2e1;
  --muted: #a8abad;
  --accent: #00e1ab;
  --accent-bright: #36ffc4;
  --accent-dark: #00c994;
  --aurora-blue: #007aff;
  --aurora-purple: #bd00ff;
  --danger: #ffb4ab;
  --success: #00e1ab;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --shadow-glow: 0 0 30px rgba(0, 225, 171, 0.22);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --nav-h: 5.5rem;
  --section: min(1120px, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 225, 171, 0.1), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(0, 122, 255, 0.06), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(189, 0, 255, 0.04), transparent 30%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 20% 20%, rgba(0, 225, 171, 0.12), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(0, 122, 255, 0.06), transparent 20%),
    radial-gradient(circle at 50% 80%, rgba(0, 225, 171, 0.07), transparent 28%);
  opacity: 0.9;
}

.cursor-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.section-shell {
  width: var(--section);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.glass {
  background: rgba(20, 19, 19, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Nav */
.site-nav {
  position: fixed;
  left: 50%;
  top: 1.15rem;
  z-index: 50;
  width: min(92vw, 1120px);
  transform: translateX(-50%);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.brand-name,
.footer-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
}

.brand-sub,
.footer-brand .brand-sub {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(5, 5, 5, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-links {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: min(19.5rem, 86vw);
  height: 100dvh;
  height: 100vh;
  margin: 0;
  padding: 5.5rem 1.5rem 2rem;
  background: rgba(10, 10, 10, 0.96);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), visibility 0.35s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-links.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer-label {
  margin: 0 0 0.75rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-links .nav-text-link {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.7rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.25s var(--ease-out);
}

@media (max-width: 899px) {
  .nav-links .nav-text-link {
    transform: none !important;
  }
}

.nav-links .nav-text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.45rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.nav-links .nav-text-link:hover,
.nav-links .nav-text-link:focus-visible,
.nav-links .nav-text-link.is-active {
  color: var(--accent);
}

.nav-links .nav-text-link:hover::after,
.nav-links .nav-text-link:focus-visible::after,
.nav-links .nav-text-link.is-active::after {
  transform: scaleX(1);
}

.nav-links .nav-cta {
  margin-top: 1.25rem;
  width: 100%;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  z-index: 51;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .nav-toggle span:first-child {
  transform: translateY(4px) rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle,
  .nav-backdrop,
  .nav-drawer-label {
    display: none !important;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
  }

  .nav-links .nav-text-link {
    padding: 0.2rem 0;
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    transform: none;
  }

  .nav-links .nav-text-link::after {
    bottom: -0.2rem;
  }

  .nav-links .nav-cta {
    margin-top: 0;
    width: auto;
  }

  .nav-links .nav-text-link.magnetic-link {
    transform: none;
  }
}

body.nav-open .site-nav {
  z-index: 52;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease-out), background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-accent {
  background: var(--accent);
  color: #04140f;
  box-shadow: var(--shadow-glow);
}

.btn-accent:hover { background: var(--accent-bright); }

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-ghost:hover {
  border-color: rgba(0, 225, 171, 0.4);
  color: var(--accent);
}

.btn-sm { padding: 0.55rem 1rem; font-size: 0.62rem; }
.btn-block { width: 100%; }

/* Typography helpers */
.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
}

.muted { color: var(--muted); }
.accent-text { color: var(--accent); }

/* Hero */
.hero-shell {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 1rem 3.5rem;
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 70% 40%, rgba(0, 225, 171, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(0, 122, 255, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 2rem;
  }
}

.hero-brand-signal {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #fff;
  margin: 0 0 1.25rem;
}

.hero-brand-signal span {
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: uppercase;
  color: #fff;
}

.hero-title .accent {
  background: linear-gradient(120deg, var(--accent-bright), var(--accent), var(--aurora-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtext {
  margin: 1.4rem 0 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 2rem;
  width: 100%;
}

.hero-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.75rem 0.7rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-wrap: wrap;
    width: auto;
    gap: 0.85rem;
  }

  .hero-actions .btn {
    flex: 0 1 auto;
    padding: 0.85rem 1.6rem;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    white-space: nowrap;
  }
}

.hero-visual {
  position: relative;
  min-height: 320px;
  perspective: 1000px;
}

.hero-visual-inner {
  position: relative;
  height: 100%;
  min-height: 320px;
  transform-style: preserve-3d;
  transition: transform 0.15s linear;
  will-change: transform;
}

.hero-orbit {
  position: absolute;
  inset: 8% 12%;
  border-radius: 50%;
  border: 1px solid rgba(0, 225, 171, 0.25);
  box-shadow: inset 0 0 60px rgba(0, 225, 171, 0.08);
  animation: orbitSpin 28s linear infinite;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px dashed rgba(0, 122, 255, 0.25);
}

.hero-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 28%;
  background:
    linear-gradient(145deg, rgba(0, 225, 171, 0.18), rgba(0, 122, 255, 0.08)),
    rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(0, 225, 171, 0.35);
  box-shadow: var(--shadow-glow), 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: corePulse 4.5s ease-in-out infinite;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-code-icon {
  width: 58%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 14px rgba(0, 225, 171, 0.3));
}

.hero-shadow {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 6%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 225, 171, 0.25), transparent 70%);
  filter: blur(12px);
}

.hero-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 225, 171, 0.7), transparent);
  opacity: 0.7;
}

.hero-line.one { top: 28%; left: 8%; width: 38%; transform: rotate(-18deg); }
.hero-line.two { top: 58%; right: 6%; width: 42%; transform: rotate(14deg); }
.hero-line.three { bottom: 24%; left: 22%; width: 30%; transform: rotate(-8deg); }

.hero-vertex {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.hero-vertex.a { top: 22%; left: 18%; }
.hero-vertex.b { top: 35%; right: 16%; }
.hero-vertex.c { bottom: 30%; left: 28%; }
.hero-vertex.d { bottom: 22%; right: 24%; background: var(--aurora-blue); }

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes corePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.04); }
}

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: rise 0.9s var(--ease-out) forwards;
}

.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 260ms; }
.delay-4 { animation-delay: 360ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.parallax-element {
  will-change: transform;
  transition: transform 0.08s linear;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0;
}

.section-head {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-head p.lead {
  margin: 1rem auto 0;
  color: var(--muted);
  max-width: 32rem;
}

/* Packages */
.toggle-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.toggle-inner {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
}

.toggle-btn {
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.toggle-btn.active {
  background: var(--accent);
  color: #04140f;
}

.package-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .package-grid { grid-template-columns: repeat(3, 1fr); }
}

.package-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.package-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 225, 171, 0.35);
  box-shadow: var(--shadow-glow);
}

.package-card.is-featured {
  border-color: rgba(0, 225, 171, 0.4);
  background: linear-gradient(180deg, rgba(0, 225, 171, 0.1), rgba(10, 10, 10, 0.85));
}

.package-card h3 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
}

.package-card ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.package-card li { margin: 0.45rem 0; }
.package-card .btn { margin-top: 1.5rem; width: 100%; }

.badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.65rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-accent {
  background: var(--accent);
  color: #04140f;
  border-color: transparent;
}

.hidden { display: none !important; }

/* FAQ */
.faq-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .faq-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.faq-question span {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  transition: transform 0.35s var(--ease-out);
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.45s var(--ease-out),
    padding 0.45s var(--ease-out);
}

.faq-item.open .faq-answer-inner {
  padding: 0 0 1.1rem;
  opacity: 1;
  transform: translateY(0);
}

.process-steps {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.process-steps div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-size: 0.75rem;
}

/* Portal promo */
.portal-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 760px) {
  .portal-grid { grid-template-columns: 1fr 1fr; }
}

.portal-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.portal-card h3 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: #fff;
}

.portal-card .btn { margin-top: 1.5rem; }

/* Contact */
.contact-panel {
  border-radius: 2rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.95fr 1.05fr; }
}

.contact-meta {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-meta div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Tablets and up: sit contact details in a row; phones stay stacked */
@media (min-width: 480px) {
  .contact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
  }

  .contact-meta div {
    flex: 0 1 auto;
  }
}

.dot {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  border-color: rgba(0, 225, 171, 0.45);
  background: rgba(0, 225, 171, 0.08);
  box-shadow: 0 0 20px rgba(0, 225, 171, 0.12);
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.stack-form,
.form-panel {
  display: grid;
  gap: 1rem;
}

.form-panel {
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
}

.form-grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

label, fieldset {
  display: grid;
  gap: 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  border: 0;
  padding: 0;
  margin: 0;
}

input, select, textarea {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  color: #fff;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

select {
  color-scheme: dark;
  background-color: #141313;
  cursor: pointer;
}

select option,
select optgroup {
  background-color: #141313;
  color: #e5e2e1;
}

select option:checked,
select option:hover,
select option:focus {
  background-color: #1c1b1b;
  color: #36ffc4;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}

.channel-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: #fff;
}

.channel-row .chip {
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.channel-row .chip input[type="radio"],
.channel-row .chip input[type="checkbox"],
.chip input[type="radio"],
.chip input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

@media (min-width: 560px) {
  .channel-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .channel-row .chip {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    justify-content: center;
  }
}

.form-success {
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 225, 171, 0.25);
  background: rgba(0, 225, 171, 0.1);
  color: var(--accent);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.form-error {
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 180, 171, 0.35);
  background: rgba(255, 180, 171, 0.1);
  color: var(--danger);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1rem;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem);
  max-height: calc(100vh - 2rem);
  margin: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 19, 19, 0.95);
  padding: 1.4rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s var(--ease-out);
}

.modal-backdrop.is-open .modal-card {
  transform: none;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-head h3 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: #fff;
}

.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1.25rem;
}

.icon-btn:hover {
  border-color: rgba(0, 225, 171, 0.4);
  color: var(--accent);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: #050505;
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-tagline { margin: 0; color: var(--muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.footer-links a:hover { color: var(--accent); }

.footer-legal {
  margin: 0;
  max-width: 36rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Applications page */
.apps-hero {
  padding: calc(var(--nav-h) + 2.5rem) 0 2rem;
}

.apps-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0 2rem;
}

.apps-search {
  flex: 1 1 220px;
  max-width: 360px;
}

.chip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(0, 225, 171, 0.45);
  color: var(--accent);
  background: rgba(0, 225, 171, 0.08);
}

.apps-strip-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.apps-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 700px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1020px) {
  .apps-grid { grid-template-columns: repeat(3, 1fr); }
}

.app-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: grid;
  gap: 0.85rem;
  opacity: 1;
  transform: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), border-color 0.2s ease;
}

.app-card.is-hiding {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.app-card:hover {
  border-color: rgba(0, 225, 171, 0.35);
}

.app-card-top {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.app-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(0, 225, 171, 0.2), rgba(0, 122, 255, 0.12));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.app-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Auth / dashboards */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 1rem) 1rem 2rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: min(420px, 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.auth-card h1 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
}

.dash {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 1.5rem) 0 3rem;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.dash-head h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
}

.dash-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dash-nav a {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-nav a.active,
.dash-nav a:hover {
  color: var(--accent);
  border-color: rgba(0, 225, 171, 0.4);
  background: rgba(0, 225, 171, 0.08);
}

.kpi-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.kpi-card {
  border-radius: 1rem;
  padding: 1.15rem;
}

.kpi-card .label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-card .value {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.panel {
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 225, 171, 0.25);
  background: rgba(0, 225, 171, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
}

.status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.progress {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.flash {
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-ok {
  border: 1px solid rgba(0, 225, 171, 0.25);
  background: rgba(0, 225, 171, 0.1);
  color: var(--accent);
}

.flash-err {
  border: 1px solid rgba(255, 180, 171, 0.35);
  background: rgba(255, 180, 171, 0.1);
  color: var(--danger);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.detail-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-list li { margin: 0.3rem 0; }

.popia-note {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--text);
}

.check-row input {
  width: auto;
  margin-top: 0.2rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
