/* =========================================================
   TESLA COMPUTER SHOP — CUSTOM STYLES
   Theme: Electric Red & Black | Circuit-inspired identity
   ========================================================= */

:root {
  --tcs-black: #0a0a0a;
  --tcs-black-soft: #121212;
  --tcs-card: #161414;
  --tcs-red: #e31e24;
  --tcs-red-dark: #8b0000;
  --tcs-red-glow: rgba(227, 30, 36, 0.55);
  --tcs-off-white: #f5f5f0;
  --tcs-gray: #9a9a96;
  --tcs-border: rgba(227, 30, 36, 0.18);

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* {
  scroll-behavior: smooth;
}

body {
  background-color: var(--tcs-black);
  color: var(--tcs-off-white);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
}

a {
  text-decoration: none;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--tcs-red);
  outline-offset: 3px;
}

.text-accent { color: var(--tcs-red); }
.text-muted-light { color: var(--tcs-gray); }

/* =========================================================
   CIRCUIT BACKGROUND CANVAS (signature ambient layer)
   ========================================================= */
#circuitCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #circuitCanvas { display: none; }
}

/* =========================================================
   NAVBAR
   ========================================================= */
.tcs-navbar {
  background-color: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tcs-border);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  transition: background-color 0.3s ease, padding 0.3s ease;
  z-index: 100;
}

.tcs-navbar.scrolled {
  background-color: rgba(10, 10, 10, 0.95);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.tcs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-bolt {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--tcs-red), var(--tcs-red-dark));
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 0 18px var(--tcs-red-glow);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--tcs-off-white);
}

.brand-accent { color: var(--tcs-red); }

.navbar-nav .nav-link {
  color: var(--tcs-off-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  padding: 0.5rem 0.9rem;
  position: relative;
  transition: color 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--tcs-red);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--tcs-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.navbar-nav .nav-link:hover::after {
  transform: scaleX(1);
}

.custom-toggler-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--tcs-red);
  position: relative;
}
.custom-toggler-icon::before,
.custom-toggler-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--tcs-red);
}
.custom-toggler-icon::before { top: -8px; }
.custom-toggler-icon::after { top: 8px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.tcs-btn-primary {
  background: linear-gradient(135deg, var(--tcs-red), var(--tcs-red-dark));
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.65rem 1.6rem;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(227, 30, 36, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tcs-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(227, 30, 36, 0.55);
}

.tcs-btn-outline {
  background: transparent;
  color: var(--tcs-off-white);
  border: 1.5px solid var(--tcs-red);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.65rem 1.6rem;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.tcs-btn-outline:hover {
  background: var(--tcs-red);
  color: #fff;
  box-shadow: 0 8px 28px rgba(227, 30, 36, 0.4);
}

/* =========================================================
   HERO
   ========================================================= */
.tcs-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(227, 30, 36, 0.15), transparent 60%),
              var(--tcs-black);
  z-index: 1;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(227, 30, 36, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 30, 36, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 75%);
  z-index: 0;
}

.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--tcs-red);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  animation: fadeInUp 0.7s ease both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tcs-red);
  box-shadow: 0 0 0 0 var(--tcs-red-glow);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--tcs-red-glow); }
  70%  { box-shadow: 0 0 0 8px rgba(227, 30, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  color: var(--tcs-off-white);
  margin-bottom: 1.4rem;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.text-glow {
  color: var(--tcs-red);
  text-shadow: 0 0 24px var(--tcs-red-glow);
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--tcs-gray);
  max-width: 560px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-content .d-flex { animation: fadeInUp 0.8s ease 0.3s both; }
.hero-stats { animation: fadeInUp 0.8s ease 0.4s both; }

.stat-num {
  font-size: 2.1rem;
  margin-bottom: 0.1rem;
  color: var(--tcs-off-white);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--tcs-gray);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

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

/* Hero visual: chip + rings + floating cards */
.hero-visual {
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circuit-ring {
  position: absolute;
  border: 1px solid var(--tcs-border);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.ring-1 { width: 340px; height: 340px; }
.ring-2 { width: 420px; height: 420px; border-style: dashed; animation-duration: 30s; animation-direction: reverse; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-chip {
  width: 130px;
  height: 130px;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--tcs-card), var(--tcs-black-soft));
  border: 1px solid var(--tcs-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--tcs-red);
  box-shadow: 0 0 50px rgba(227, 30, 36, 0.25), inset 0 0 30px rgba(227,30,36,0.08);
  animation: floatChip 4s ease-in-out infinite;
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.floating-card {
  position: absolute;
  background: var(--tcs-card);
  border: 1px solid var(--tcs-border);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--tcs-off-white);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.floating-card i { color: var(--tcs-red); }

.card-top { top: 20px; right: 10px; animation: floatChip 5s ease-in-out infinite; }
.card-bottom { bottom: 30px; left: 0; animation: floatChip 4.5s ease-in-out infinite 0.5s; }
.card-side { top: 50%; right: -20px; animation: floatChip 4s ease-in-out infinite 1s; }

/* Power divider: signature glowing line between hero and next section */
.power-divider {
  position: relative;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--tcs-red), transparent);
  box-shadow: 0 0 20px var(--tcs-red-glow);
}

/* =========================================================
   SECTIONS — GENERAL
   ========================================================= */
.tcs-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-dark {
  background: var(--tcs-black-soft);
  border-top: 1px solid var(--tcs-border);
  border-bottom: 1px solid var(--tcs-border);
}

.section-head { max-width: 640px; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--tcs-red);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  color: var(--tcs-off-white);
}

/* =========================================================
   SERVICE CARDS
   ========================================================= */
.service-card {
  background: var(--tcs-card);
  border: 1px solid var(--tcs-border);
  border-radius: 14px;
  padding: 2rem 1.6rem;
  height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--tcs-red), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--tcs-red);
  box-shadow: 0 16px 40px rgba(227, 30, 36, 0.2);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(227, 30, 36, 0.12);
  color: var(--tcs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.service-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--tcs-off-white);
}

