/* ============================================================
   CUSTOMATIC — Stylesheet
   Sections:
    1.  Reset & CSS Variables
    2.  Custom Cursor
    3.  Navigation
    4.  Hero Section
    5.  Buttons
    6.  Shared Section Styles
    7.  Video Section
    8.  Features Section
    9.  Screenshots & Admin Slots
    10. Tab System
    11. Lightbox
    12. Footer
    13. Scrollbar
    14. Responsive
============================================================ */


/* ── 1. Reset & CSS Variables ─────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds */
  --bg:       #080a0f;
  --bg2:      #0d1017;
  --surface:  #111520;
  --surface2: #161b28;

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);

  /* Accent palette */
  --accent:  #00e5ff;
  --accent2: #7b5ea7;
  --accent3: #ff6b35;

  /* Typography */
  --text:         #e8eaf0;
  --text-muted:   #6b7280;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-mid:  0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x:  hidden;
  cursor:      none;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}


/* ── 2. Custom Cursor ─────────────────────────────────────── */
.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
}

.cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  z-index: 9998;
  transition: transform 0.18s ease, width 0.2s, height 0.2s;
}

.cursor-ring.hover {
  width: 54px;
  height: 54px;
  border-color: var(--accent);
}


/* ── 3. Navigation ────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1.4rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8, 10, 15, 0.95), transparent);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family:     var(--font-display);
  font-size:       1.4rem;
  font-weight:     800;
  letter-spacing:  -0.02em;
  color:           var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display:    flex;
  gap:        2.5rem;
  list-style: none;
}

.nav-links a {
  font-size:       0.85rem;
  letter-spacing:  0.08em;
  text-transform:  uppercase;
  color:           var(--text-muted);
  text-decoration: none;
  transition:      color var(--transition-fast);
}

.nav-links a:hover { color: var(--accent); }


/* ── 4. Hero Section ──────────────────────────────────────── */
.hero {
  min-height:      100vh;
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  text-align:      center;
  padding:         8rem 2rem 4rem;
  position:        relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(0, 229, 255, 0.06)  0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(123, 94, 167, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

/* Hero inner content — sits above canvas */
.hero-content {
  position:   relative;
  z-index:    2;
}

#hero-canvas {
  position:       absolute;
  inset:          0;
  width:          100%;
  height:         100%;
  z-index:        1;
  pointer-events: auto;
}

.hero-tag {
  display:         inline-flex;
  align-items:     center;
  gap:             0.5rem;
  background:      rgba(0, 229, 255, 0.06);
  border:          1px solid rgba(0, 229, 255, 0.15);
  border-radius:   100px;
  padding:         0.4rem 1.1rem;
  font-size:       0.75rem;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  color:           var(--accent);
  margin-bottom:   2rem;
  animation:       fadeUp 0.8s ease both;
}

.hero-tag::before {
  content:       '';
  width:         6px;
  height:        6px;
  background:    var(--accent);
  border-radius: 50%;
  animation:     pulse 2s infinite;
}

.hero h1 {
  font-family:    var(--font-body);
  font-size:      clamp(3.5rem, 9vw, 7.5rem);
  font-weight:    700;
  line-height:    1.4;
  letter-spacing: -0.04em;
  margin-bottom:  1.5rem;
  animation:      fadeUp 0.8s 0.1s ease both;
}

/* SVG fill paints through the glyph outline — the only method
   that never clips descenders (background-clip:text always cuts g/y/p). */
.hero h1 .line2 {
  display:                block;
  color:                  transparent;
  -webkit-text-fill-color: transparent;
  fill:                   url(#heroGrad);
  /* Fallback for browsers without SVG fill support */
  background:             linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, var(--accent3) 100%);
  -webkit-background-clip: text;
  background-clip:        text;
  background-size:        100% 150%;
  background-position:    center;
}

.hero-desc {
  font-size:     1.1rem;
  color:         var(--text-muted);
  max-width:     520px;
  margin:        0 auto 2.5rem;
  font-weight:   300;
  animation:     fadeUp 0.8s 0.2s ease both;
}

.hero-cta {
  display:         flex;
  gap:             1rem;
  justify-content: center;
  flex-wrap:       wrap;
  animation:       fadeUp 0.8s 0.3s ease both;
}

.hero-3d-hint {
  margin-top:     1.5rem;
  font-size:      0.78rem;
  color:          var(--text-muted);
  letter-spacing: 0.08em;
  opacity:        0.6;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.6); }
}


