:root {
  --ink: #10263a;
  --ink-soft: #4a6073;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.91);
  --line: rgba(16, 38, 58, 0.12);
  --gold: #c98b0a;
  --gold-bright: #ffd968;
  --gold-dark: #8c5800;
  --shadow: 0 26px 80px rgba(24, 58, 84, 0.2);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #88c8f5 url("assets/bright-horizon.png") center center / cover fixed no-repeat;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(247, 252, 255, 0.22), rgba(247, 252, 255, 0.1) 54%, rgba(247, 252, 255, 0.26)),
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.48), transparent 40%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100vh;
  padding: 20px clamp(20px, 4vw, 64px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-dark);
  font-weight: 800;
  letter-spacing: 0.17em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.header-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(122, 73, 0, 0.24));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 32px rgba(17, 59, 86, 0.12);
  backdrop-filter: blur(16px);
}

.nav-link {
  padding: 9px 16px;
  border-radius: 999px;
  color: #29475d;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff;
  background: #163d59;
}

.home-main {
  display: grid;
  place-items: center;
}

.search-hero {
  width: min(760px, 100%);
  margin: 4vh auto 0;
  text-align: center;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-mark {
  width: clamp(100px, 12vw, 144px);
  height: clamp(100px, 12vw, 144px);
  object-fit: contain;
  margin-bottom: -6px;
  filter: drop-shadow(0 12px 24px rgba(111, 65, 0, 0.25));
}

.brand-lockup h1 {
  margin: 0;
  background: linear-gradient(180deg, #fff0a6 0%, var(--gold-bright) 25%, #d69817 65%, #8d5700 100%);
  background-clip: text;
  color: transparent;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 8vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.6)) drop-shadow(0 8px 14px rgba(80, 57, 0, 0.23));
}

.hero-kicker {
  margin: 18px 0 28px;
  color: #24475f;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

.search-form {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 8px 9px 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.2);
}

.search-icon {
  width: 25px;
  fill: none;
  stroke: #637889;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 14px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.05rem;
}

.search-form input::placeholder {
  color: #708391;
}

.search-form button,
.location-search button:not(.location-button) {
  min-height: 54px;
  padding: 0 25px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: #163d59;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.search-form button:hover,
.location-search button:not(.location-button):hover {
  background: #0d304a;
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.weather-shortcut {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  width: min(390px, 100%);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 40px rgba(28, 72, 101, 0.14);
  text-align: left;
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: transform 160ms ease, background 160ms ease;
}

.weather-shortcut:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-2px);
}

.weather-shortcut strong,
.weather-shortcut small {
  display: block;
}

.weather-shortcut strong {
  font-size: 0.93rem;
}

.weather-shortcut small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.weather-sun {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #8d5d00;
  background: #ffe599;
  font-size: 1.25rem;
}

.arrow {
  color: #29475d;
  font-size: 1.2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1280px, 100%);
  margin: 0 auto;
  color: rgba(16, 38, 58, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.weather-shell {
  grid-template-rows: auto 1fr;
}

.weather-main {
  display: grid;
  place-items: center;
  padding: clamp(34px, 6vh, 72px) 0 28px;
}

.weather-panel {
  width: min(1120px, 100%);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background: rgba(250, 253, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.15);
}

.weather-heading {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.weather-heading h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1;
}

.weather-location {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.location-search {
  display: grid;
  grid-template-columns: minmax(150px, 240px) auto auto;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 62, 90, 0.08);
}

.location-search input {
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.location-search button:not(.location-button) {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
}

.location-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #234b65;
  background: #eff7fb;
  cursor: pointer;
}

.location-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.weather-status {
  padding: 56px 0;
  color: var(--ink-soft);
  text-align: center;
}

.weather-status:empty {
  display: none;
}

.current-weather {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(340px, 1.4fr);
  gap: 26px;
  align-items: center;
  padding: clamp(34px, 5vw, 54px) 0;
}

.condition-symbol {
  display: grid;
  place-items: center;
  width: clamp(96px, 12vw, 138px);
  height: clamp(96px, 12vw, 138px);
  border-radius: 36px;
  background: linear-gradient(145deg, #fff3af, #ffc65a);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), 0 18px 40px rgba(189, 129, 10, 0.18);
  font-size: clamp(3.4rem, 7vw, 5.2rem);
}

.temperature {
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.temperature sup {
  margin-left: 2px;
  font-size: 0.42em;
  vertical-align: top;
}

.condition {
  margin: 14px 0 2px;
  font-size: 1.08rem;
  font-weight: 800;
}

.feels-like {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
}

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

.weather-details div {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.weather-details dt {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.weather-details dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.forecast-section {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.forecast-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.forecast-title-row h2 {
  margin: 0;
  font-size: 1.04rem;
}

.forecast-title-row span {
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.forecast-day {
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.forecast-day.today {
  border-color: rgba(201, 139, 10, 0.34);
  background: linear-gradient(180deg, rgba(255, 239, 174, 0.78), rgba(255, 255, 255, 0.7));
}

.forecast-day h3 {
  margin: 0;
  font-size: 0.78rem;
}

.forecast-icon {
  display: block;
  margin: 12px 0;
  font-size: 1.8rem;
}

.forecast-temps {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
}

.forecast-low {
  color: var(--ink-soft);
}

.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;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 202, 54, 0.88);
  outline-offset: 3px;
}

@media (max-width: 840px) {
  body {
    background-attachment: scroll;
  }

  .weather-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .location-search {
    grid-template-columns: 1fr auto auto;
  }

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

  .weather-details {
    grid-column: 1 / -1;
  }

  .forecast-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 16px;
  }

  .header-brand {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }

  .header-brand img {
    width: 36px;
    height: 36px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .search-hero {
    margin-top: 0;
  }

  .brand-mark {
    width: 96px;
    height: 96px;
  }

  .search-form {
    grid-template-columns: 24px 1fr;
    padding: 8px 14px 8px 18px;
    border-radius: 22px;
  }

  .search-form button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-footer {
    margin-top: 24px;
  }

  .weather-main {
    padding-top: 28px;
  }

  .weather-panel {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .location-search {
    grid-template-columns: 1fr auto;
  }

  .location-search input {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .current-weather {
    gap: 18px;
  }

  .condition-symbol {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    font-size: 3.1rem;
  }

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

  .weather-details div {
    padding: 15px;
  }

  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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