/* ===========================================================
   JUST EMOTION — Space Tech Theme
   Palette: deep space + neon (cyan / violet / gold)
   Fonts: Space Grotesk (display) + Inter (body)
   =========================================================== */

:root {
  /* Space backgrounds (brand: black) */
  --bg-900: #04060c;
  --bg-800: #080b14;
  --bg-700: #0f1320;
  --bg-card: rgba(16, 22, 38, 0.55);
  --bg-card-solid: #0d1120;

  /* Neon accents — from the Just Emotion brand (cyan + magenta) */
  --neon-cyan: #20b8ec;   /* logo blue ring */
  --neon-violet: #7b4cff; /* bridge tone in the cyan→magenta gradient */
  --neon-gold: #20b8ec;   /* remapped to brand cyan */
  --neon-pink: #ff1f8e;   /* logo magenta book */
  --neon-green: #20b8ec;  /* remapped to brand cyan */
  --brand-magenta: #ff1f8e;
  --brand-cyan: #20b8ec;

  /* Text */
  --text: #eef0ff;
  --text-dim: #aab0d6;
  --text-faint: #6f76a6;

  /* Lines */
  --border: rgba(124, 92, 255, 0.22);
  --border-soft: rgba(255, 255, 255, 0.08);

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1200px;
  --shadow-neon: 0 0 28px rgba(45, 226, 230, 0.25);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-900);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Cosmic background layer (fixed) */
.cosmos-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 800px at 82% -10%, rgba(255, 31, 142, 0.16), transparent 60%),
    radial-gradient(900px 700px at 8% 18%, rgba(32, 184, 236, 0.16), transparent 60%),
    radial-gradient(800px 900px at 50% 120%, rgba(123, 76, 255, 0.10), transparent 60%),
    var(--bg-900);
}

#hero-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(92%, var(--maxw)); margin-inline: auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--neon-cyan);
  font-weight: 600;
}
.grad-text {
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-violet) 55%, var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: min(94%, var(--maxw));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(10, 12, 27, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: box-shadow .3s, background .3s;
}
.nav.scrolled { box-shadow: 0 10px 40px rgba(0,0,0,.45); background: rgba(10,12,27,.8); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; }

/* ---- 3D wordmark logo (pure CSS, font-safe) ---- */
.logo-3d {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.5px;
  line-height: 1;
  padding-right: 14px; /* room for orbit dot */
  background: linear-gradient(115deg, #34cdf7 0%, #8a5cff 52%, #ff1f8e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo-3d::before {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  z-index: -1;
  -webkit-text-fill-color: #12435f;
  color: #12435f;
  text-shadow: 1px 1px 0 #103a57, 2px 2px 0 #163050, 3px 3px 0 #1c2747, 4px 4px 0 #221f3d;
}
.logo-3d::after {
  content: "";
  position: absolute;
  top: 1px; right: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34cdf7;
  box-shadow: 0 0 0 3px rgba(52,205,247,.35), 0 0 12px rgba(52,205,247,.7);
  animation: pulse 4s ease-in-out infinite;
}
.logo-3d.sm { font-size: 1.3rem; }
@keyframes pulse { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.18);} }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-size: .92rem; color: var(--text-dim); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 100px;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-violet));
  color: #06081a;
  box-shadow: 0 0 24px rgba(45,226,230,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(124,92,255,.55); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -7px; right: -7px;
  background: var(--neon-pink); color: #fff;
  font-size: .7rem; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; padding: 0 4px;
}

.nav-toggle { display: none; background: none; border: 0; color: var(--text); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: grid; place-items: center; text-align: center; position: relative; padding: 120px 0 80px; }
.hero-inner { max-width: 880px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); margin: 18px 0; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text-dim); max-width: 620px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--text-faint); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint .mouse { width: 24px; height: 38px; border: 2px solid var(--border); border-radius: 14px; position: relative; }
.scroll-hint .mouse::after { content:''; position:absolute; top:7px; left:50%; transform:translateX(-50%); width:4px; height:7px; border-radius:3px; background: var(--neon-cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0%{opacity:1; top:7px;} 70%{opacity:0; top:18px;} 100%{opacity:0;} }

/* ---------- Section base ---------- */
section { position: relative; padding: 90px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 14px 0 12px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

/* ---------- Services bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at var(--mx,50%) var(--my,0%), var(--glow, rgba(45,226,230,.16)), transparent 70%);
  opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-6px); border-color: var(--card-border, var(--neon-cyan)); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.card:hover::before { opacity: 1; }
.card .icon-box {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--glow, rgba(45,226,230,.14));
  border: 1px solid var(--border-soft);
}
.card .icon-box svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: .96rem; }
.card .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.card .tag { font-size: .76rem; padding: 5px 11px; border-radius: 100px; background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--text-dim); }

.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }

/* accent variants */
.acc-cyan   { --glow: rgba(32,184,236,.18);  --card-border: var(--neon-cyan); }
.acc-violet { --glow: rgba(123,76,255,.18);  --card-border: var(--neon-violet); }
.acc-gold   { --glow: rgba(32,184,236,.18);  --card-border: var(--neon-cyan); }
.acc-pink   { --glow: rgba(255,31,142,.18);  --card-border: var(--neon-pink); }
.acc-green  { --glow: rgba(32,184,236,.18);  --card-border: var(--neon-cyan); }
.icon-box.acc-cyan svg   { color: var(--neon-cyan); }
.icon-box.acc-violet svg { color: var(--neon-violet); }
.icon-box.acc-gold svg   { color: var(--neon-gold); }
.icon-box.acc-pink svg   { color: var(--neon-pink); }
.icon-box.acc-green svg  { color: var(--neon-green); }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 28px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-card); }
.stat .num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; }
.stat .lbl { color: var(--text-dim); font-size: .9rem; margin-top: 6px; }