/* ── 5. Buttons ───────────────────────────────────────────── */
.btn {
  padding:         0.85rem 2rem;
  border-radius:   8px;
  font-family:     var(--font-body);
  font-size:       0.9rem;
  font-weight:     500;
  cursor:          none;
  text-decoration: none;
  transition:      all var(--transition-fast);
  letter-spacing:  0.02em;
}

.btn-primary {
  background: var(--accent);
  color:      #000;
  border:     none;
}

.btn-primary:hover {
  background: #33eaff;
  transform:  translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 229, 255, 0.25);
}

.btn-ghost {
  background: transparent;
  color:      var(--text);
  border:     1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform:    translateY(-2px);
}


/* ── 6. Shared Section Styles ─────────────────────────────── */
section { position: relative; }

.section-inner {
  max-width: 1200px;
  margin:    0 auto;
  padding:   6rem 2rem;
}

.section-label {
  font-size:      0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1rem;
  display:        flex;
  align-items:    center;
  gap:            0.8rem;
}

.section-label::after {
  content:    '';
  flex:       0 0 40px;
  height:     1px;
  background: var(--accent);
  opacity:    0.4;
}

.section-title {
  font-family:    var(--font-display);
  font-size:      clamp(2rem, 4vw, 3.2rem);
  font-weight:    700;
  line-height:    1.1;
  letter-spacing: -0.03em;
  margin-bottom:  1rem;
}

.section-desc {
  color:     var(--text-muted);
  max-width: 520px;
  font-size: 0.95rem;
}

.divider {
  height:     1px;
  background: var(--border);
}


/* ── 7. Video Section ─────────────────────────────────────── */
.video-section { background: var(--bg2); }

.video-wrapper {
  margin-top:    3rem;
  position:      relative;
  border-radius: 16px;
  overflow:      hidden;
  border:        1px solid var(--border);
  background:    var(--surface);
  aspect-ratio:  16 / 9;
  display:       flex;
  align-items:   center;
  justify-content: center;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 229, 255, 0.05);
}

.video-wrapper video {
  width:        100%;
  height:       100%;
  object-fit:   cover;
  display:      block;
}


/* ── 8. Features Section ──────────────────────────────────── */
.features-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:                   1.5px;
  margin-top:            3.5rem;
  border:                1.5px solid var(--border);
  border-radius:         16px;
  /* overflow:visible fixes descender clipping on child card headings */
  overflow:              visible;
}

/* Restore rounded corners on edge cards (lost when overflow:visible is set) */
.feature-card:first-child    { border-radius: 16px 0 0 0; }
.feature-card:nth-child(3)   { border-radius: 0 16px 0 0; }
.feature-card:nth-last-child(3) { border-radius: 0 0 0 16px; }
.feature-card:last-child      { border-radius: 0 0 16px 0; }

.feature-card {
  background:  var(--surface);
  padding:     2.5rem 2.5rem 3rem;
  position:    relative;
  overflow:    visible;
  transition:  background var(--transition-mid);
}

.feature-card::before {
  content:    '';
  position:   absolute;
  top: 0; left: 0; right: 0;
  height:     1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity:    0;
  transition: opacity var(--transition-mid);
}

.feature-card:hover          { background: var(--surface2); }
.feature-card:hover::before  { opacity: 1; }

.feature-icon {
  width:         48px;
  height:        48px;
  border-radius: 12px;
  background:    rgba(0, 229, 255, 0.07);
  border:        1px solid rgba(0, 229, 255, 0.12);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.4rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-family:    var(--font-body);
  font-size:      1.05rem;
  font-weight:    700;
  /* Extra line-height prevents descender clipping */
  line-height:    1.8;
  margin-bottom:  0.8rem;
  letter-spacing: -0.01em;
  position:       relative;
  z-index:        1;
  overflow:       visible;
}

.feature-card p {
  font-size:   0.88rem;
  color:       var(--text-muted);
  line-height: 1.65;
}


/* ── 9. Screenshots & Admin Slots ─────────────────────────── */
.screenshots-section { background: var(--bg); }
.admin-section        { background: var(--bg2); }



