:root {
  --bg: #edf4f0;
  --bg-deep: #d8e7df;
  --panel: rgba(250, 253, 251, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #0c1f1e;
  --muted: #4d6562;
  --line: rgba(12, 31, 30, 0.1);
  --sky: #7fd1df;
  --sun: #f8b95a;
  --leaf: #6ca985;
  --sea: #2f7392;
  --danger: #c45a3f;
  --shadow: 0 24px 80px rgba(22, 56, 55, 0.12);
  --radius: 28px;
}

* {
  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(248, 185, 90, 0.28), transparent 32%),
    radial-gradient(circle at top right, rgba(127, 209, 223, 0.35), transparent 30%),
    linear-gradient(180deg, #f7fbf8 0%, var(--bg) 56%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 330px);
  gap: 22px;
  padding: 28px 32px;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.hero-side__label,
.chart-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker,
.hero-side__label {
  color: var(--sea);
}

.hero h1 {
  margin: 12px 0 12px;
  max-width: 13ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  line-height: 0.9;
}

.hero-text {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.tag {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(12, 31, 30, 0.08);
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-scene {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 360px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 50px rgba(18, 34, 34, 0.18);
}

.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 22, 31, 0.12) 0%, rgba(9, 22, 31, 0.36) 55%, rgba(9, 22, 31, 0.72) 100%),
    linear-gradient(90deg, rgba(9, 22, 31, 0.12) 0%, transparent 45%);
}

.hero-scene__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(1.04) contrast(1.04);
}

.hero-scene__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #f8fbfd;
}

.hero-scene__eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 251, 253, 0.78);
}

.hero-scene__temp {
  margin: 10px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 4.4rem);
  line-height: 0.92;
}

.hero-scene__summary,
.hero-scene__time,
.section-note,
.muted,
.site-footer {
  color: var(--muted);
}

.hero-scene__summary {
  margin: 0;
  color: rgba(248, 251, 253, 0.96);
  font-size: 1rem;
  line-height: 1.5;
}

.hero-scene__time {
  margin: 18px 0 0;
  color: rgba(248, 251, 253, 0.82);
  font-size: 0.92rem;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.8;
}

.hero-orb--sun {
  top: -80px;
  right: 220px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(248, 185, 90, 0.8) 0%, rgba(248, 185, 90, 0.1) 70%, transparent 72%);
}

.hero-orb--wind {
  right: -60px;
  bottom: -80px;
  width: 340px;
  height: 340px;
  background:
    radial-gradient(circle at 35% 35%, rgba(127, 209, 223, 0.5), transparent 38%),
    radial-gradient(circle at 60% 60%, rgba(108, 169, 133, 0.3), transparent 48%);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.panel--weather,
.panel--power,
.panel--wide {
  padding: 28px;
}

.panel--weather {
  grid-column: span 7;
}

.panel--power {
  grid-column: span 5;
}

.panel--wide {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading--compact {
  margin: 32px 0 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.section-heading h3 {
  font-size: 1.15rem;
}

.section-note {
  margin: 0;
  max-width: 28ch;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.5;
}

.section-note--inline {
  margin-top: 18px;
  text-align: left;
}

.power-controls {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.toggle-group {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.toggle-button {
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.toggle-button.is-active {
  background: rgba(47, 115, 146, 0.12);
  color: var(--text);
}

.toggle-button:disabled,
.toggle-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.current-weather {
  display: grid;
  gap: 20px;
}

.current-weather__main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.weather-symbol {
  width: 92px;
  height: 92px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(248, 185, 90, 0.2), rgba(127, 209, 223, 0.2));
  font-size: 3rem;
}

.current-weather__temp,
.power-now__value {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.92;
}

.current-weather__temp {
  font-size: clamp(3rem, 7vw, 4.5rem);
}

.current-weather__summary,
.power-now__label,
.power-now__insight {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid--power {
  margin-top: 22px;
}

.metric-card {
  padding: 16px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.metric-card__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-card__value {
  margin: 10px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  line-height: 1.2;
}

.metric-card__detail {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hourly-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hour-card,
.day-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.hour-card__time,
.day-card__day {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hour-card__icon,
.day-card__icon {
  margin: 10px 0 8px;
  font-size: 1.8rem;
}

.hour-card__temp,
.day-card__temps {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.hour-card__meta,
.day-card__meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.power-now {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(140deg, rgba(248, 185, 90, 0.24), rgba(47, 115, 146, 0.14)),
    var(--panel-strong);
  border: 1px solid var(--line);
}

.power-now__eyebrow {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
}

.power-now__value {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.power-now__insight {
  max-width: 34ch;
  line-height: 1.5;
}

.power-chart-card {
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.chart-title {
  color: var(--text);
}

.chart-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.chart-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 8px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.legend-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sea);
}

.legend-pill--current::before {
  background: #245f8d;
}

.legend-pill--low::before {
  background: #3e9480;
}

.legend-pill--high::before {
  background: #d1734c;
}

.power-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 210px;
  min-width: 100%;
  padding-top: 20px;
}

.price-bar {
  position: relative;
  flex: 0 0 9px;
  min-width: 9px;
  border: 0;
  padding: 0;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, var(--sun), var(--sea));
  cursor: default;
}

.price-bar::before {
  content: attr(data-badge);
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(12, 31, 30, 0.08);
  color: var(--text);
  font-size: 0.68rem;
  white-space: nowrap;
  opacity: 0;
}

.price-bar::after {
  content: attr(data-time);
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.72rem;
  opacity: 0;
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.price-bar:hover::after,
.price-bar.is-active::after,
.price-bar:hover::before,
.price-bar.is-active::before {
  opacity: 1;
}

.price-bar.is-active {
  outline: 2px solid rgba(12, 31, 30, 0.5);
  outline-offset: 2px;
}

.price-bar--current {
  background: linear-gradient(180deg, #79b4df, #245f8d);
}

.price-bar--low {
  background: linear-gradient(180deg, #85d3c0, #3e9480);
}

.price-bar--high {
  background: linear-gradient(180deg, #f2b17d, #d1734c);
}

.chart-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.day-card__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 18px 6px 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .panel--weather,
  .panel--power {
    grid-column: 1 / -1;
  }

  .hourly-strip,
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(1180px, calc(100% - 20px));
    padding-top: 12px;
  }

  .hero,
  .panel--weather,
  .panel--power,
  .panel--wide {
    padding: 22px;
  }

  .section-heading,
  .chart-header {
    flex-direction: column;
  }

  .power-controls {
    justify-items: stretch;
  }

  .toggle-group {
    width: 100%;
  }

  .toggle-button {
    flex: 1 1 0;
  }

  .section-note,
  .chart-note {
    text-align: left;
  }

  .metric-grid,
  .hourly-strip,
  .daily-grid {
    grid-template-columns: 1fr;
  }

  .weather-symbol {
    width: 76px;
    height: 76px;
    border-radius: 24px;
  }

  .power-chart {
    min-width: 860px;
  }
}
