:root {
  --bg: #f3e7cf;
  --bg2: #d7e2dd;
  --text: #112021;
  --muted: #4a5f61;
  --card: rgba(255, 255, 255, 0.84);
  --line: rgba(17, 32, 33, 0.12);
  --brand: #0f5a5f;
  --accent: #d2612b;
  --danger: #992121;
  --shadow: 0 15px 40px rgba(17, 32, 33, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(210, 97, 43, 0.22), transparent 40%),
    radial-gradient(circle at 85% 5%, rgba(15, 90, 95, 0.2), transparent 35%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  overflow-x: hidden;
}

.shape {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border: 2px dashed rgba(15, 90, 95, 0.23);
}

.shape-a {
  top: -8rem;
  right: -7rem;
  width: 24rem;
  height: 24rem;
  border-radius: 42% 58% 60% 40%;
  animation: drift 18s ease-in-out infinite;
}

.shape-b {
  bottom: -8rem;
  left: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 65% 35% 45% 55%;
  border-color: rgba(210, 97, 43, 0.38);
  animation: drift 20s ease-in-out infinite reverse;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.hero h1 {
  margin: 0.35rem 0 0.7rem;
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--brand);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel {
  margin-top: 1.3rem;
  padding: 1rem;
}

.search-form label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
}

input,
button {
  font: inherit;
  border-radius: 12px;
}

input {
  border: 1px solid rgba(17, 32, 33, 0.18);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.7);
}

button {
  border: none;
  color: #fff;
  background: linear-gradient(140deg, var(--brand), #0b4a4e);
  font-weight: 700;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.hint,
.small-note {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.small-note {
  font-size: 0.82rem;
}

.status {
  margin: 0.8rem 0 0;
  min-height: 1.2rem;
  color: var(--brand);
  font-weight: 600;
}

.status.error {
  color: var(--danger);
}

.cards {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  padding: 0.95rem;
  animation: reveal 0.45s ease both;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.top p {
  margin: 0;
}

.day {
  font-weight: 700;
}

.period {
  color: var(--muted);
}

.temp-range {
  margin-top: 0.5rem;
  font-family: "Archivo", sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}

.weather {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.weather img {
  width: 28px;
  height: 28px;
}

.metrics {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.metrics li {
  border: 1px solid rgba(17, 32, 33, 0.12);
  border-radius: 10px;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.6);
}

.metrics span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.metrics strong {
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(10px, 14px) rotate(6deg);
  }
}

@media (max-width: 740px) {
  .app {
    padding-top: 1.2rem;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}
