/* ════════════════════════════════════════════════════════════════════════════
   ELLIPSY — Dark Cosmic Design System
   ════════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --bg-deep: #0b0b14;
  --bg-card: rgba(15, 15, 25, 0.6);
  --bg-card-hover: rgba(20, 20, 35, 0.8);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Text Colors */
  --text-primary: rgba(240, 235, 255, 0.9);
  --text-secondary: rgba(200, 195, 220, 0.65);
  --text-muted: rgba(180, 175, 200, 0.45);

  /* Accents */
  --accent-violet: #a070d0;
  --accent-cyan: #66ffff;
  --accent-amber: #c89050;

  /* Glows */
  --glow-violet: rgba(140, 80, 200, 0.15);
  --glow-cyan: rgba(102, 255, 255, 0.1);

  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Border Radius */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Layout */
  --container-max: 1100px;
}

/* ════════════════════════════════════════════════════════════════════════════
   1. BASE & RESET
   ════════════════════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #0e0e1a;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 16px;
}

/* ── Starfield canvas — sits behind everything ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* All page content sits above starfield */
.site-nav,
.site-header,
.hero,
.section,
.section-alt,
.card-section,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   2. CONTAINER
   ════════════════════════════════════════════════════════════════════════════ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ════════════════════════════════════════════════════════════════════════════
   3. STICKY NAVIGATION
   ════════════════════════════════════════════════════════════════════════════ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.82em;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
}

/* Nav toggle button (hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 32px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  padding: 20px;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ════════════════════════════════════════════════════════════════════════════
   4. BANNER
   ════════════════════════════════════════════════════════════════════════════ */

.site-header {
  position: relative;
  overflow: hidden;
}

.banner {
  width: 100%;
  display: block;
  height: auto;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   5. HERO SECTION
   ════════════════════════════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: transparent;
}

.hero-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8em, 4vw, 2.8em);
  font-weight: 700;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #e8d5ff 0%, #d5b8ff 40%, #a070d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1em;
  max-width: 650px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--font-display);
  font-size: 0.78em;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-violet) 0%, #9060c0 100%);
  color: #0a0a14;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--glow-violet);
}

.btn-secondary {
  font-family: var(--font-display);
  font-size: 0.78em;
  padding: 14px 28px;
  background: transparent;
  color: var(--accent-violet);
  border: 1px solid rgba(160, 112, 220, 0.3);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  border-color: var(--accent-violet);
  background: rgba(160, 112, 220, 0.08);
}

/* ════════════════════════════════════════════════════════════════════════════
   6. SECTION BASE
   ════════════════════════════════════════════════════════════════════════════ */

.section {
  padding: 80px 0;
}

.section-alt {
  background: rgba(10, 10, 18, 0.25);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3em, 3vw, 1.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-family: var(--font-body);
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 0.9em;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════════════════
   7. MISSION
   ════════════════════════════════════════════════════════════════════════════ */

.mission-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.mission-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(160, 112, 208, 0.1);
  border: 1px solid rgba(160, 112, 208, 0.2);
  color: var(--accent-violet);
  margin-bottom: 20px;
}

.mission-text {
  font-family: var(--font-body);
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════════════════════
   8. SERVICES GRID
   ════════════════════════════════════════════════════════════════════════════ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--glow-violet);
}

.service-icon {
  font-size: 1.8em;
  margin-bottom: 12px;
  display: block;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 0.95em;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.service-card p {
  font-family: var(--font-body);
  font-size: 0.84em;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.service-price {
  font-family: var(--font-display);
  font-size: 0.72em;
  color: var(--accent-cyan);
  margin-top: 12px;
  letter-spacing: 0.05em;
}

/* ════════════════════════════════════════════════════════════════════════════
   9. TEAM GRID
   ════════════════════════════════════════════════════════════════════════════ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 950px;
  margin: 0 auto;
}

.team-member {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.team-member:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(140, 80, 200, 0.12);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  background: rgba(160, 112, 208, 0.1);
  border: 2px solid rgba(160, 112, 208, 0.15);
}

.team-member h3 {
  font-family: var(--font-display);
  font-size: 0.9em;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.team-role {
  font-family: var(--font-display);
  font-size: 0.65em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-violet);
  margin-bottom: 12px;
}

.team-bio {
  font-family: var(--font-body);
  font-size: 0.82em;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   10. SOCIAL GRID
   ════════════════════════════════════════════════════════════════════════════ */

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 850px;
  margin: 0 auto;
}

.social-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  text-align: center;
  transition: all 0.3s ease;
}

