:root {
  --bg: #07111f;
  --bg-alt: #0c1728;
  --surface: rgba(10, 19, 34, 0.76);
  --surface-strong: rgba(12, 22, 40, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --text: #f3f7ff;
  --muted: #9fb0cb;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #7cf0cf;
  --accent-strong: #32d7be;
  --accent-warm: #ffd279;
  --accent-cool: #81a8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: min(1180px, calc(100vw - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(50, 215, 190, 0.18), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 210, 121, 0.14), transparent 24%),
    linear-gradient(180deg, #07111f 0%, #091425 45%, #050b15 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: 7rem;
  right: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 240, 207, 0.18), transparent 65%);
  filter: blur(10px);
}

body::after {
  left: -6rem;
  bottom: 10rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 143, 255, 0.12), transparent 66%);
  filter: blur(8px);
}

body.is-loading {
  overflow: hidden;
}

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

p,
li {
  color: var(--muted);
  line-height: 1.7;
}

h1,
h2,
h3,
.brand strong,
.button,
.eyebrow,
.metric-value,
.result-value,
.site-tag,
.result-label {
  font-family: "Space Grotesk", sans-serif;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--content-width);
  margin: 0 auto;
  padding: 1.1rem 0;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.88), rgba(7, 17, 31, 0.55));
  border-bottom: 1px solid transparent;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  transition:
    padding 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0.25rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(124, 240, 207, 0.4);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(124, 240, 207, 0.18), rgba(255, 210, 121, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 0.98rem;
  letter-spacing: 0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0.25rem;
}

.nav-link,
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #eff5ff;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.home-btn:hover,
.home-btn:focus-visible,
.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.nav-link:hover,
.nav-link:focus-visible,
.home-btn:hover,
.home-btn:focus-visible {
  border-color: rgba(124, 240, 207, 0.32);
  color: #fff;
}

.home-btn {
  width: 2.85rem;
  padding: 0;
}

.home-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.page-shell {
  width: var(--content-width);
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
}

.page-shell > section,
.page-shell > footer {
  width: 100%;
}

.page-shell > section + section {
  margin-top: 1.6rem;
}

.hero-copy,
.feature-card,
.converter-card,
.project,
.site-footer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.92), rgba(9, 16, 30, 0.8));
  box-shadow: var(--shadow);
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.hero-copy::before,
.feature-card::before,
.converter-card::before,
.project::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    transparent 35%,
    transparent 70%,
    rgba(124, 240, 207, 0.07)
  );
  pointer-events: none;
}

.hero-copy:hover,
.feature-card:hover,
.converter-card:hover,
.project:hover,
.site-footer:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 240, 207, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.hero {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  width: 100%;
}

.hero-copy {
  padding: 2rem;
  background:
    radial-gradient(circle at top, rgba(124, 240, 207, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(14, 24, 42, 0.94), rgba(9, 16, 30, 0.84));
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.hero h1 {
  max-width: 12ch;
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero h2,
.project h2,
.feature-card h3,
.converter-card h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 42rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.hero-actions,
.hero-metrics,
.converter-grid,
.site-footer-meta,
.button-row {
  display: grid;
  gap: 1rem;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  align-items: center;
  margin-bottom: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041117;
  box-shadow: 0 16px 36px rgba(50, 215, 190, 0.22);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.hero-metrics li {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.metric-value {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 1.6rem;
}

.converter-section {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin-top: 1.6rem;
}

.converter-grid {
  width: 100%;
}

.converter-intro {
  padding: 1.65rem 1.8rem;
}

.hero-copy-secondary .hero-text {
  max-width: 48rem;
  margin-bottom: 0;
}

.converter-card,
.feature-card,
.project {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
}

.converter-card {
  background:
    radial-gradient(circle at top right, rgba(129, 168, 255, 0.16), transparent 34%),
    radial-gradient(circle at top left, rgba(124, 240, 207, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(20, 33, 58, 0.96), rgba(10, 18, 33, 0.92));
  border-color: rgba(124, 240, 207, 0.18);
}

.site-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-warm);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.site-footer .site-tag {
  justify-self: start;
  min-height: 1.8rem;
  padding: 0.28rem 0.58rem;
  margin-bottom: 0.35rem;
}

.feature-list {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.feature-list li + li {
  margin-top: 0.5rem;
}

.controls,
.display {
  display: grid;
  gap: 0.7rem;
}

.controls label {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}

.field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
}

.converter-input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(124, 240, 207, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.92), rgba(11, 20, 35, 0.95));
  color: var(--text);
  font: inherit;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.converter-input::placeholder {
  color: #7f92b1;
}

.converter-input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(124, 240, 207, 0.42);
  box-shadow:
    0 0 0 4px rgba(124, 240, 207, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

.button-row {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 0.8rem;
}

.display {
  align-items: center;
  text-align: center;
}

.result-block {
  margin-top: 1.5rem;
}

.result-label {
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.result-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(124, 240, 207, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #f8fbff;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

canvas {
  width: 100%;
  max-width: 100%;
  min-height: 320px;
  padding: 0.8rem;
  border: 1px solid rgba(124, 240, 207, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.88), rgba(9, 17, 31, 0.96));
  box-sizing: border-box;
}

#solarChart {
  display: block;
  margin: 0 auto;
}

#solarChart.is-hidden {
  display: none;
}

.site-footer {
  margin-top: 1.7rem;
  margin-bottom: 1.7rem;
  padding: 1.2rem 1.45rem;
  width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.site-footer-meta {
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.site-footer-meta > div {
  display: grid;
  gap: 0.35rem;
}

.site-footer-meta > div:last-child {
  align-self: center;
  text-align: left;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  gap: 1rem;
  background:
    radial-gradient(circle at top, rgba(124, 240, 207, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(4, 10, 19, 0.98));
  transition:
    opacity 500ms ease,
    visibility 500ms ease;
}

#loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-shell {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.spinner {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(124, 240, 207, 0.35);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(124, 240, 207, 0.18), rgba(129, 168, 255, 0.12));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  animation: loaderPulse 1.6s ease-in-out infinite;
}

.spinner::before {
  content: "ST";
}

.loader-line {
  width: min(18rem, 55vw);
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-line::after {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  animation: loaderSweep 1.35s ease-in-out infinite;
}

.loader-copy {
  margin: 0;
  color: #d7e4fb;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes loaderPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@keyframes loaderSweep {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(310%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 767px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(100vw - 1.2rem, 100%);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 0;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .hero-copy,
  .site-footer {
    padding: 1.4rem;
    border-radius: 26px;
  }

  .converter-card,
  .feature-card,
  .project {
    border-radius: 24px;
  }

  .hero h1,
  .hero h2 {
    max-width: none;
  }
}
