/* ═══════════════════════════════════════════════════════
   Stasis — Constellation Home  ·  Style Sheet
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;

  --c-bg: #05060f;
  --c-text: #e8eaf6;
  --c-text-dim: rgba(232, 234, 246, .45);
  --c-accent: #7c8aff;
  --c-glow: rgba(124, 138, 255, .35);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-smooth: cubic-bezier(.45, 0, .55, 1);
}

/* ── Sky Theme Override ── */
body.theme-sky {
  --c-bg: #87ceeb;
  --c-text: #1a3a52;
  --c-text-dim: rgba(26, 58, 82, .65);
  --c-accent: #0066cc;
  --c-glow: rgba(0, 102, 204, .25);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Canvas ── */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* ── Hero ── */
.hero {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
}

.hero > * { pointer-events: auto; }

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem 1rem .35rem .65rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(8px);
  margin-bottom: 2rem;
  animation: fadeSlideUp .9s var(--ease-out) both;
  animation-delay: .2s;
}

.hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 8px var(--c-glow);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.hero__badge-text {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .25em;
  color: var(--c-text-dim);
}

/* Title */
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.hero__line {
  display: block;
  opacity: 0;
  animation: fadeSlideUp .9s var(--ease-out) both;
}

.hero__line--1 { font-size: clamp(1.3rem, 3.5vw, 2.6rem); animation-delay: .45s; color: rgba(255,255,255,.75); }
.hero__line--2 { font-size: clamp(1.3rem, 3.5vw, 2.6rem); animation-delay: .6s;  color: rgba(255,255,255,.75); }
.hero__line--3 { font-size: clamp(1.8rem, 5vw, 4rem);    animation-delay: .75s; }

.hero__line--accent {
  background: linear-gradient(135deg, #a78bfa 0%, #7c8aff 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(124,138,255,.3));
  animation: fadeSlideUp .9s var(--ease-out) both, glowPulse 4s ease-in-out infinite;
  animation-delay: .75s, 2s;
}

/* Subtitle */
.hero__sub {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: clamp(.85rem, 1.2vw, 1.05rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--c-text-dim);
  opacity: 0;
  animation: fadeSlideUp .9s var(--ease-out) both;
  animation-delay: .95s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.6rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all .35s var(--ease-out);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--c-text-dim);
  border: 1px solid rgba(255,255,255,.1);
}

.btn--outline:hover {
  color: var(--c-text);
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
}

/* ── Theme Button ── */
.ui-btn {
  position: fixed;
  z-index: 30;
  right: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .3s ease;
  opacity: 0;
  animation: fadeIn .6s ease both;
  animation-delay: 1.8s;
}

.ui-btn:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.15);
}

.ui-btn--theme {
  top: 1.2rem;
  padding: 0 .8rem;
  gap: .4rem;
  height: 40px;
}

.ui-btn--lang {
  top: 4.5rem;
  padding: 0 .8rem;
  gap: .4rem;
  height: 40px;
}

.ui-btn--lang svg {
  opacity: 0.5;
  transition: opacity .3s ease;
}

.ui-btn--lang:hover svg {
  opacity: 1;
}

.theme-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  transition: background .4s ease;
}