.social-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.social-icon {
  font-size: 2em;
  margin-bottom: 10px;
  display: block;
}

.social-card h3 {
  font-family: var(--font-display);
  font-size: 0.85em;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.social-card p {
  font-family: var(--font-body);
  font-size: 0.78em;
  color: var(--text-secondary);
  margin: 0;
}

.social-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-cyan);
  font-family: var(--font-body);
  font-size: 0.78em;
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--accent-cyan);
}

/* ════════════════════════════════════════════════════════════════════════════
   11. CONTACT SECTION
   ════════════════════════════════════════════════════════════════════════════ */

.contact {
  text-align: center;
}

.contact-info {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.88em;
  line-height: 2;
}

.contact-info a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #99ffff;
}

.contact-status {
  font-family: var(--font-display);
  font-size: 0.68em;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 20px;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════════════════════
   12. FOOTER
   ════════════════════════════════════════════════════════════════════════════ */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  background: rgba(8, 8, 15, 0.8);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78em;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.85em;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #99ffff;
}

/* ════════════════════════════════════════════════════════════════════════════
   13. SCOPRI PAGE STYLES
   ════════════════════════════════════════════════════════════════════════════ */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.video-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.video-card .video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-card .video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card .video-info {
  padding: 20px;
}

.video-card h3 {
  font-family: var(--font-display);
  font-size: 0.85em;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.video-card p {
  font-family: var(--font-body);
  font-size: 0.78em;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.article-section {
  max-width: 800px;
  margin: 0 auto;
}

.article-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px;
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent-violet);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-violet);
}

.article-card h3 {
  font-family: var(--font-display);
  font-size: 1.1em;
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px;
}

.article-authors {
  font-family: var(--font-body);
  font-size: 0.78em;
  color: var(--accent-violet);
  margin-bottom: 16px;
  font-style: italic;
}

.article-abstract {
  font-family: var(--font-body);
  font-size: 0.88em;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 16px;
}

.article-expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.article-expandable.expanded {
  max-height: 3000px;
}

.article-toggle {
  font-family: var(--font-display);
  font-size: 0.75em;
  color: var(--accent-cyan);
  background: none;
  border: 1px solid rgba(102, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.3s ease;
}

.article-toggle:hover {
  background: rgba(102, 255, 255, 0.05);
  border-color: var(--accent-cyan);
}

.article-section-inner {
  padding-top: 20px;
}

.article-section-inner h4 {
  font-family: var(--font-display);
  font-size: 0.85em;
  color: var(--text-primary);
  margin: 24px 0 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.article-section-inner p {
  font-family: var(--font-body);
  font-size: 0.84em;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 12px;
}

.article-section-inner blockquote {
  border-left: 2px solid var(--accent-violet);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--accent-cyan);
  font-family: var(--font-body);
  font-size: 0.82em;
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.article-download:hover {
  border-color: var(--accent-cyan);
}

/* ════════════════════════════════════════════════════════════════════════════
   14. PRENOTA PAGE
   ════════════════════════════════════════════════════════════════════════════ */

.prenota-body {
  background-color: #0e0e1a;
}

.prenota-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px;
}

.prenota-form {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.prenota-form h2 {
  font-family: var(--font-display);
  font-size: 1.2em;
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 24px;
}

.prenota-form label {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 0.82em;
  color: var(--text-secondary);
  gap: 6px;
  margin-bottom: 16px;
}

.prenota-form input,
.prenota-form textarea {
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.85em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.3s ease;
}

.prenota-form input:focus,
.prenota-form textarea:focus {
  border-color: rgba(160, 112, 208, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 16px var(--glow-violet);
}

.prenota-form input::placeholder,
.prenota-form textarea::placeholder {
  color: var(--text-muted);
}

.prenota-form fieldset {
  border: 1px solid var(--border-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 0 0 16px;
}

.prenota-form fieldset legend {
  font-family: var(--font-display);
  font-size: 0.75em;
  color: var(--accent-violet);
  letter-spacing: 0.05em;
  padding: 0 8px;
}

.prenota-form fieldset label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.82em;
  margin-bottom: 8px;
}

.prenota-form fieldset input[type="checkbox"],
.prenota-form fieldset input[type="radio"] {
  accent-color: var(--accent-violet);
  flex-shrink: 0;
}

.prenota-form button[type="submit"] {
  font-family: var(--font-display);
  font-size: 0.82em;
  font-weight: 600;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent-violet) 0%, #9060c0 100%);
  color: #0a0a14;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  width: 100%;
}

.prenota-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px var(--glow-violet);
}

/* ════════════════════════════════════════════════════════════════════════════
   15. CARD SECTION (Home navigation)
   ════════════════════════════════════════════════════════════════════════════ */

.card-section {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 40px 20px;
  flex-wrap: wrap;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: white;
  width: 320px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px var(--glow-violet);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-subtle);
}