.screenshots-header {
  display:         flex;
  align-items:     flex-end;
  justify-content: space-between;
  margin-bottom:   3rem;
  flex-wrap:       wrap;
  gap:             1rem;
}

.screenshots-desc {
  color:     var(--text-muted);
  font-size: 0.85rem;
  max-width: 320px;
  text-align: right;
}

.badge-3d {
  display:         inline-flex;
  align-items:     center;
  gap:             0.5rem;
  background:      linear-gradient(135deg, rgba(0,229,255,0.08), rgba(123,94,167,0.08));
  border:          1px solid rgba(0, 229, 255, 0.12);
  border-radius:   8px;
  padding:         0.35rem 0.9rem;
  font-size:       0.75rem;
  color:           var(--text-muted);
  letter-spacing:  0.05em;
  margin-left:     1rem;
  vertical-align:  middle;
}

/* Shared slot base */
.screenshot-slot {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 12px;
  aspect-ratio:  16 / 10;
  overflow:      hidden;
  position:      relative;
  cursor:        pointer;
  transition:    border-color var(--transition-mid), transform var(--transition-mid);
}

.screenshot-slot:hover             { border-color: rgba(0, 229, 255, 0.25); transform: translateY(-4px); }
.screenshot-slot:hover .ss-overlay { opacity: 1; }
.screenshot-slot:hover img         { transform: scale(1.03); }

.screenshot-slot img {
  width:            100%;
  height:           100%;
  object-fit:       cover;
  object-position:  top;
  display:          block;
  transition:       transform 0.4s ease;
}

.ss-overlay {
  position:       absolute;
  inset:          0;
  background:     rgba(0, 229, 255, 0.06);
  display:        flex;
  align-items:    center;
  justify-content: center;
  opacity:        0;
  transition:     opacity var(--transition-mid);
  z-index:        1;
  font-size:      0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--accent);
}

.ss-expand-icon {
  font-size:    1rem;
  margin-right: 0.3rem;
}

/* Admin-specific slot overrides */
.admin-slot {
  aspect-ratio: 16 / 10;
  position:     relative;
  cursor:       pointer;
}

.admin-slot-wide {
  aspect-ratio: 16 / 7;
}

.admin-slot-label {
  position:      absolute;
  bottom: 0; left: 0; right: 0;
  padding:       0.5rem 0.9rem;
  background:    linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-size:     0.72rem;
  font-weight:   500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          rgba(255,255,255,0.7);
  z-index:        1;
  border-radius:  0 0 12px 12px;
  transition:     opacity var(--transition-mid);
}

.admin-slot:hover .admin-slot-label { opacity: 0; }
.admin-slot:hover .ss-overlay       { opacity: 1; }

/* Legacy grid layout (3-column screenshots grid) */
.screenshots-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   12px;
}

.screenshots-grid .screenshot-slot:first-child { grid-column: span 3; }


/* ── 10. Tab System ───────────────────────────────────────── */
.admin-tabs {
  display:       flex;
  gap:           6px;
  margin-bottom: 2.5rem;
  flex-wrap:     wrap;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  padding:        0.7rem 1.3rem;
  border-radius:  8px 8px 0 0;
  border:         1px solid transparent;
  border-bottom:  none;
  background:     transparent;
  color:          var(--text-muted);
  font-family:    var(--font-body);
  font-size:      0.82rem;
  font-weight:    500;
  letter-spacing: 0.03em;
  cursor:         pointer;
  transition:     all var(--transition-fast);
  position:       relative;
  bottom:         -1px;
}

.admin-tab:hover {
  color:      var(--text);
  background: rgba(255,255,255,0.03);
}

.admin-tab.active {
  color:             var(--accent);
  background:        var(--bg2);
  border-color:      var(--border);
  border-bottom-color: var(--bg2);
}

/* Stack all panels in the same grid cell so the container height
   is always set by the tallest panel — no layout reflow on tab switch. */
.admin-tabs-content {
  display:            grid;
  grid-template-rows: 1fr;
}

.admin-tabs-content .admin-panel {
  grid-column:    1;
  grid-row:       1;
  display:        block;
  visibility:     hidden;
  opacity:        0;
  pointer-events: none;
  min-height:     0;
}

