:root {
  --bg: #0b0d10;
  --bg-elevated: #12161b;
  --surface: rgba(18, 22, 27, 0.82);
  --surface-strong: #171c22;
  --text: #f5f7fa;
  --muted: #8e99a8;
  --border: rgba(255,255,255,.10);
  --accent: #d7dde6;
  --accent-soft: rgba(215,221,230,.10);
  --shadow: 0 22px 70px rgba(0,0,0,.32);
  --radius: 20px;
}

html[data-theme="blue"] {
  --bg: #06111d;
  --bg-elevated: #0a1a2a;
  --surface: rgba(10, 26, 42, 0.86);
  --surface-strong: #0d2237;
  --text: #f1f8ff;
  --muted: #8fa8c0;
  --border: rgba(91, 169, 255, .18);
  --accent: #57a9ff;
  --accent-soft: rgba(87,169,255,.12);
}

html[data-theme="red"] {
  --bg: #16090c;
  --bg-elevated: #211015;
  --surface: rgba(33, 16, 21, .86);
  --surface-strong: #2a1319;
  --text: #fff5f6;
  --muted: #c1969e;
  --border: rgba(255, 92, 113, .18);
  --accent: #ff5c71;
  --accent-soft: rgba(255,92,113,.11);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, var(--accent-soft), transparent 28%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 38px 38px, 38px 38px, auto;
  color: var(--text);
}

button, select, a { font: inherit; }
a { color: inherit; }

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

.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: inset 0 0 24px var(--accent-soft);
  border-radius: 12px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .08em;
}

.brand__text { display: grid; gap: 2px; }
.brand__text strong { font-size: 1rem; letter-spacing: .02em; }
.brand__text small { color: var(--muted); }

.preferences {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

select {
  min-width: 122px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 34px 9px 11px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

select:focus { border-color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 46px;
  align-items: end;
  padding: 84px 0 62px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 800;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.hero__lead {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.weather-card,
.service-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.weather-card {
  border-radius: var(--radius);
  padding: 20px;
}

.weather-card__head,
.service-card__topline,
.footer,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.weather-card__head {
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.weather-card__status {
  color: var(--accent);
  font-weight: 700;
}

.weather-card__body {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 0 18px;
}

.weather-card__icon {
  width: 68px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 2rem;
}

.weather-card__temp {
  margin: 3px 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.weather-card small { color: var(--muted); }

.text-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
}

.services { padding: 18px 0 72px; }
.section-heading { margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: .18;
  pointer-events: none;
}

.service-card--system::before { background: #49a3ff; }
.service-card--center::before { background: #a56cff; }

.service-card__badge {
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .14em;
}

.status-dot {
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #52d273;
  box-shadow: 0 0 16px rgba(82,210,115,.65);
}

.service-card h3 {
  margin: 56px 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.05em;
}

.service-card p {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.65;
}

.service-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 750;
}

.service-card__link:hover { opacity: .78; }

.footer {
  min-height: 82px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 820px) {
  .topbar { align-items: flex-start; padding: 20px 0; }
  .hero { grid-template-columns: 1fr; padding-top: 58px; }
  .weather-card { max-width: 460px; }
  .service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 22px, 1180px); }
  .topbar { flex-direction: column; }
  .preferences { width: 100%; justify-content: stretch; }
  .control { flex: 1; }
  select { width: 100%; }
  .hero { padding: 46px 0 40px; }
  .service-card { min-height: 260px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

/* V2 themes */
html[data-theme="green"] {
  --bg: #07150e;
  --bg-elevated: #0c2015;
  --surface: rgba(12, 32, 21, .86);
  --surface-strong: #10291b;
  --text: #f1fff7;
  --muted: #91b9a2;
  --border: rgba(77, 218, 137, .18);
  --accent: #4dda89;
  --accent-soft: rgba(77, 218, 137, .11);
}

html[data-theme="pink"] {
  --bg: #180b14;
  --bg-elevated: #24101f;
  --surface: rgba(36, 16, 31, .86);
  --surface-strong: #2d1527;
  --text: #fff5fc;
  --muted: #c59ab8;
  --border: rgba(255, 105, 190, .18);
  --accent: #ff69be;
  --accent-soft: rgba(255, 105, 190, .11);
}

html[data-theme="purple"] {
  --bg: #100a1b;
  --bg-elevated: #181027;
  --surface: rgba(24, 16, 39, .86);
  --surface-strong: #201532;
  --text: #faf5ff;
  --muted: #aa99c4;
  --border: rgba(170, 111, 255, .20);
  --accent: #aa6fff;
  --accent-soft: rgba(170, 111, 255, .12);
}

html[data-theme="white"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, .88);
  --surface-strong: #ffffff;
  --text: #15191f;
  --muted: #66717f;
  --border: rgba(17, 25, 39, .12);
  --accent: #2a5f9e;
  --accent-soft: rgba(42, 95, 158, .10);
  --shadow: 0 22px 70px rgba(36, 47, 62, .12);
}

html[data-theme="white"] body {
  background:
    radial-gradient(circle at 12% 8%, var(--accent-soft), transparent 28%),
    linear-gradient(rgba(17,25,39,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,25,39,.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 38px 38px, 38px 38px, auto;
}

/* V2 service grid and per-service identities */
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.service-card { --card-accent: var(--accent); }
.service-card::before { background: var(--card-accent); }
.service-card--system { --card-accent: #49a3ff; }
.service-card--center { --card-accent: #a56cff; }
.service-card--agro { --card-accent: #64c66e; }
.service-card--3d { --card-accent: #42d5d2; }
.service-card--game { --card-accent: #f05fd4; }
.service-card--power { --card-accent: #f4c84b; }
.service-card--art { --card-accent: #ff7e72; }
.service-card--tech { --card-accent: #5dc8ff; }
.service-card--racing { --card-accent: #ff5252; }

.service-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 42%, var(--border));
  transform: translateY(-2px);
  transition: transform .18s ease, border-color .18s ease;
}