.theme-dot--galaxy   { background: #7c8aff; box-shadow: 0 0 6px rgba(124,138,255,.5); }
.theme-dot--nebula   { background: #ff8a65; box-shadow: 0 0 6px rgba(255,138,101,.5); }
.theme-dot--void     { background: #90a4ae; box-shadow: 0 0 6px rgba(144,164,174,.5); }
.theme-dot--sky      { background: #87ceeb; box-shadow: 0 0 6px rgba(135,206,235,.5); }

#themeName, #langName {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .05em;
  font-family: var(--font-body);
}

/* ── Footer ── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 20;
  padding: 1.5rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(to top, rgba(5,6,15,.9) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1s ease both;
  animation-delay: 1.6s;
}

.footer > * { pointer-events: auto; }

.footer__inner {
  display: flex;
  gap: .8rem;
}

.footer__copy {
  font-size: .6rem;
  color: rgba(255,255,255,.15);
  letter-spacing: .06em;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(124,138,255,.3)); }
  50%      { filter: drop-shadow(0 0 50px rgba(124,138,255,.5)); }
}

/* ── Sky Theme Glow ── */
body.theme-sky .hero__line--accent {
  filter: drop-shadow(0 0 20px rgba(0, 102, 204, .3));
}

/* ── Sky Theme Button Styles ── */
body.theme-sky .ui-btn {
  border-color: rgba(0, 102, 204, .15);
  background: rgba(0, 102, 204, .05);
}

body.theme-sky .ui-btn:hover {
  background: rgba(0, 102, 204, .15);
  border-color: rgba(0, 102, 204, .3);
}

body.theme-sky .btn--outline {
  border-color: rgba(26, 58, 82, .2);
  color: rgba(26, 58, 82, .7);
}

body.theme-sky .btn--outline:hover {
  border-color: rgba(0, 102, 204, .4);
  background: rgba(0, 102, 204, .08);
  color: #1a3a52;
}

body.theme-sky .modal__overlay {
  background: rgba(135, 206, 235, 0.85);
}

body.theme-sky .modal__content {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 102, 204, .2);
}

body.theme-sky .modal__title {
  color: #0066cc;
}

body.theme-sky .modal__close {
  background: rgba(0, 102, 204, .1);
  border-color: rgba(0, 102, 204, .2);
  color: #0066cc;
}

body.theme-sky .modal__close:hover {
  background: rgba(0, 102, 204, .2);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero__sub { max-width: 90%; }
  .footer__inner { flex-direction: column; align-items: center; }
}

/* ═══ Modal System ═══ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-smooth), visibility .3s;
}

.modal--open {
  opacity: 1;
  visibility: visible;
}

.modal--open .modal__content {
  transform: scale(1);
  opacity: 1;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 15, 0.92);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.modal__content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: rgba(20, 22, 35, 0.95);
  border: 1px solid rgba(124, 138, 255, 0.2);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  overflow-y: auto;
  transform: scale(0.95);
  opacity: 0;
  transition: transform .3s var(--ease-out), opacity .3s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(124, 138, 255, 0.15);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 138, 255, 0.1);
  border: 1px solid rgba(124, 138, 255, 0.2);
  border-radius: 8px;
  color: var(--c-accent);
  cursor: pointer;
  transition: all .2s var(--ease-smooth);
}

.modal__close:hover {
  background: rgba(124, 138, 255, 0.2);
  transform: scale(1.05);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--c-accent);
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}

.modal__body {
  color: var(--c-text);
  line-height: 1.7;
}

.modal__body p {
  margin-bottom: 1.2rem;
  font-size: .95rem;
  color: var(--c-text-dim);
}

.modal__body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-text);
  margin-top: 1.8rem;
  margin-bottom: .8rem;
}

.modal__list {
  list-style: none;
  margin: 1rem 0;
}

.modal__list li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: .8rem;
  color: var(--c-text-dim);
  font-size: .95rem;
}

.modal__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--c-accent);
}

.modal__list li strong {
  color: var(--c-text);
  font-weight: 600;
}

/* ── Contact Form ── */
.contact-form {
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: rgba(124, 138, 255, 0.05);
  border: 1px solid rgba(124, 138, 255, 0.2);
  border-radius: 6px;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: all .2s var(--ease-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(124, 138, 255, 0.1);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(124, 138, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn--primary {
  width: 100%;
  background: var(--c-accent);
  color: #05060f;
  font-weight: 600;
  border: none;
  transition: all .2s var(--ease-smooth);
}

.btn--primary:hover {
  background: #8f9dff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 138, 255, 0.4);
}

/* ── Contact Info ── */
.contact-info {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(124, 138, 255, 0.1);
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .8rem;
  color: var(--c-text-dim);
}

.contact-info__item svg {
  flex-shrink: 0;
  color: var(--c-accent);
}

.contact-info__item a {
  color: var(--c-text);
  text-decoration: none;
  transition: color .2s;
}

.contact-info__item a:hover {
  color: var(--c-accent);
}

/* ── Modal Responsive ── */
@media (max-width: 600px) {
  .modal__content {
    padding: 2rem 1.5rem;
    max-height: 95vh;
  }
  
  .modal__title {
    font-size: 1.5rem;
  }
}
