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

:root {
  --ieee-blue: #006DB6;
  --ieee-blue-dark: #004A7C;
  --ieee-blue-light: #4FC3F7;
  --ieee-blue-bg: #EBF5FF;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --dark-bg: #0A1628;
  --dark-card: #111D33;
  --dark-border: #1E293B;
  --dark-text: #94A3B8;
  --dark-heading: #F1F5F9;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; color: var(--gray-700); line-height: 1.7; background: var(--white); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--ieee-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Navbar === */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 14px 0; transition: all 0.3s ease; }
.navbar.scrolled { background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--gray-200); }
.nav-content { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo span { font-size: 1.25rem; font-weight: 800; color: var(--white); letter-spacing: -0.02em; }
.navbar.scrolled .logo span { color: var(--gray-900); }
.logo-icon { flex-shrink: 0; }
.nav-links { display: flex; list-style: none; gap: 28px; }
.nav-links a { color: rgba(255,255,255,0.7); font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.navbar.scrolled .nav-links a { color: var(--gray-600); }
.navbar.scrolled .nav-links a:hover { color: var(--gray-900); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); cursor: pointer; padding: 4px; }
.navbar.scrolled .nav-toggle { color: var(--gray-700); }

/* === Hero === */
.hero {
  position: relative;
  padding: 130px 0 60px;
  background: linear-gradient(180deg, #050C18 0%, var(--dark-bg) 40%, #0E1E36 100%);
  overflow: hidden;
  min-height: 100vh;
}

.substation-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.substation-bg svg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  min-width: 1400px;
  height: auto;
}

.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-text {
  flex: 1;
  max-width: 520px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0,109,182,0.15);
  border: 1px solid rgba(0,109,182,0.3);
  color: var(--ieee-blue-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--dark-heading);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--dark-text);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-company {
  margin-top: 20px;
  font-size: 0.8rem;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-actions { margin-bottom: 8px; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: all 0.2s ease; cursor: pointer; border: none; letter-spacing: -0.01em; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ieee-blue); color: #fff; box-shadow: 0 1px 3px rgba(0,109,182,0.3); }
.btn-primary:hover { background: var(--ieee-blue-dark); box-shadow: 0 4px 12px rgba(0,109,182,0.4); }
.btn-secondary { background: var(--gray-50); color: var(--ieee-blue); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-100); }

/* === Phone Mockups === */
.phone-showcase {
  flex-shrink: 0;
  width: 380px;
  height: 540px;
  position: relative;
  perspective: 1200px;
}