.card-text {
  padding: 20px;
  text-align: center;
}

.card-text h2 {
  font-family: var(--font-display);
  font-size: 1.2em;
  color: var(--text-primary);
  margin: 0;
}

.card-text p {
  font-family: var(--font-body);
  font-size: 0.88em;
  color: var(--text-secondary);
  margin: 8px 0 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   16. ANIMATIONS & UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out both;
}

/* ════════════════════════════════════════════════════════════════════════════
   17. RESPONSIVE DESIGN
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 50px 20px 40px;
  }

  .hero-title {
    font-size: clamp(1.4em, 5vw, 2em);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 50px 0;
  }

  .container {
    padding: 0 16px;
  }

  .mission-card {
    padding: 24px;
  }

  .service-card {
    padding: 20px;
  }
}

/* ══════════════════════════════════════════════════════════
   BIOARTE POPUP — Singolarità Collettive
   ══════════════════════════════════════════════════════════ */

/* ── Overlay ── */
#bioarte-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  /* Deep cosmic background */
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(140,80,40,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 30% 60%, rgba(100,40,120,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 90% 90% at 50% 50%, rgba(10,14,30,0.98) 0%, #060810 100%);
  background-color: #060810;
}

#bioarte-overlay.bioarte-visible {
  opacity: 1;
  visibility: visible;
}

#bioarte-overlay.bioarte-closing {
  opacity: 0;
  visibility: hidden;
}

/* ── Close button ── */
.bioarte-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10002;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  line-height: 1;
}

.bioarte-close:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

.bioarte-close:focus-visible {
  outline: 2px solid #66ffff;
  outline-offset: 2px;
}

/* ── Inner layout ── */
.bioarte-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 94vw;
  max-width: 1100px;
  height: 92vh;
  max-height: 750px;
  position: relative;
  z-index: 10001;
}

/* ── Left panel — glass card ── */
.bioarte-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px;
  background: rgba(10, 12, 24, 0.55);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px 0 0 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.bioarte-content::-webkit-scrollbar {
  width: 4px;
}
.bioarte-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

/* ── Right panel — visual canvas ── */
.bioarte-visual {
  position: relative;
  border-radius: 0 20px 20px 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(160,100,50,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 40% 60%, rgba(120,50,100,0.1) 0%, transparent 60%),
    #080c18;
}

.bioarte-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Texture overlay — subtle pigment / canvas feel */
.bioarte-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.008) 2px,
      rgba(255,255,255,0.008) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(255,255,255,0.005) 3px,
      rgba(255,255,255,0.005) 4px
    );
  pointer-events: none;
  mix-blend-mode: overlay;
  border-radius: 0 20px 20px 0;
}

/* ── Typography ── */
.bioarte-eyebrow {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(180,140,220,0.7);
  margin-bottom: 10px;
}

.bioarte-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5em, 3.5vw, 2.2em);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #f0e0ff 0%, #e8c8ff 30%, #c8a0e8 60%, #a080d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bioarte-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72em;
  line-height: 1.6;
  color: rgba(220,200,240,0.65);
  margin-bottom: 16px;
  font-style: italic;
}

.bioarte-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.82em;
  line-height: 1.7;
  color: rgba(220,215,230,0.75);
  margin-bottom: 14px;
}

.bioarte-highlight {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78em;
  line-height: 1.5;
  color: #e0d0f0;
  padding: 12px 16px;
  margin: 8px 0 12px;
  border-left: 2px solid rgba(180,120,220,0.4);
  background: rgba(140,80,200,0.06);
  border-radius: 0 8px 8px 0;
}

.bioarte-closing-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.78em;
  line-height: 1.65;
  color: rgba(200,190,220,0.6);
  margin-bottom: 20px;
  font-style: italic;
}

