/* Whiskey River Ranch — milianranch.com
   Homestead signage, not a product landing page. */

:root {
  --soil: #16120e;
  --soil-2: #221b14;
  --bark: #3d2c20;
  --saddle: #6e4a2e;
  --whiskey: #c4a35a;
  --whiskey-dim: #8a6f3a;
  --cream: #f3ead8;
  --cream-dim: #d8ccb4;
  --moss: #243328;
  --pine: #1a261c;
  --leaf: #3f5a42;
  --sage: #8a9a7b;
  --sky-night-top: #12161c;
  --sky-dusk-top: #2a3544;
  --sky-dusk-mid: #6a5348;
  --sky-amber: #c48a4a;
  --sky-day-top: #5a7a8c;
  --sky-day-mid: #8ea3a0;
  --sky-day-low: #cbb892;
  --glass: rgba(18, 14, 10, 0.62);
  --glass-border: rgba(196, 163, 90, 0.28);
  --text: #f3ead8;
  --muted: #c4b8a0;
  --danger: #d4a07a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --font-body: "Libre Baskerville", Palatino, "Palatino Linotype", "Book Antiqua", serif;
  --font-ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --measure: 68rem;
  --pad: clamp(1.1rem, 3vw, 2.4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--soil);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  position: relative;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--whiskey);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover { color: var(--cream); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--whiskey);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--cream);
  color: var(--soil);
  padding: 0.5rem 0.85rem;
  z-index: 20;
  font-family: var(--font-ui);
}

.skip:focus { top: 0.75rem; }

/* ---------- atmosphere (CSS sky + SVG treeline) ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 78% 18%, rgba(196, 138, 74, 0.45), transparent 55%),
    linear-gradient(180deg,
      var(--sky-dusk-top) 0%,
      #3d3f48 22%,
      var(--sky-dusk-mid) 48%,
      var(--sky-amber) 72%,
      #8a5a32 86%,
      #2a2218 100%);
  transition: background 1.2s ease;
}

body.is-day .sky {
  background:
    radial-gradient(ellipse 55% 45% at 82% 12%, rgba(255, 236, 180, 0.7), transparent 50%),
    linear-gradient(180deg,
      var(--sky-day-top) 0%,
      var(--sky-day-mid) 38%,
      #b7c09a 62%,
      var(--sky-day-low) 78%,
      #6b5340 100%);
}

body.is-night .sky {
  background:
    radial-gradient(ellipse 40% 30% at 18% 12%, rgba(180, 200, 220, 0.12), transparent 50%),
    linear-gradient(180deg,
      var(--sky-night-top) 0%,
      #1a2230 40%,
      #2c2830 70%,
      #1c1814 100%);
}

.sun {
  position: absolute;
  width: 14rem;
  height: 14rem;
  right: 6%;
  top: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe7a8 0%, #e0a04a 42%, rgba(196, 138, 74, 0) 70%);
  opacity: 0.85;
  filter: blur(1px);
}

body.is-night .sun {
  width: 5.5rem;
  height: 5.5rem;
  right: 12%;
  top: 8%;
  background: radial-gradient(circle, #f0ead8 0%, #cfc6a8 40%, rgba(240, 234, 216, 0) 70%);
  opacity: 0.55;
  box-shadow: none;
}

.haze {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(22, 18, 14, 0.55) 70%, rgba(22, 18, 14, 0.88));
}

.stars {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #f3ead8 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 8%, #f3ead8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 48% 14%, #f3ead8 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 6%, #f3ead8 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 22%, #f3ead8 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 11%, #f3ead8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 35% 4%, #f3ead8 50%, transparent 51%);
  transition: opacity 0.8s ease;
}

body.is-night .stars { opacity: 0.55; }

.horizon {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  height: min(42vh, 28rem);
}

.horizon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.river {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7%;
  height: 3.2rem;
  background:
    radial-gradient(ellipse 70% 90% at 40% 50%, rgba(196, 163, 90, 0.18), transparent 70%);
  border-top: 1px solid rgba(196, 163, 90, 0.18);
  opacity: 0.7;
}

/* ---------- layout chrome ---------- */

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad) 0.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover { color: inherit; }