.admin-tabs-content .admin-panel.active {
  visibility:     visible;
  opacity:        1;
  pointer-events: auto;
  animation:      adminFadeIn 0.3s ease;
}

@keyframes adminFadeIn {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}

.admin-panel-intro {
  margin-bottom:  2rem;
  padding:        1rem 1.4rem;
  background:     rgba(0,229,255,0.03);
  border-left:    2px solid rgba(0,229,255,0.25);
  border-radius:  0 8px 8px 0;
}

.admin-panel-intro p {
  font-size:   0.88rem;
  color:       var(--text-muted);
  line-height: 1.65;
}

.admin-grid {
  display: grid;
  gap:     12px;
}

.admin-grid-1 { grid-template-columns: 1fr; }
.admin-grid-2 { grid-template-columns: repeat(2, 1fr); }
.admin-grid-3 { grid-template-columns: repeat(3, 1fr); }


/* ── 11. Lightbox ─────────────────────────────────────────── */
.lightbox {
  display:         none;
  position:        fixed;
  inset:           0;
  z-index:         9000;
  background:      rgba(4, 5, 9, 0.96);
  backdrop-filter: blur(12px);
  align-items:     center;
  justify-content: center;
  animation:       lightboxFadeIn 0.25s ease;
}

.lightbox.active { display: flex; }

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

.lightbox-content {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            1.2rem;
  max-width:      90vw;
  max-height:     90vh;
  animation:      lightboxSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxSlideIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
  max-width:     90vw;
  max-height:    80vh;
  width:         auto;
  height:        auto;
  object-fit:    contain;
  border-radius: 10px;
  border:        1px solid rgba(255, 255, 255, 0.08);
  box-shadow:    0 32px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  font-family:    var(--font-display);
  font-size:      0.85rem;
  font-weight:    600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--accent);
}

.lightbox-counter {
  position:  absolute;
  bottom:    2rem;
  left:      50%;
  transform: translateX(-50%);
  font-size:      0.75rem;
  letter-spacing: 0.1em;
  color:          var(--text-muted);
}

/* Shared base for close + arrows */
.lightbox-close,
.lightbox-arrow {
  position:        absolute;
  border-radius:   50%;
  background:      rgba(255, 255, 255, 0.05);
  border:          1px solid rgba(255, 255, 255, 0.1);
  color:           var(--text);
  cursor:          none;
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         9010;
  transition:      background var(--transition-fast), border-color var(--transition-fast);
}

.lightbox-close {
  top:       1.5rem;
  right:     1.5rem;
  width:     42px;
  height:    42px;
  font-size: 1rem;
}

.lightbox-close:hover {
  background:   rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-arrow {
  top:       50%;
  transform: translateY(-50%);
  width:     50px;
  height:    50px;
  font-size: 1.2rem;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.lightbox-arrow:hover {
  background:   rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  transform:    translateY(-50%) scale(1.08);
}

.lightbox-prev { left:  1.5rem; }
.lightbox-next { right: 1.5rem; }


/* ── 12. Footer ───────────────────────────────────────────── */
footer {
  border-top:      1px solid var(--border);
  padding:         2.5rem 4rem;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  flex-wrap:       wrap;
  gap:             1rem;
}

footer .logo {
  font-family:    var(--font-display);
  font-weight:    800;
  font-size:      1.1rem;
  letter-spacing: -0.02em;
}

footer .logo span { color: var(--accent); }

footer p {
  font-size: 0.8rem;
  color:     var(--text-muted);
}

.footer-confidential {
  font-size: 0.75rem;
  color:     rgba(107, 114, 128, 0.4);
}


/* ── 13. Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 4px; }


/* ── 14. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  nav         { padding: 1.2rem 1.5rem; }
  .nav-links  { display: none; }
  footer      { padding: 2rem 1.5rem; }

  .screenshots-grid                              { grid-template-columns: repeat(2, 1fr); }
  .screenshots-grid .screenshot-slot:first-child { grid-column: span 2; }

  .admin-grid-2,
  .admin-grid-3 { grid-template-columns: 1fr; }
  .admin-tabs   { gap: 4px; }
  .admin-tab    { font-size: 0.75rem; padding: 0.55rem 0.9rem; }

  .screenshots-desc { text-align: left; }
}