/* ── Form ── */
.bioarte-form-wrap {
  margin-top: 4px;
}

#bioarte-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bioarte-field {
  position: relative;
}

.bioarte-field input[type="text"],
.bioarte-field input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.85em;
  color: #e0ddf0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.bioarte-field input:focus {
  border-color: rgba(180,120,220,0.4);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 16px rgba(140,80,200,0.1);
}

.bioarte-field input::placeholder {
  color: rgba(200,190,220,0.35);
}

/* Honeypot — visually hidden */
.bioarte-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  tab-index: -1;
}

/* Privacy checkbox */
.bioarte-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7em;
  color: rgba(200,190,220,0.5);
  line-height: 1.5;
  margin-top: 2px;
}

.bioarte-privacy input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #a070d0;
  flex-shrink: 0;
}

.bioarte-privacy a {
  color: rgba(180,140,220,0.7);
  text-decoration: underline;
  text-decoration-color: rgba(180,140,220,0.3);
}

/* Submit button */
.bioarte-submit {
  position: relative;
  width: 100%;
  padding: 12px 20px;
  margin-top: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #0a0a14;
  background: linear-gradient(135deg, #c8a0e8 0%, #a878d0 50%, #8860b8 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
}

.bioarte-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(140,80,200,0.3);
}

.bioarte-submit:active:not(:disabled) {
  transform: translateY(0);
}

.bioarte-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.bioarte-btn-text {
  transition: opacity 0.3s;
}

.bioarte-btn-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.bioarte-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10,10,20,0.2);
  border-top-color: #0a0a14;
  border-radius: 50%;
  animation: bioarteSpin 0.8s linear infinite;
}

@keyframes bioarteSpin {
  to { transform: rotate(360deg); }
}

/* CTA secondary */
.bioarte-cta-secondary {
  display: inline-block;
  margin-top: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.72em;
  color: rgba(180,140,220,0.55);
  text-decoration: none;
  border-bottom: 1px solid rgba(180,140,220,0.2);
  transition: color 0.3s, border-color 0.3s;
  padding-bottom: 1px;
}

.bioarte-cta-secondary:hover {
  color: rgba(220,180,255,0.8);
  border-color: rgba(220,180,255,0.4);
}

/* ── Form states ── */
#bioarte-success,
#bioarte-error {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#bioarte-success.bioarte-state-visible,
#bioarte-error.bioarte-state-visible {
  opacity: 1;
}

#bioarte-success {
  text-align: center;
  padding: 24px 16px;
}

.bioarte-success-icon {
  font-size: 2em;
  margin-bottom: 12px;
  display: block;
  opacity: 0.8;
}

.bioarte-success-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1em;
  color: #c8a0e8;
  margin-bottom: 8px;
}

.bioarte-success-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.82em;
  color: rgba(200,190,220,0.65);
  line-height: 1.6;
}

#bioarte-error {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.78em;
  color: #e8a0a0;
  background: rgba(200,60,60,0.08);
  border: 1px solid rgba(200,60,60,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 4px;
}

/* ── Mobile responsive ── */
@media (max-width: 820px) {
  .bioarte-inner {
    grid-template-columns: 1fr;
    max-height: none;
    height: auto;
    max-height: 96vh;
  }

  .bioarte-content {
    border-radius: 16px;
    padding: 32px 24px;
    order: 1;
    max-height: 96vh;
    overflow-y: auto;
    /* On mobile the canvas sits behind */
    background: rgba(10, 12, 24, 0.78);
  }

  .bioarte-visual {
    position: fixed;
    inset: 0;
    border-radius: 0;
    z-index: -1;
  }

  .bioarte-visual::after {
    border-radius: 0;
  }

  .bioarte-title {
    font-size: clamp(1.3em, 6vw, 1.8em);
  }

  .bioarte-close {
    top: 10px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .bioarte-content {
    padding: 28px 18px;
  }

  .bioarte-inner {
    width: 100vw;
  }

  .bioarte-title {
    font-size: 1.3em;
  }

  .bioarte-highlight {
    font-size: 0.72em;
  }
}

/* ── Entrance animation ── */
.bioarte-visible .bioarte-content {
  animation: bioarteSlideIn 0.7s ease-out both;
}

.bioarte-visible .bioarte-visual {
  animation: bioarteFadeIn 1s ease-out both;
}

@keyframes bioarteSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bioarteFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
