/**
 * Smash Hit Technologies Ltd. – Central stylesheet
 * Best practice: CSS custom properties, utility classes, component patterns
 */

/* ==========================================================================
   Design tokens (CSS custom properties)
   ========================================================================== */
:root {
  /* Brand */
  --color-cyan: #22d3ee;
  --color-cyan-dark: #0e7490;
  --color-indigo: #6366f1;
  --color-indigo-dark: #4f46e5;

  /* Surfaces */
  --bg-base: #0f172a;       /* slate-900 */
  --bg-darker: #020617;     /* slate-950 */
  --bg-card: rgba(15, 23, 42, 0.5);
  --border-subtle: #1e293b;
  --border-muted: #334155;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Light theme (MVP section) */
  --bg-light: #ffffff;
  --bg-light-muted: #f8fafc;
  --text-dark: #0f172a;
  --text-dark-muted: #475569;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 0.3s ease;

  /* Electric Future palette (site-wide) */
  --ef-bg: #F8FAFC;
  --ef-text: #0F172A;
  --ef-cyan: #06B6D4;
  --ef-blue: #2563EB;
  --ef-rose: #F43F5E;
}

/* ==========================================================================
   Global site – new style (Electric Future) – overwrites
   ========================================================================== */
body {
  background-color: var(--ef-bg);
  color: var(--ef-text);
  font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   Base & utilities
   ========================================================================== */
.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Container – single max-width + padding */
.container-narrow {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-wide {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-wide { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .container-wide { padding-left: 2rem; padding-right: 2rem; }
}

/* ==========================================================================
   Header & Footer (shared dark bar – same design tokens)
   ========================================================================== */

/* Navigation (header) – matches footer look */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text-primary);
}

.site-nav__logo-img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  display: block;
}

.site-nav__links {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .site-nav__links { display: flex; }
}

.site-nav__link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.site-nav__link:hover {
  color: var(--text-secondary);
}

.site-nav__cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 2px solid var(--border-muted);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.site-nav__cta:hover {
  background: var(--border-subtle);
  border-color: var(--border-muted);
}

.site-nav__mobile-btn {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.site-nav__mobile-btn:hover {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .site-nav__mobile-btn { display: none; }
}

.site-nav__dropdown {
  display: none;
  padding: 1rem;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-subtle);
  flex-direction: column;
  gap: 1rem;
}

.site-nav__dropdown.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .site-nav__dropdown { display: none !important; }
}

.site-nav__dropdown .site-nav__link {
  display: block;
}

/* ==========================================================================
   Hero (split panel)
   ========================================================================== */
.hero-split {
  transition: flex-grow var(--transition-base);
}

.hero-split:hover {
  flex-grow: 1.2;
}

.hero-panel {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.hero-panel:first-of-type {
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
}

.hero-panel--right {
  border-right: none;
  border-left: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
}

.hero-panel__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1rem;
  border-radius: 9999px;
  border: 1px solid;
  font-size: 0.875rem;
  font-family: var(--font-mono, 'Space Grotesk', monospace);
}

.hero-panel__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #0f172a;
  transition: color 0.3s ease;
}

.hero-panel:hover .hero-panel__title--cyan { color: var(--ef-cyan); }
.hero-panel:hover .hero-panel__title--indigo { color: var(--ef-blue); }

.hero-panel__desc {
  font-size: 1.125rem;
  color: #475569;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-panel__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: gap var(--transition-base);
}

.hero-panel__cta:hover { gap: 1rem; }

.hero-panel__cta--cyan { color: var(--ef-cyan); }
.hero-panel__cta--indigo { color: #6366f1; }

/* ==========================================================================
   Section layout
   ========================================================================== */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  position: relative;
}

.section--dark {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-subtle);
}

.section--light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section__header {
  text-align: center;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 5rem;
}

.section__label {
  font-family: var(--font-mono, 'Space Grotesk', monospace);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section__title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section--dark .section__title { color: var(--text-primary); }
.section--light .section__title { color: var(--text-dark); }

.section__subtitle {
  font-size: 1.25rem;
}

.section--dark .section__subtitle { color: var(--text-secondary); }
.section--light .section__subtitle { color: var(--text-dark-muted); }

/* ==========================================================================
   Cards (SRE & MVP)
   ========================================================================== */
.card {
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.card--dark {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}

.card--dark:hover {
  border-color: rgba(34, 211, 238, 0.5);
}

.card--light {
  background: var(--bg-light-muted);
  border: 1px solid #e2e8f0;
}

.card--light:hover {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.card__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.card:hover .card__icon {
  transform: scale(1.1);
}

.card__icon--cyan {
  background: rgba(8, 145, 178, 0.3);
  color: var(--color-cyan);
}

.card__icon--indigo {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-indigo);
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.card__body {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  min-height: 4.5rem;
}

.card--dark .card__body { color: var(--text-secondary); }
.card--light .card__body { color: var(--text-dark-muted); }

.card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.card__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.card--dark .card__list li { color: var(--text-muted); }
.card--light .card__list li { color: var(--text-dark-muted); }

.card__list i.fa-check,
.card__list i.fa-check-circle {
  flex-shrink: 0;
}

.card__footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  margin-top: auto;
}

.card--light .card__footer {
  border-color: #e2e8f0;
}

.card__price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card__price-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card--dark .card__price-label { color: var(--text-muted); }
.card--light .card__price-label { color: var(--text-dark-muted); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn--cyan {
  background: #0e7490;
  color: white;
}

.btn--cyan:hover {
  background: #155e75;
}

.btn--indigo {
  background: var(--color-indigo);
  color: white;
}

.btn--indigo:hover {
  background: var(--color-indigo-dark);
}

/* ==========================================================================
   Form (contact)
   ========================================================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-darker);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ef-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}

.form-textarea {
  resize: none;
  min-height: 8rem;
}

.form-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .form-panel { padding: 2.5rem; }
}

/* Footer – same tokens as header (--bg-darker, --border-subtle, --text-primary/--text-secondary) */
.site-footer {
  padding: 5rem 1.5rem 2.5rem;
  background: var(--bg-darker);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.site-footer__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.site-footer__text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer__copy {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Page-specific: SRE grid background
   ========================================================================== */
.sre-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  opacity: 0.2;
  pointer-events: none;
}

/* Badge (e.g. POPULAR) */
.card-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-bottom-left-radius: 0.5rem;
}

.card-badge--cyan {
  background: var(--color-cyan);
  color: var(--bg-base);
}

.card-badge--indigo {
  background: var(--color-indigo);
  color: white;
}

/* ==========================================================================
   Chart container & info card (site-wide, new style)
   ========================================================================== */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  height: 350px;
  max-height: 400px;
}

@media (max-width: 640px) {
  .chart-container {
    height: 280px;
  }
}

/* Custom scrollbar – new style */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.info-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
