/* ==========================================================================
   Gaming Relax — Custom Keyboards & Digital Craftsmanship
   ========================================================================== */

:root {
  --bg: #0a0d16;
  --bg-alt: #10141f;
  --card: #14182280;
  --card-solid: #14182a;
  --border: #ffffff1a;
  --text: #f2f3f5;
  --text-dim: #9aa0ac;
  --lime: #c6ff1a;
  --lime-dim: #c6ff1a33;
  --purple: #9b3dff;
  --purple-dim: #9b3dff33;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

p { color: var(--text-dim); margin: 0 0 16px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow--lime { color: var(--lime); }
.eyebrow--purple { color: var(--purple); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.btn--lime { background: var(--lime); color: #0a0d16; }
.btn--lime:hover { background: #d9ff5c; }

.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--outline:hover { border-color: var(--lime); color: var(--lime); }

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

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0d16ee;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: var(--lime); color: var(--lime); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); display: block; }

.main-nav {
  position: absolute;
  top: 76px;
  right: 24px;
  background: #10141fee;
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: none;
  flex-direction: column;
  min-width: 200px;
  box-shadow: 0 20px 40px #00000066;
}
.main-nav.open { display: flex; }
.main-nav a {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
}
.main-nav a:hover { background: var(--lime-dim); color: var(--lime); }
.main-nav a.active { color: var(--lime); }

/* ---------------- Hero (HOME) ---------------- */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_3848057695168728181.jpg');
  background-size: cover;
  background-position: center;
}
.hero h1 {
  font-size: clamp(40px, 8vw, 84px);
  text-transform: uppercase;
}
.hero h1 .accent { color: var(--lime); }
.hero .lede {
  max-width: 560px;
  margin: 24px auto 34px;
  font-size: 18px;
}

/* ---------------- Page Hero (TEAM) ---------------- */
.page-hero {
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_11843408134156193764.jpg');
  background-size: cover;
  background-position: center;
}
.page-hero h1 { font-size: clamp(34px, 6vw, 60px); text-transform: uppercase; }
.page-hero .lede { max-width: 620px; margin: 18px auto 0; font-size: 17px; }
.page-hero--purple {
  background: radial-gradient(ellipse at 50% 0%, #9b3dff22, transparent 65%), linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_11843408134156193764.jpg');
  background-size: cover;
  background-position: center;
}
.page-hero--purple h1 { color: var(--purple); }

/* ---------------- Sections generic ---------------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 44px); }

/* ---------------- Numbered feature cards (home) ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #171c29, #0d1019);
  padding: 32px 28px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--lime-dim); }
.feature-card__num {
  position: absolute;
  top: 22px; left: 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.1em;
}
.feature-card h3 { font-size: 24px; margin-bottom: 8px; }
.feature-card p { margin-bottom: 14px; font-size: 15px; }
.feature-card__link { color: var(--lime); font-weight: 700; font-size: 14px; }

/* ---------------- Team intro / studio band ---------------- */
.studio-band {
  border-top: 1px solid var(--border);
  padding: 90px 0;
  background: radial-gradient(ellipse at 30% 20%, #3a1a6633, transparent 60%),
              radial-gradient(ellipse at 80% 80%, #1a2f6633, transparent 60%);
}
.studio-band h2 { font-size: clamp(32px, 6vw, 56px); text-transform: uppercase; max-width: 700px; }
.studio-band p { max-width: 560px; font-size: 17px; }

/* ---------------- CTA banner ---------------- */
.cta-banner {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #12151f;
  padding: 70px 32px;
  text-align: center;
}
.cta-banner h2 { font-size: clamp(28px, 5vw, 46px); text-transform: uppercase; max-width: 760px; margin: 0 auto 30px; }

/* ---------------- Team cards ---------------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 46px;
}
.filter-pill {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: all .2s ease;
}
.filter-pill.active, .filter-pill:hover { background: var(--lime); color: #0a0d16; border-color: var(--lime); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.team-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-solid);
}
.team-card__photo {
  aspect-ratio: 3/4;
  background: #000 center/cover;
  filter: grayscale(1) contrast(1.05);
}
.team-card__body { padding: 20px; text-align: center; }
.team-card__body h3 { font-size: 20px; margin-bottom: 4px; }
.team-card__body span { color: var(--lime); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------------- Store ---------------- */
.store-hero {
  padding: 70px 0 40px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_9477128376334987139.jpg');
  background-size: cover;
  background-position: center;
}
.store-hero .eyebrow { color: var(--purple); }
.store-hero h1 { font-size: clamp(34px, 6vw, 58px); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}
.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-solid);
  display: flex;
  flex-direction: column;
}
.product-card__img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #061f12, #041008) center/cover;
  position: relative;
}
.product-card__body { padding: 22px; }
.product-card__cat { color: var(--purple); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.product-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-card h3 { font-size: 22px; margin: 6px 0 14px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.product-card__price { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.wish-btn {
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 18px;
  transition: color .2s ease;
}
.wish-btn.active, .wish-btn:hover { color: var(--purple); }

/* ---------------- Art gallery ---------------- */
.art-hero {
  padding: 70px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_1978082863011878448.jpg');
  background-size: cover;
  background-position: center;
}
.art-hero h1 { color: var(--purple); font-size: clamp(36px, 7vw, 64px); text-transform: uppercase; }
.gallery-grid {
  columns: 3 220px;
  column-gap: 18px;
}
.gallery-grid img, .gallery-item {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  break-inside: avoid;
  filter: saturate(1.05);
}
.gallery-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1a0a30, #05030a);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

/* ---------------- Custom process ---------------- */
.process-hero {
  padding: 70px 0 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_2434197145355345944.jpg');
  background-size: cover;
  background-position: center;
}
.process-hero .eyebrow { color: var(--lime); }
.process-hero h1 { font-size: clamp(32px, 6vw, 54px); color: var(--lime); text-transform: uppercase; }
.process-list { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin: 0 auto; }
.process-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-solid);
  padding: 30px 32px;
  position: relative;
}
.process-step__num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: block;
}
.process-step h3 { font-size: 24px; margin-bottom: 8px; }
.process-cta { text-align: center; margin-top: 50px; }

/* ---------------- Contact form ---------------- */
.contact-hero { 
  padding: 70px 0 40px; 
  text-align: center; 
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(rgba(10, 13, 22, 0.85), rgba(10, 13, 22, 0.92)), url('watermarked_img_13654026618800825806.jpg');
  background-size: cover;
  background-position: center;
}
.contact-hero .eyebrow { color: var(--lime); }
.contact-hero h1 { font-size: clamp(34px, 6vw, 60px); text-transform: uppercase; }
.contact-hero .lede { max-width: 560px; margin: 16px auto 0; }

.contact-form-wrap {
  max-width: 640px;
  margin: 40px auto 0;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-solid);
}
.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 2px;
  outline: none;
  transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime); }
