/* ===== Panoptix 2.0 Website — Theme ===== */

:root {
  --accent:    #4f9eff;
  --accent-h:  #6fb0ff;
  --danger:    #ff4f4f;
  --success:   #3ddc84;
  --radius:    8px;
  --max-w:     1140px;

  /* Dark (default) */
  --bg:        #13141a;
  --panel:     #1c1e28;
  --toolbar:   #0d0e17;
  --border:    #2d2f42;
  --text:      #dde1f0;
  --text-dim:  #7a7f9a;
  --hero-glow: rgba(79,158,255,.08);
  --nav-bg:    rgba(13,14,23,.92);
  --shadow:    rgba(0,0,0,.4);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #f4f5f7;
    --panel:     #ffffff;
    --toolbar:   #e8eaed;
    --border:    #d0d3da;
    --text:      #1a1c24;
    --text-dim:  #5c6070;
    --accent:    #2b7de9;
    --accent-h:  #1a6ad4;
    --hero-glow: rgba(43,125,233,.06);
    --nav-bg:    rgba(244,245,247,.92);
    --shadow:    rgba(0,0,0,.08);
  }
}

[data-theme="light"] {
  --bg:        #f4f5f7;
  --panel:     #ffffff;
  --toolbar:   #e8eaed;
  --border:    #d0d3da;
  --text:      #1a1c24;
  --text-dim:  #5c6070;
  --accent:    #2b7de9;
  --accent-h:  #1a6ad4;
  --hero-glow: rgba(43,125,233,.06);
  --nav-bg:    rgba(244,245,247,.92);
  --shadow:    rgba(0,0,0,.08);
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.theme-transition, .theme-transition *, .theme-transition *::before, .theme-transition *::after {
  transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s !important;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---- Layout helpers ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-alt { background: var(--panel); }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 16px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title span { color: var(--accent); }
.subtitle { color: var(--text-dim); font-size: 1.05rem; max-width: 640px; margin: 8px auto 0; text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: .2s;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; }
.btn-outline { border: 2px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: var(--nav-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 64px; display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 36px; width: auto; }
.nav-brand span { font-weight: 700; font-size: 1.15rem; letter-spacing: .5px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: .9rem; font-weight: 500; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; padding: 2px 8px; line-height: 1; transition: .2s; }
.theme-toggle:hover { color: var(--text); border-color: var(--text-dim); }
.lang-switch { font-size: .8rem; color: var(--text-dim); cursor: pointer; padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; background: transparent; }
.lang-switch:hover { color: var(--text); border-color: var(--text-dim); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---- Hero ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding-top: 64px;
  position: relative; overflow: hidden;
}
#hero-particles {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 30%, var(--hero-glow) 0%, transparent 70%),
              url('../assets/hero.webp') center/cover no-repeat;
  opacity: 0.3;
}
.hero h1 { margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-dim); font-size: 1.15rem; max-width: 600px; margin: 0 auto 32px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Feature cards ---- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}
.feature-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px; transition: .25s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-card .icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { color: var(--text); }
.feature-card p { color: var(--text-dim); font-size: .92rem; }

/* ---- Function detail sections ---- */
.func-block { display: flex; gap: 40px; align-items: center; margin-bottom: 64px; }
.func-block:nth-child(even) { flex-direction: row-reverse; }
.func-text { flex: 1; }
.func-text h3 { font-size: 1.4rem; margin-bottom: 12px; }
.func-text p { color: var(--text-dim); margin-bottom: 16px; }
.func-text ul { margin-bottom: 12px; }
.func-text ul li { color: var(--text-dim); padding: 4px 0; padding-left: 20px; position: relative; font-size: .93rem; }
.func-text ul li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.func-img { flex: 1; }
.func-img img { border-radius: var(--radius); border: 1px solid var(--border); }
.placeholder-img {
  background: var(--panel); border: 2px dashed var(--border); border-radius: var(--radius);
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .85rem; text-align: center; padding: 16px;
}

/* ---- Screenshots gallery ---- */
.screenshots-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.screenshot-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  transition: .25s; display: flex; flex-direction: column;
}
.screenshot-card:hover { border-color: var(--accent); transform: scale(1.02); }
.screenshot-card img { width: 100%; display: block; flex: 1; object-fit: cover; cursor: zoom-in; }
.func-img img { cursor: zoom-in; }
.screenshot-card .placeholder-img { aspect-ratio: 16/10; border: none; border-radius: 0; }
.screenshot-card .caption {
  background: var(--panel); padding: 10px 14px; font-size: .85rem; color: var(--text-dim);
  text-align: center;
}

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.pricing-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; text-align: center; position: relative; transition: .25s;
  display: flex; flex-direction: column;
}
.pricing-card ul { flex: 1; }
.pricing-card .btn { margin-top: auto; }
.pricing-card.featured { border-color: var(--accent); }
.pricing-card.featured::before {
  content: attr(data-badge); position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 3px 14px; border-radius: 20px; text-transform: uppercase;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 2.4rem; font-weight: 700; margin: 16px 0; }