.seal {
  width: 3.1rem;
  height: 3.1rem;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-place {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 0.2rem 1.15rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav a {
  color: var(--cream-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--whiskey);
}

main {
  flex: 1;
  padding: 0 var(--pad) 3rem;
  width: min(100%, var(--measure));
  margin: 0 auto;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 1.4rem var(--pad) 1.8rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  border-top: 1px solid rgba(196, 163, 90, 0.18);
  background: linear-gradient(180deg, transparent, rgba(22, 18, 14, 0.55));
}

.credit { opacity: 0.85; }
.credit a { color: var(--sage); }

/* ---------- gate / homepage ---------- */

.gate {
  text-align: center;
  padding: clamp(1.2rem, 4.5vh, 3.2rem) 0 1.1rem;
}

.kicker {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--whiskey);
  margin: 0 0 0.85rem;
}

.gate h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.35rem, 7vw, 4.7rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: 0.01em;
}

.gate h1 em {
  font-style: italic;
  font-weight: 400;
  display: block;
  font-size: 0.72em;
  color: var(--cream-dim);
}

.rule {
  width: min(12rem, 40vw);
  height: 0;
  margin: 1.35rem auto 1.15rem;
  border: 0;
  border-top: 1px solid var(--whiskey-dim);
  position: relative;
}

.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--whiskey);
  transform: rotate(45deg);
  background: var(--soil);
}

.rule::before { left: -2px; }
.rule::after { right: -2px; }

.lede {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--cream-dim);
  font-size: 1.05rem;
}

.page-head {
  padding: 2.2rem 0 1.4rem;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 500;
  margin: 0 0 0.4rem;
  line-height: 1.05;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
}

/* ---------- weather dashboard (MagicMirror / property board) ---------- */

.board {
  margin: 1.2rem auto 0;
  max-width: 52rem;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: clamp(1.1rem, 3vw, 1.85rem);
}

.panel-sign {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--sage);
}

.now {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.4rem;
  align-items: center;
}

.temp {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(3.8rem, 12vw, 6.4rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.temp small {
  font-size: 0.38em;
  letter-spacing: 0;
  color: var(--cream-dim);
  vertical-align: super;
}

.now-meta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.conditions {
  margin: 0;
  color: var(--cream);
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--muted);
}

.facts li span {
  color: var(--cream-dim);
}

.icon-wrap {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--whiskey);
}

.now-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.now-meta .icon-wrap {
  width: 2.4rem;
  height: 2.4rem;
}

.icon-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.forecast {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 1.05rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(196, 163, 90, 0.2);
}

.day {
  text-align: center;
  font-family: var(--font-ui);
  padding: 0.45rem 0.2rem;
}

.day-name {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.35rem;
}

.day .icon-wrap {
  width: 2.1rem;
  height: 2.1rem;
  margin: 0 auto 0.3rem;
}

.hi-lo {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.hi-lo .lo {
  color: var(--muted);
  margin-left: 0.3rem;
}

.updated {
  margin: 1rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.status {
  font-family: var(--font-ui);
  color: var(--muted);
  min-height: 1.4em;
}

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

/* full forecast page */

.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.2rem 0 0.4rem;
}

.stat {
  border: 1px solid rgba(196, 163, 90, 0.18);
  padding: 0.75rem 0.85rem 0.7rem;
  background: rgba(0, 0, 0, 0.18);
}

.stat dt {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 0.25rem;
}

.stat dd {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

.hours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.2rem, 1fr);
  gap: 0.35rem;
  overflow-x: auto;
  margin-top: 0.6rem;
  padding-bottom: 0.35rem;
  scrollbar-color: var(--whiskey-dim) transparent;
}

.hour {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 0.45rem 0.15rem;
}

.hour time {
  display: block;
  color: var(--sage);
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.hour .icon-wrap {
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 auto 0.2rem;
}

.section-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--whiskey);
  margin: 1.6rem 0 0.5rem;
}

.more-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  padding: 0.45rem 0.9rem;
  color: var(--cream);
}

.more-link:hover {
  border-color: var(--whiskey);
  color: var(--whiskey);
}

/* about */

.prose {
  max-width: 38rem;
}

.prose p { color: var(--cream-dim); }

.quiet-note {
  font-size: 0.92rem;
  color: var(--muted);
  border-left: 2px solid var(--whiskey-dim);
  padding-left: 0.9rem;
  margin-top: 1.6rem;
}

/* loading pulse */

.panel.is-loading .temp,
.panel.is-loading .conditions,
.panel.is-loading .facts {
  opacity: 0.35;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

.panel.is-loading .status {
  animation: pulse 1.6s ease-in-out infinite;
}

/* ---------- mobile ---------- */

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

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

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

  .horizon { height: 28vh; }
}

@media (max-width: 420px) {
  .forecast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-name { font-size: 1.15rem; }
}

@media (min-width: 900px) {
  .forecast-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

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