/* ---------- Featured products ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-6px); border-color: var(--neon-violet); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.product .thumb { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bg-700), var(--bg-800)); position: relative; overflow: hidden; }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product .badge { position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 100px; background: rgba(5,6,15,.7); border: 1px solid var(--border); color: var(--neon-cyan); backdrop-filter: blur(6px); }
.product .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product .cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.product h3 { font-size: 1.08rem; }
.product .desc { color: var(--text-dim); font-size: .88rem; flex: 1; }
.product .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.product .price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.product .price small { color: var(--text-faint); font-weight: 400; font-size: .8rem; }
.add-cart {
  border: 1px solid var(--border); background: rgba(124,92,255,.12);
  color: var(--text); border-radius: 12px; padding: 9px 14px; font-weight: 600; font-size: .85rem;
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, transform .15s;
}
.add-cart:hover { background: rgba(124,92,255,.3); transform: translateY(-1px); }
.add-cart svg { width: 16px; height: 16px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); grid-column: 1/-1; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 38px; }
.chip {
  padding: 9px 18px; border-radius: 100px; font-size: .88rem; font-weight: 600;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-soft); color: var(--text-dim);
  transition: all .2s;
}
.chip.active, .chip:hover { background: linear-gradient(120deg, var(--neon-cyan), var(--neon-violet)); color: #06081a; border-color: transparent; }

/* ---------- Cart drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--bg-800); border-left: 1px solid var(--border); z-index: 61;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 22px; border-bottom: 1px solid var(--border-soft); }
.cart-drawer header h3 { font-size: 1.25rem; }
.cart-close { background: none; border: 0; color: var(--text-dim); font-size: 1.6rem; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item .ci-thumb { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; background: var(--bg-700); flex-shrink: 0; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info h4 { font-size: .92rem; font-family: var(--font-body); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-info .ci-price { color: var(--neon-cyan); font-size: .9rem; font-weight: 600; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.05); color: var(--text); font-size: 1rem; line-height: 1; display: grid; place-items: center; }
.qty span { min-width: 20px; text-align: center; font-size: .9rem; }
.ci-remove { background: none; border: 0; color: var(--text-faint); font-size: .8rem; }
.ci-remove:hover { color: var(--neon-pink); }
.cart-foot { padding: 22px; border-top: 1px solid var(--border-soft); }
.cart-total { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }
.cart-foot .btn-primary { width: 100%; justify-content: center; }
.cart-empty { text-align: center; color: var(--text-dim); padding: 40px 0; }
.pay-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; color: var(--text-faint); font-size: .82rem; }
.pay-divider::before, .pay-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
#paypal-button-container { min-height: 46px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 70px 40px; border-radius: 28px; border: 1px solid var(--border); background:
  radial-gradient(600px 300px at 50% 0%, rgba(124,92,255,.22), transparent 70%), var(--bg-card-solid); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 14px; }
.cta-band p { color: var(--text-dim); max-width: 520px; margin: 0 auto 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 30px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.contact-line:last-child { border-bottom: 0; }
.contact-line svg { width: 22px; height: 22px; color: var(--neon-cyan); flex-shrink: 0; margin-top: 3px; }
.contact-line .ct-label { font-size: .78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; }
.contact-line .ct-val { font-weight: 600; }
.map-embed { width: 100%; height: 100%; min-height: 280px; border: 0; border-radius: var(--radius); filter: grayscale(.3) invert(.9) hue-rotate(180deg); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border-soft); padding: 50px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--text-dim); padding: 5px 0; font-size: .92rem; transition: color .2s; }
.footer-grid a:hover { color: var(--neon-cyan); }
.footer-grid p { color: var(--text-dim); font-size: .92rem; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: .85rem; flex-wrap: wrap; gap: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--bg-card-solid); border: 1px solid var(--neon-cyan); color: var(--text);
  padding: 14px 22px; border-radius: 14px; z-index: 80; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow-neon); transition: transform .35s cubic-bezier(.4,0,.2,1); display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast svg { width: 20px; height: 20px; color: var(--neon-green); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.mobile-open .nav-links { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--bg-800); border: 1px solid var(--border); border-radius: 18px; padding: 18px; gap: 14px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .col-3, .col-2, .col-4, .col-6 { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .col-3, .col-2, .col-4, .col-6 { grid-column: span 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Brands / Marchi marquee ---------- */
.brands-marquee {
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands-track {
  display: flex;
  align-items: center;
  gap: 50px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.brands-marquee:hover .brands-track { animation-play-state: paused; }
.brand-item { display: flex; align-items: center; flex: 0 0 auto; }
.brand-item img {
  height: 30px; width: auto;
  opacity: .5;
  transition: opacity .25s ease, transform .25s ease;
}
.brand-item img:hover { opacity: 1; transform: translateY(-2px); }
.brand-wm { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--text-dim); opacity: .5; transition: opacity .25s ease, transform .25s ease; font-family: var(--font-display); }
.brand-wm b { font-weight: 700; font-size: 19px; letter-spacing: .5px; }
.brand-wm i { font-style: normal; font-weight: 500; font-size: 8px; letter-spacing: 5px; margin-top: 2px; }
.brand-item.legami:hover .brand-wm { opacity: 1; transform: translateY(-2px); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; gap: 32px 50px; }
}
.brand-item.raster img { height: 40px; }
