/* ==========================================================================
   winecountryweather.com — one stylesheet for the whole site.

   EDIT HERE FIRST. Everything below uses these values, so changing a colour
   or a font in this block changes it everywhere on every page.
   ========================================================================== */

:root {
  /* Colours — light mode */
  --ink:        #1d2b2c;   /* body text */
  --ink-soft:   #5a6b6a;   /* captions, dates, secondary text */
  --paper:      #f8f9f8;   /* page background */
  --card:       #ffffff;   /* panel background */
  --rule:       #dde2df;   /* hairlines and borders */
  --vine:       #2f5d50;   /* links and accents — deep vineyard green */
  --vine-soft:  #e8f0ec;   /* accent background wash */
  --gold:       #8a6a2a;   /* used sparingly, for emphasis */

  /* Type */
  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --gutter:  20px;          /* side margin on small screens */
  --column:  44rem;         /* max width of the reading column */
}

/* Colours — dark mode. Same names, different values. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e2e8e5;
    --ink-soft:  #93a3a0;
    --paper:     #14191a;
    --card:      #1d2425;
    --rule:      #2d3738;
    --vine:      #74b39f;
    --vine-soft: #182925;
    --gold:      #c2a159;
    color-scheme: dark;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 var(--gutter);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

.wrap { max-width: var(--column); margin: 0 auto; }

a { color: var(--vine); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

/* ==========================================================================
   Header and navigation
   ========================================================================== */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}

.wordmark {
  font-family: var(--display);
  font-size: 21px;
  font-weight: normal;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--vine); }

.masthead nav { display: flex; gap: 18px; font-size: 15px; }

/* ==========================================================================
   Headings and text
   ========================================================================== */

h1 {
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.15;
  font-weight: normal;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: normal;
  margin: 48px 0 12px;
}

.lede { font-size: 19px; color: var(--ink-soft); margin: 0 0 36px; }

.caption {
  font-size: 14px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   Panel — a bordered box. Used for the station link; reuse anywhere.
   ========================================================================== */

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px;
  margin: 32px 0;
}

.panel h2 { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.panel-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: 64px;
  padding: 24px 0 48px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}

footer a { color: var(--ink-soft); }

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible { outline: 2px solid var(--vine); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
