@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@300;400;500;600&display=swap");

:root {
  --ink: #1d1a17;
  --muted: #4c4a47;
  --accent: #e4743b;
  --accent-2: #2f7c89;
  --accent-3: #f2c263;
  --card: #fff8f1;
  --card-strong: #fff1e4;
  --border: rgba(29, 26, 23, 0.12);
  --shadow: 0 18px 40px rgba(35, 27, 20, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, #f5eee2 0%, #e9f0f3 52%, #f6e6d6 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.35;
  pointer-events: none;
}

body::before {
  background: radial-gradient(circle at 30% 30%, #f2c263 0%, rgba(242, 194, 99, 0) 70%);
  top: -200px;
  left: -160px;
}

body::after {
  background: radial-gradient(circle at 70% 70%, #7cc9c5 0%, rgba(124, 201, 197, 0) 70%);
  bottom: -220px;
  right: -180px;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 72px;
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--ink);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  opacity: 0.6;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-text {
  display: grid;
  gap: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0;
}

h1,
h2 {
  font-family: "Fraunces", "Georgia", serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  line-height: 1.1;
}

h2 {
  font-size: 1.6rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34ch;
}

.time-block {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card-strong);
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  width: fit-content;
}

.time {
  font-size: 2.2rem;
  font-weight: 600;
}

.date {
  font-size: 1rem;
  color: var(--muted);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.location-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
}

.location-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-2);
}

.location {
  font-weight: 600;
  font-size: 1.1rem;
}

.location-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.search {
  display: grid;
  gap: 12px;
}

.search-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.search-row {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  font-family: inherit;
}

button {
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #1d140e;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 18px rgba(228, 116, 59, 0.28);
  font-family: inherit;
}

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

button:active {
  transform: translateY(0);
}

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

.search-actions {
  display: flex;
  justify-content: flex-start;
}

.results {
  display: grid;
  gap: 10px;
}

.result-btn {
  background: #fff;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  font-size: 0.95rem;
  box-shadow: none;
  color: var(--ink);
}

.grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.weather-card {
  grid-column: span 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.badge {
  background: #1d140e;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.weather-main {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 24px;
}

.weather-visual {
  display: grid;
  gap: 8px;
}

.weather-svg {
  width: 68px;
  height: 68px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  color: var(--accent-2);
}

.weather-temp {
  font-size: 2.4rem;
  font-weight: 600;
}

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

.weather-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.weather-summary {
  margin: 10px 0 14px;
  color: var(--muted);
  max-width: 40ch;
}

.weather-stats {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.outfit-card {
  display: grid;
  gap: 16px;
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.outfit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.outfit-item svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  color: var(--accent-2);
}

.outfit-item span {
  font-weight: 500;
}

.outfit-notes {
  background: var(--card-strong);
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--muted);
}

.details-card {
  display: grid;
  gap: 12px;
}

.details-grid {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.source {
  font-size: 0.85rem;
  color: var(--muted);
}

.status {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--muted);
  min-height: 1.5em;
}

.symbol-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.noscript {
  margin-top: 24px;
  padding: 14px 16px;
  background: #fff1e4;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: rise 0.7s ease forwards;
  animation-delay: calc(var(--delay) * 120ms);
}

[data-reveal="1"] {
  --delay: 1;
}

[data-reveal="2"] {
  --delay: 2;
}

[data-reveal="3"] {
  --delay: 3;
}

[data-reveal="4"] {
  --delay: 4;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

  .weather-card {
    grid-column: span 1;
  }

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

@media (max-width: 640px) {
  .page {
    padding: 28px 18px 60px;
  }

  .search-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .time {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