.pricing-card .price small { font-size: .85rem; color: var(--text-dim); font-weight: 400; }
.pricing-card ul { margin-bottom: 24px; }
.pricing-card ul li { padding: 6px 0; color: var(--text-dim); font-size: .9rem; }
.pricing-card ul li.disabled { opacity: .35; text-decoration: line-through; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item h4 { color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.contact-item p { color: var(--text-dim); line-height: 1.6; }
.contact-form-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.contact-form-wrap textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font-family: inherit; font-size: .95rem; resize: vertical; transition: .2s;
}
.contact-form-wrap textarea:focus { outline: none; border-color: var(--accent); }
.contact-form-wrap .form-group input {
  background: var(--panel);
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Login Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-overlay .login-wrap {
  max-width: 400px; width: 90%; position: relative;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 32px;
  transform: scale(.92); transition: transform .3s;
}
.modal-overlay.active .login-wrap { transform: scale(1); }
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 1.6rem; cursor: pointer; line-height: 1; transition: .2s;
}
.modal-close:hover { color: var(--text); }
.login-wrap h2 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; color: var(--text-dim); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .95rem; transition: .2s;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.login-wrap .btn { width: 100%; text-align: center; }
.login-footer { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--text-dim); }

/* ---- GDPR Banner ---- */
.gdpr-banner {
  position: fixed; bottom: 0; left: 0; width: 100%; z-index: 150;
  background: var(--panel); border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center; justify-content: center;
  gap: 20px; box-shadow: 0 -4px 20px var(--shadow);
  animation: gdpr-slide .4s ease-out;
}
.gdpr-banner p { color: var(--text-dim); font-size: .88rem; margin: 0; max-width: 640px; }
@keyframes gdpr-slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (max-width: 768px) {
  .gdpr-banner { flex-direction: column; text-align: center; gap: 12px; }
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 90vw; max-height: 80vh; border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  transform: scale(.92); transition: transform .3s;
}
.lightbox.active .lightbox-img { transform: scale(1); }
.lightbox-caption {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; background: rgba(0,0,0,.5); padding: 6px 18px;
  border-radius: 20px; white-space: nowrap;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: none; border: none; color: #fff;
  cursor: pointer; transition: .2s; opacity: .7;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 20px; right: 24px; font-size: 2.5rem; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 3rem; line-height: 1; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---- Footer ---- */
.footer {
  background: var(--toolbar); border-top: 1px solid var(--border);
  padding: 40px 0; text-align: center; color: var(--text-dim); font-size: .85rem;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ---- Mobile nav ---- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; width: 100%; background: var(--toolbar);
    flex-direction: column; padding: 24px; gap: 16px; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: .3s; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: block; }
  .func-block, .func-block:nth-child(even) { flex-direction: column; }
  .hero { min-height: 80vh; }
  .section { padding: 56px 0; }
}
