/* ==========================================================================
   ENERGY MANAGER — Product Landing Page
   Design: Neumorphic / Figma-based
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Switzer';
  src: url('https://cdn.jsdelivr.net/gh/nicro950/switzer-font@main/fonts/switzer/Switzer-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('https://cdn.jsdelivr.net/gh/nicro950/switzer-font@main/fonts/switzer/Switzer-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('https://cdn.jsdelivr.net/gh/nicro950/switzer-font@main/fonts/switzer/Switzer-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Figma palette */
  --bg-dark: #181C24;
  --bg-dark-card: #1E2330;
  --bg-light: #F2F5F7;
  --card-bg: #E6E8ED;
  --text-primary: #242934;
  --text-secondary: #58647F;
  --text-on-dark: #F2F5F7;
  --text-muted: #8892A8;
  --accent-yellow: #FBED00;
  --accent-green: #BAFE00;
  --accent-red: #AB091E;
  --accent-blue: #3B82F6;
  --white: #FFFFFF;

  /* Neumorphic shadows (from Figma) */
  --shadow-raised: 3.27px 3.27px 6.54px rgba(163,157,147,0.4),
                   -2.18px -2.18px 6.54px rgba(255,255,255,1);
  --shadow-raised-dark: 4px 4px 8px rgba(0,0,0,0.5),
                        -2px -2px 6px rgba(50,55,70,0.4);
  --shadow-inset: inset 2px 2px 5px rgba(163,157,147,0.35),
                  inset -2px -2px 5px rgba(255,255,255,0.8);

  /* Typography */
  --font: 'Switzer', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 6rem;
  --sp-2xl: 8rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.35s;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 64px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.section-label--light { color: var(--text-muted); }
.section-label--dark  { color: rgba(242,245,247,0.5); }

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(24,28,36,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.nav.scrolled {
  background: rgba(24,28,36,0.95);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-on-dark);
  flex-shrink: 0;
}

.nav__logo svg {
  width: 32px;
  height: 32px;
}

.nav__logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(242,245,247,0.7);
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-on-dark);
}

.nav__cta {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  color: var(--bg-dark);
  transition: opacity var(--duration) var(--ease);
}

.nav__cta:hover { opacity: 0.9; }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(24,28,36,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  z-index: 999;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-on-dark);
  opacity: 0.8;
  transition: opacity var(--duration) var(--ease);
}

.nav__mobile a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  overflow: hidden;
  padding: calc(var(--nav-h) + var(--sp-lg)) 0 var(--sp-xl);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: center;
}

.hero__content { max-width: 540px; }

.hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  border-radius: 100px;
  margin-bottom: var(--sp-md);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-on-dark);
  margin-bottom: var(--sp-sm);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  color: var(--bg-dark);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251,237,0,0.25);
}

.hero__phone {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__phone-frame {
  position: relative;
  width: 280px;
  max-height: 580px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  background: var(--bg-dark-card);
}

.hero__phone-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  max-height: 580px;
}

/* ---------- Section: Generic light ---------- */
.section {
  padding: var(--sp-2xl) 0;
}

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

.section--dark .section-label { color: rgba(242,245,247,0.5); }
.section--dark .section__subtitle { color: var(--text-muted); }

.section__header {
  max-width: 640px;
  margin-bottom: var(--sp-lg);
}

.section__header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Screenshot Showcase ---------- */
.showcase {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-raised);
}

.showcase--dark {
  background: var(--bg-dark-card);
  box-shadow: var(--shadow-raised-dark);
}

.showcase img {
  width: 100%;
  display: block;
}

/* Neumorphic card */
.neu-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: var(--sp-md);
  box-shadow: var(--shadow-raised);
}

.neu-card--dark {
  background: var(--bg-dark-card);
  box-shadow: var(--shadow-raised-dark);
}

/* ---------- Feature Split (image + text side by side) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

.split__text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--sp-sm);
}

.split__text p {
  color: var(--text-secondary);
  margin-bottom: var(--sp-sm);
}

.split__visual {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}

.split__visual--dark {
  box-shadow: var(--shadow-raised-dark);
}

.split__visual img {
  width: 100%;
  display: block;
}

/* Feature list with checkmarks */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--sp-sm);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  background-size: 20px 20px;
  /* Checkmark via SVG data URI */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23BAFE00'/%3E%3Cpath d='M6 10l3 3 5-6' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: none;
  /* Fallback — just show the green circle */
}

.section--dark .check-list li { color: var(--text-muted); }

/* Stat highlight */
.stat-highlight {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: var(--sp-sm);
}

.stat-highlight__number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-highlight__unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ---------- Phone + Desktop Duo ---------- */
.duo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--sp-md);
}

.duo__desktop {
  width: 65%;
  max-height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-raised-dark);
}

.duo__phone {
  width: 22%;
  max-height: 500px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.duo__desktop img,
.duo__phone img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
}

.stat-card {
  text-align: center;
  padding: var(--sp-md);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow-raised);
}

.stat-card__value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-card__label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---------- System Grid ---------- */
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.system-card {
  padding: var(--sp-md);
  border-radius: 16px;
  background: var(--bg-dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform var(--duration) var(--ease);
}

.system-card:hover { transform: translateY(-4px); }

.system-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--sp-sm);
  color: var(--bg-dark);
}

.system-card__icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.system-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-on-dark);
}

.system-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Award ---------- */
.award {
  text-align: center;
  padding: var(--sp-xl) 0;
  background: linear-gradient(135deg, var(--bg-dark), #1a2030);
}

.award__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  font-size: 2rem;
  margin-bottom: var(--sp-md);
  color: var(--bg-dark);
}

.award__badge svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.award h2 {
  color: var(--text-on-dark);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--sp-sm);
}

.award__quote {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  padding: var(--sp-lg) 0 var(--sp-md);
  color: var(--text-muted);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.footer__brand p {
  margin-top: var(--sp-xs);
  font-size: 0.875rem;
  max-width: 300px;
}

.footer h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-on-dark);
  margin-bottom: var(--sp-sm);
}

.footer a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}

.footer a:hover { color: var(--text-on-dark); }

.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--sp-md);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Placeholder screens (until Figma exports) ---------- */
.placeholder-screen {
  background: var(--card-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  min-height: 300px;
  padding: var(--sp-md);
}

.placeholder-screen--dark {
  background: var(--bg-dark-card);
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__content { max-width: 100%; margin: 0 auto; }
  .hero__phone { margin-top: var(--sp-md); }
  .hero__phone-frame { width: 240px; }

  .split { grid-template-columns: 1fr; }
  .split--reverse { direction: ltr; }
  .split__visual { order: -1; }

  .stats-row { grid-template-columns: 1fr; gap: var(--sp-sm); }
  .system-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-md); }
}

@media (max-width: 768px) {
  :root {
    --sp-lg: 3rem;
    --sp-xl: 4rem;
    --sp-2xl: 5rem;
  }

  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .hero { min-height: auto; padding: calc(var(--nav-h) + var(--sp-md)) 0 var(--sp-lg); }
  .hero__phone-frame { width: 220px; }

  .duo { flex-direction: column; align-items: center; }
  .duo__desktop { width: 100%; }
  .duo__phone { width: 50%; }

  .system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .section h2 { font-size: 1.5rem; }
  .stat-highlight__number { font-size: 2.25rem; }
}
