:root {
  --bg: #f7f1e8;
  --bg-2: #ffe3a3;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #202124;
  --muted: #62666d;
  --border: rgba(32, 33, 36, 0.12);
  --accent: #d96d1f;
  --accent-strong: #b85012;
  --shadow: 0 24px 70px rgba(46, 32, 16, 0.16);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 10%, var(--bg-2), transparent 34rem),
    linear-gradient(135deg, var(--bg), #f6f8f5 55%, var(--bg-2));
  transition: background 500ms ease, color 500ms ease;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar,
.dashboard-grid,
.hero-panel,
.card {
  animation: rise-in 520ms ease both;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.topbar-actions,
.search-row,
.task-form,
.card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0 13px;
  font-weight: 800;
  text-decoration: none;
}

.ghost-button,
.lang-toggle,
.search-row button,
.task-form button {
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
  padding: 11px 15px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease, background 180ms ease;
}

.ghost-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.lang-toggle {
  min-width: 48px;
  background: var(--text);
}

button:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), white 30%);
  outline-offset: 3px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

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

.hero-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 26px;
  min-height: 320px;
  padding: clamp(24px, 5vw, 54px);
  overflow: hidden;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.08;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.search-card {
  align-self: end;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.search-card label {
  display: block;
  margin-bottom: 9px;
  font-weight: 800;
}

.search-row {
  align-items: stretch;
}

input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  padding: 12px 13px;
}

.text-button {
  display: inline-flex;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  font-weight: 800;
}

.status-line {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card {
  padding: 22px;
}

.card-heading {
  justify-content: space-between;
  margin-bottom: 26px;
}

.card-heading.compact {
  margin-bottom: 16px;
}

.weather-icon {
  position: relative;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
}

.sun-core,
.cloud-puff,
.rain-lines,
.snow-flakes {
  position: absolute;
  display: block;
  transition: opacity 250ms ease, transform 250ms ease;
}

.sun-core {
  inset: 14px;
  border-radius: 50%;
  background: #f9b233;
  box-shadow: 0 0 0 12px rgba(249, 178, 51, 0.2);
}

.cloud-puff {
  left: 13px;
  right: 8px;
  bottom: 20px;
  height: 28px;
  border-radius: 999px;
  background: #dfe4ea;
}

.cloud-puff::before,
.cloud-puff::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  background: inherit;
}

.cloud-puff::before {
  width: 34px;
  height: 34px;
  left: 9px;
  bottom: 12px;
}

.cloud-puff::after {
  width: 42px;
  height: 42px;
  right: 9px;
  bottom: 8px;
}

.rain-lines {
  left: 22px;
  bottom: 4px;
  width: 38px;
  height: 28px;
  background: repeating-linear-gradient(
    100deg,
    transparent 0 8px,
    #4f8cc9 8px 11px,
    transparent 11px 18px
  );
}

.snow-flakes {
  left: 20px;
  bottom: 4px;
  width: 44px;
  height: 28px;
  background:
    radial-gradient(circle at 8px 9px, #7dbbe6 0 3px, transparent 4px),
    radial-gradient(circle at 25px 20px, #7dbbe6 0 3px, transparent 4px),
    radial-gradient(circle at 39px 8px, #7dbbe6 0 3px, transparent 4px);
}

.weather-icon[data-kind="clear"] .cloud-puff,
.weather-icon[data-kind="clear"] .rain-lines,
.weather-icon[data-kind="clear"] .snow-flakes,
.weather-icon[data-kind="cloudy"] .rain-lines,
.weather-icon[data-kind="cloudy"] .snow-flakes,
.weather-icon[data-kind="rainy"] .sun-core,
.weather-icon[data-kind="rainy"] .snow-flakes,
.weather-icon[data-kind="snowy"] .sun-core,
.weather-icon[data-kind="snowy"] .rain-lines {
  opacity: 0;
  transform: translateY(8px);
}

.weather-icon[data-kind="cloudy"] .sun-core {
  transform: translate(-16px, -8px) scale(0.78);
  opacity: 0.65;
}

.temperature-row {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.temperature-row strong {
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.85;
}

.temperature-row span:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 750;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.weather-details div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 800;
}

.suggestion-card {
  display: grid;
  align-content: center;
  min-height: 250px;
}

.suggestion-card p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.35;
}

.task-card {
  grid-column: 1 / -1;
}

.task-count {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 900;
}

.task-form {
  align-items: stretch;
}

.task-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.task-check {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent-strong);
  padding: 0;
}

.task-item.completed span {
  color: var(--muted);
  text-decoration: line-through;
}

.delete-task {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 900;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-clear {
  --bg: #fff4d8;
  --bg-2: #ffd079;
  --accent: #d96d1f;
  --accent-strong: #a5440d;
  --shadow: 0 24px 70px rgba(90, 51, 12, 0.15);
}

.theme-cloudy {
  --bg: #e9e6dd;
  --bg-2: #cfd6d3;
  --accent: #68776f;
  --accent-strong: #3f4f49;
  --shadow: 0 24px 70px rgba(55, 62, 58, 0.16);
}

.theme-rainy {
  --bg: #dce8ef;
  --bg-2: #9eb7ca;
  --accent: #356b9a;
  --accent-strong: #1f4e73;
  --shadow: 0 24px 70px rgba(25, 64, 94, 0.18);
}

.theme-snowy {
  --bg: #eef8fb;
  --bg-2: #cdeefa;
  --accent: #4a91b8;
  --accent-strong: #276b8e;
  --shadow: 0 24px 70px rgba(39, 107, 142, 0.14);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .weather-shell {
    width: min(100% - 22px, 680px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dashboard-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
    padding: 24px;
  }

  .search-row,
  .task-form {
    flex-direction: column;
  }

  .search-row button,
  .task-form button {
    width: 100%;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