.phone-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.phone-frame {
  position: absolute;
  width: 260px;
  height: 520px;
  border-radius: 36px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 2px #2a2a2a, inset 0 0 0 1px #333;
  overflow: hidden;
  animation-duration: 12s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Phone positions & animation */
.phone-1 {
  left: 0; top: 20px; z-index: 3;
  animation-name: phone1;
}
.phone-2 {
  left: 60px; top: 0; z-index: 2;
  animation-name: phone2;
}
.phone-3 {
  left: 120px; top: 20px; z-index: 1;
  animation-name: phone3;
}

@keyframes phone1 {
  0%, 30%   { z-index: 3; opacity: 1; transform: translateX(0) scale(1); }
  33%, 63%  { z-index: 1; opacity: 0.5; transform: translateX(80px) scale(0.88); }
  66%, 96%  { z-index: 2; opacity: 0.7; transform: translateX(40px) scale(0.94); }
  100%      { z-index: 3; opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes phone2 {
  0%, 30%   { z-index: 2; opacity: 0.7; transform: translateX(0) scale(0.94); }
  33%, 63%  { z-index: 3; opacity: 1; transform: translateX(-60px) scale(1); }
  66%, 96%  { z-index: 1; opacity: 0.5; transform: translateX(40px) scale(0.88); }
  100%      { z-index: 2; opacity: 0.7; transform: translateX(0) scale(0.94); }
}
@keyframes phone3 {
  0%, 30%   { z-index: 1; opacity: 0.5; transform: translateX(0) scale(0.88); }
  33%, 63%  { z-index: 2; opacity: 0.7; transform: translateX(-80px) scale(0.94); }
  66%, 96%  { z-index: 3; opacity: 1; transform: translateX(-120px) scale(1); }
  100%      { z-index: 1; opacity: 0.5; transform: translateX(0) scale(0.88); }
}

/* === App Screen Mockup Styles === */
.app-header {
  background: #0A1628;
  padding: 38px 14px 14px;
  flex-shrink: 0;
}
.app-back { font-size: 10px; color: #8AABDB; font-weight: 500; }
.app-title { font-size: 17px; font-weight: 700; color: #fff; margin-top: 4px; }
.app-subtitle { font-size: 9px; color: #8AABDB; margin-top: 1px; }

.app-body {
  flex: 1;
  background: #F2F2F7;
  padding: 8px 10px;
  overflow: hidden;
}

.app-section-label {
  font-size: 7.5px;
  font-weight: 600;
  color: #6D6D72;
  letter-spacing: 0.4px;
  margin: 8px 0 3px 2px;
}

.app-card {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 3px;
  box-shadow: 0 0.5px 2px rgba(0,0,0,0.06);
  overflow: hidden;
}

.app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 9.5px;
  color: #000;
  border-bottom: 0.5px solid #E5E5EA;
  min-height: 26px;
}
.app-row.last { border-bottom: none; }
.app-row .muted { color: #6D6D72; }
.app-row .accent { color: #007AFF; font-weight: 700; }

.app-value { color: #6D6D72; font-size: 9px; }
.app-input-val { color: #000; font-weight: 500; font-size: 9.5px; }
.app-input-val small { color: #6D6D72; font-weight: 400; font-size: 8px; }

.app-segmented {
  display: flex;
  border-radius: 5px;
  border: 0.5px solid #C6C6C8;
  overflow: hidden;
  font-size: 8.5px;
}
.app-segmented.sm { font-size: 7.5px; }
.app-segmented span {
  padding: 4px 8px;
  background: #F2F2F7;
  color: #6D6D72;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.app-segmented .seg-active {
  background: #007AFF;
  color: #fff;
  font-weight: 600;
}

.app-btn {
  background: #007AFF;
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0 4px;
}

/* Results screen mockup */
.app-result-hero {
  background: #007AFF;
  padding: 14px;
  text-align: center;
  border-radius: 10px;
  margin-bottom: 6px;
}
.app-result-eyebrow { font-size: 7px; color: rgba(255,255,255,0.7); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.app-result-size { font-size: 44px; font-weight: 700; color: #fff; line-height: 1.1; }
.app-result-unit { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.8); margin-left: 3px; }
.app-result-sub { font-size: 8px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.app-result-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); font-size: 7.5px; font-weight: 600; }

.app-vd-banner {
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.app-vd-banner.pass { background: #EDFAF2; }
.vd-label { font-size: 7px; font-weight: 700; color: #34C759; text-transform: uppercase; letter-spacing: 0.3px; }
.vd-big { font-size: 24px; font-weight: 700; color: #34C759; line-height: 1.2; }
.vd-sub { font-size: 8px; color: #34C759; }
.vd-badge { padding: 4px 8px; border-radius: 6px; font-size: 8px; font-weight: 700; color: #fff; }
.vd-badge.pass { background: #34C759; }

/* === Sections === */
.section { padding: 96px 0; }
.section-white { background: var(--white); }
.section-light { background: var(--gray-50); }
.section-dark { background: var(--dark-bg); }
.section-label { text-align: center; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ieee-blue); margin-bottom: 8px; }
.section-label-light { color: var(--ieee-blue-light); }
.section h2 { font-size: 2.25rem; font-weight: 800; color: var(--gray-900); margin-bottom: 48px; text-align: center; letter-spacing: -0.03em; }
.heading-light { color: var(--dark-heading) !important; }

/* === Features === */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 36px 28px; text-align: center; transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: var(--ieee-blue); }
.feature-icon { margin-bottom: 20px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; letter-spacing: -0.02em; }
.feature-standard { font-size: 0.75rem; font-weight: 600; color: var(--ieee-blue); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.feature-card p:last-child { color: var(--gray-500); font-size: 0.92rem; line-height: 1.65; }

/* === Standards === */
.standards-section { text-align: center; }
.standards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.standard-badge { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-sm); padding: 24px 16px; transition: border-color 0.2s; }
.standard-badge:hover { border-color: var(--ieee-blue); }
.standard-org { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ieee-blue-light); margin-bottom: 6px; }
.standard-name { font-size: 1rem; font-weight: 700; color: var(--dark-heading); margin-bottom: 4px; }
.standard-desc { font-size: 0.8rem; color: var(--dark-text); line-height: 1.5; }
.units-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.unit-tag { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; background: rgba(0,109,182,0.08); border: 1px solid rgba(0,109,182,0.15); border-radius: 8px; font-size: 0.95rem; font-weight: 700; color: var(--ieee-blue-light); }
.unit-tag small { font-size: 0.72rem; font-weight: 500; color: var(--dark-text); }

/* === Content Sections === */
.content-section { max-width: 720px; margin: 0 auto; }
.content-section h2 { text-align: left; }
.content-section h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin: 28px 0 8px; }
.content-section p { margin-bottom: 12px; color: var(--gray-600); font-size: 0.94rem; }
.content-section ul { margin: 0 0 16px 20px; color: var(--gray-600); font-size: 0.94rem; }
.content-section li { margin-bottom: 5px; }
.last-updated { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 24px !important; }

/* === Support === */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.support-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 32px; }
.support-icon { margin-bottom: 16px; }
.support-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin: 0 0 12px; }
.faq-item { margin-bottom: 18px; }
.faq-item h4 { color: var(--gray-800); font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.faq-item p { font-size: 0.9rem; color: var(--gray-500); }

/* === Footer === */
.footer { border-top: 1px solid var(--gray-200); padding: 32px 0 28px; background: var(--gray-50); }
.footer-content { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--gray-800); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--gray-500); font-size: 0.85rem; font-weight: 500; }
.footer-links a:hover { color: var(--gray-800); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--gray-200); }
.footer-bottom p { color: var(--gray-500); font-size: 0.8rem; }
.footer-note { font-style: italic; }

/* === Mobile === */
@media (max-width: 900px) {
  .hero-container { flex-direction: column; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .phone-showcase { width: 340px; height: 460px; margin: 0 auto; }
  .phone-frame { width: 220px; height: 440px; border-radius: 30px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 56px; left: 0; right: 0; background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); flex-direction: column; padding: 20px 24px; gap: 14px; border-bottom: 1px solid var(--gray-200); }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--gray-700) !important; }
  .hero { padding: 120px 0 40px; min-height: auto; }
  .hero h1 { font-size: 2.2rem; }
  .phone-showcase { width: 300px; height: 420px; }
  .phone-frame { width: 200px; height: 400px; border-radius: 28px; }
  .phone-notch { width: 90px; height: 22px; }
  .section { padding: 64px 0; }
  .section h2 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 14px; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .phone-showcase { width: 260px; height: 380px; }
  .phone-frame { width: 180px; height: 360px; border-radius: 24px; }
  .standards-grid { grid-template-columns: 1fr; }
}