.field select { background: var(--bg); }
.field textarea { resize: vertical; min-height: 100px; }
.form-status { margin-top: 18px; font-size: 14px; color: var(--lime); display: none; }
.form-status.visible { display: block; }

/* ---------------- FAQ ---------------- */
.faq-hero { padding: 70px 0 20px; text-align: center; }
.faq-hero h1 { font-size: clamp(34px, 6vw, 58px); text-transform: uppercase; }
.faq-list { max-width: 760px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-solid);
  overflow: hidden;
}
.faq-item__q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 24px 26px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}
.faq-item__q .sign { color: var(--lime); font-size: 20px; flex-shrink: 0; }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 26px;
}
.faq-item__a p { padding-bottom: 22px; margin: 0; }
.faq-item.open .faq-item__a { max-height: 400px; }

/* ---------------- Legal pages ---------------- */
.legal-hero { padding: 60px 0 10px; text-align: center; }
.legal-hero h1 { font-size: clamp(30px, 5vw, 48px); text-transform: uppercase; }
.legal-body { max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
.legal-body h2 { font-size: 20px; margin-top: 40px; color: var(--lime); }
.legal-body p, .legal-body li { color: var(--text-dim); font-size: 15px; }
.legal-body ul { padding-left: 20px; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 70px 0 30px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-bottom: 10px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-col a, .footer-col p { display: block; color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.footer-col a:hover { color: var(--lime); }
.footer-col .social-link { display: flex; align-items: center; gap: 10px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .socials { display: flex; gap: 16px; }
.footer-bottom .socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, color .2s ease;
}
.footer-bottom .socials a:hover { border-color: var(--lime); color: var(--lime); }
.footer-bottom small { color: var(--text-dim); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .contact-form-wrap, .process-step { padding: 26px 22px; }
}

/* ==========================================================================
   Auth (login / register) — menu account nell'header
   ========================================================================== */
.auth-menu { position: relative; }
.auth-menu__trigger {
  background: var(--lime);
  color: #0a0d16;
  font-weight: 700;
  font-family: var(--font-display);
  border: none;
  cursor: pointer;
}
.auth-menu__dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: #10141fee;
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 40px #00000066;
  z-index: 200;
}
.auth-menu.open .auth-menu__dropdown { display: flex; }
.auth-menu__email {
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  word-break: break-all;
}
.auth-menu__dropdown a, .auth-menu__dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.auth-menu__dropdown a:hover, .auth-menu__dropdown button:hover { background: var(--lime-dim); color: var(--lime); }

.auth-page {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-solid);
  padding: 44px 38px;
}
.auth-card h1 { font-size: 30px; text-align: center; margin-bottom: 8px; }
.auth-card .lede { text-align: center; font-size: 15px; margin-bottom: 30px; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-error {
  background: #ff3b3b1a;
  border: 1px solid #ff3b3b55;
  color: #ff8080;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.auth-error.visible { display: block; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-dim); }
.auth-switch a { color: var(--lime); font-weight: 700; }
.admin-hint {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ==========================================================================
   Dashboard admin
   ========================================================================== */
.dashboard-guard {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dim);
}
#dashboard-root { display: none; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
}
.dash-header h1 { font-size: 32px; margin: 0; }
.dash-header span { color: var(--text-dim); font-size: 14px; }

.dash-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 34px 0;
}
.dash-tab {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.dash-tab.active { background: var(--lime); color: #0a0d16; border-color: var(--lime); }

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.dash-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) { .dash-layout { grid-template-columns: 1fr; } }

.dash-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-solid);
  padding: 28px;
}
.dash-form-card h3 { font-size: 18px; margin-bottom: 20px; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card-solid);
}
.admin-row__thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}
.admin-row__info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row__info strong { font-size: 15px; }
.admin-row__info span { font-size: 13px; color: var(--text-dim); }
.admin-row__actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-row__actions .btn { padding: 8px 14px; font-size: 13px; }

.empty-hint { color: var(--text-dim); font-size: 14px; padding: 20px 0; text-align: center; }

.dash-save-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--lime);
  display: none;
}
.dash-save-msg.visible { display: block; }