.service-card p {
  color: var(--tcs-gray);
  font-size: 0.92rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.product-card {
  background: var(--tcs-card);
  border: 1px solid var(--tcs-border);
  border-radius: 14px;
  padding: 1.6rem;
  height: 100%;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--tcs-red);
  box-shadow: 0 16px 40px rgba(227, 30, 36, 0.18);
}

.product-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--tcs-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-img {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--tcs-red);
  background: radial-gradient(circle, rgba(227,30,36,0.1), transparent 70%);
  border-radius: 10px;
  margin-bottom: 1.2rem;
}

.product-card h5 {
  font-size: 1.02rem;
  color: var(--tcs-off-white);
  margin-bottom: 0.3rem;
}

.product-spec {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--tcs-gray);
  margin-bottom: 1.2rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--tcs-border);
  padding-top: 1rem;
}

.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--tcs-red);
  font-size: 1rem;
}

.btn-mini {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--tcs-off-white);
  border: 1px solid var(--tcs-border);
  padding: 5px 14px;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.btn-mini:hover {
  background: var(--tcs-red);
  border-color: var(--tcs-red);
  color: #fff;
}

/* =========================================================
   WHY US
   ========================================================= */
.why-item {
  display: flex;
  gap: 18px;
  margin-bottom: 1.8rem;
}

.why-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(227, 30, 36, 0.12);
  color: var(--tcs-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.why-item h5 {
  color: var(--tcs-off-white);
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.why-item p {
  color: var(--tcs-gray);
  font-size: 0.92rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.why-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.why-glow-box {
  width: 280px;
  height: 280px;
  border-radius: 28px;
  background: linear-gradient(150deg, var(--tcs-card), var(--tcs-black-soft));
  border: 1px solid var(--tcs-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tcs-red);
  box-shadow: 0 0 80px rgba(227, 30, 36, 0.2), inset 0 0 40px rgba(227,30,36,0.06);
}

/* =========================================================
   REVIEWS
   ========================================================= */
.review-card {
  background: var(--tcs-card);
  border: 1px solid var(--tcs-border);
  border-radius: 14px;
  padding: 1.8rem;
  height: 100%;
}

.stars { color: var(--tcs-red); margin-bottom: 1rem; font-size: 0.9rem; }

.review-card p {
  color: var(--tcs-off-white);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-style: italic;
}

.review-card h6 {
  color: var(--tcs-red);
  font-size: 0.88rem;
  margin: 0;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.1rem;
  color: var(--tcs-off-white);
  font-size: 0.95rem;
}

.contact-info-item i {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(227, 30, 36, 0.12);
  color: var(--tcs-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-row { display: flex; gap: 12px; }

.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--tcs-border);
  color: var(--tcs-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.social-row a:hover {
  background: var(--tcs-red);
  border-color: var(--tcs-red);
  color: #fff;
  transform: translateY(-3px);
}

.contact-form {
  background: var(--tcs-card);
  border: 1px solid var(--tcs-border);
  border-radius: 16px;
  padding: 2.2rem;
}

.form-label {
  color: var(--tcs-off-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.tcs-input {
  background: var(--tcs-black-soft);
  border: 1px solid var(--tcs-border);
  color: var(--tcs-off-white);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
}

.tcs-input:focus {
  background: var(--tcs-black-soft);
  border-color: var(--tcs-red);
  color: var(--tcs-off-white);
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.15);
}

.tcs-input::placeholder { color: var(--tcs-gray); }

select.tcs-input option { background: var(--tcs-black-soft); }

/* =========================================================
   FOOTER
   ========================================================= */
.tcs-footer {
  background: var(--tcs-black-soft);
  border-top: 1px solid var(--tcs-border);
  padding: 70px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-desc { color: var(--tcs-gray); font-size: 0.9rem; line-height: 1.6; max-width: 320px; }

.footer-heading {
  color: var(--tcs-off-white);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  letter-spacing: 0.5px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a {
  color: var(--tcs-gray);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--tcs-red); }

.footer-subscribe {
  display: flex;
  border: 1px solid var(--tcs-border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.8rem;
}

.footer-subscribe input {
  background: var(--tcs-black-soft);
  border: none;
  color: var(--tcs-off-white);
  padding: 0.6rem 0.9rem;
  flex: 1;
  font-size: 0.88rem;
}
.footer-subscribe input:focus { outline: none; }

.footer-subscribe button {
  background: var(--tcs-red);
  border: none;
  color: #fff;
  width: 44px;
  flex-shrink: 0;
}

.footer-divider {
  border-color: var(--tcs-border);
  margin: 2.5rem 0 1.5rem;
}

.footer-copy { color: var(--tcs-gray); font-size: 0.85rem; }

/* =========================================================
   BACK TO TOP
   ========================================================= */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--tcs-red);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
  z-index: 90;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .circuit-ring, .hero-chip, .floating-card, .pulse-dot { animation: none !important; }
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */
@media (max-width: 991.98px) {
  .tcs-hero { padding-top: 130px; min-height: auto; }
  .navbar-collapse {
    background: var(--tcs-black-soft);
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--tcs-border);
  }
}

@media (max-width: 575.98px) {
  .tcs-section { padding: 70px 0; }
  .hero-title { font-size: 2.3rem; }
  .contact-form { padding: 1.4rem; }
}
