/* =====================================================
   /assets/site.css  — shared styles
   Brand: forest green (#234F2E) + bronze gold (#8F6B28)
   Fonts: Ubuntu (headings), Figtree (body)
   NOTE: If you move Google Fonts into <head>, remove the @import.
===================================================== */

/* Fonts (safe to remove if you add <link> tags in HTML) */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&family=Figtree:wght@300;400;500;600;700&display=swap');

/* Tokens */
:root {
  --bg: #F9F9F7;
  --ink: #1C1B1A;
  --green: #234F2E;
  --gold: #C6A453;        /* large accents / borders */
  --gold-strong: #8F6B28; /* accessible bronze for small text */
  --muted: #5E5E5E;
  --maxw: 1000px;
  --radius: 16px;
  --nav-h: 64px;          /* sticky nav height */
}

/* Base */
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }

/* Typography */
h1, h2, h3, h4, h5, h6, nav, .button {
  font-family: 'Ubuntu', system-ui, -apple-system, Segoe UI, Roboto, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--green);
}
a { color: var(--green); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Skip link (a11y) */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: #000; padding: .5rem .75rem; border-radius: 8px;
}
.skip-link:focus { left: .75rem; top: .75rem; z-index: 10000; }

/* Top Navigation */
.top-nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid rgba(28,27,26,0.06);
  backdrop-filter: saturate(160%) blur(6px);
}
.top-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.2rem;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { width: 24px; height: 24px; border-radius: 4px; }
.brand .name { font-weight: 700; letter-spacing: .2px; }

/* Desktop menu */
.menu a {
  color: var(--green);
  font-weight: 500;
  padding: .35rem .5rem;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.menu a:hover { color: var(--gold-strong); border-color: var(--gold-strong); }
.menu a.active { border-color: var(--green); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid var(--green);
  border-radius: 10px;
  background: transparent; color: var(--green);
  cursor: pointer;
}
.hamburger:focus { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.hamburger .bars {
  display: block; width: 18px; height: 2px; background: var(--green); position: relative;
}
.hamburger .bars::before, .hamburger .bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--green);
}
.hamburger .bars::before { top: -6px; } .hamburger .bars::after { top: 6px; }

/* Mobile panel (separate nav landmark) */
.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-top: 1px solid rgba(28,27,26,.06);
  padding: 1rem 1.2rem;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.mobile-panel a {
 padding: .8rem 0;
  color: var(--green); font-weight: 600;
  border-bottom: 1px solid rgba(28,27,26,0.06);
}
.mobile-open { overflow: hidden; }
.mobile-open .mobile-panel { display: block; }

/* Responsive switch */
@media (max-width: 720px) {
  .menu { display: none; }
  .hamburger { display: flex; }

  /* Keep desktop links comfy */
  .menu a,
  .hamburger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

.mobile-panel a {
    display: flex; /* Change from 'block' to 'flex' */
    align-items: center; /* Add this to vertically center the text */
    min-height: 44px;
    line-height: 1.3;
    padding: .8rem 0;
  }
}


/* Hero / commons */
header.hero { padding: 5rem 0 3rem; position: relative; z-index: 1; }
.eyebrow {
  text-transform: uppercase; font-weight: 700; letter-spacing: .08em;
  color: var(--gold-strong); font-size: .85rem; margin-bottom: .5rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .5rem; }
.hero p { font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--ink); max-width: 70ch; }

/* Cards & grids */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.card {
  grid-column: span 12;
  padding: 1rem;
  border: 1px solid rgba(28,27,26,0.08);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.6);
}
@media (min-width: 720px) { .card { grid-column: span 6; } }

/* Buttons */
.button {
  display: inline-block; padding: .7rem 1rem; border-radius: var(--radius);
  font-weight: 600; border: 2px solid var(--green);
  color: var(--bg); background: var(--green);
  transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover { background: transparent; color: var(--green); }
.button.alt { background: transparent; color: var(--green); border-color: var(--gold-strong); }
.button.alt:hover { color: var(--bg); background: var(--gold-strong); }

/* Weather Widget Prompt */
.widget-prompt {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  border: 1px solid rgba(28,27,26,0.08);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.widget-prompt h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.widget-prompt p {
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

/* Weather Widget Card */
#gear-forecast {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.widget-card {
  background: #fff;
  border: 1px solid rgba(28,27,26,0.08);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.weather-forecast-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#weather-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

#weather-icon.is-day {
    background-color: #87CEEB; /* Sky Blue */
}
#weather-icon.is-night {
    background-color: #2c3e50; /* Midnight Blue */
}

#weather-icon img {
  width: 70px;
  height: 70px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.weather-details p {
  margin: 0;
  line-height: 1.4;
}

#weather-location {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  color: var(--green);
  font-size: 1.25rem;
}

#weather-temp-desc {
  color: var(--muted);
  text-transform: capitalize;
}

#weather-timestamp {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

#recommendation-text {
  margin: 0;
  max-width: 60ch;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Mobile-first: Products stack vertically */
.recommendation-products {
    margin-top: 1rem;
    display: flex;
    flex-direction: column; /* Stack items vertically on mobile */
    align-items: center;
    gap: 2rem; /* Increase gap for vertical spacing */
    width: 100%;
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* 16px space between image and button (meets >15px req) */
}

.product-item img {
    border-radius: var(--radius);
    background-color: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.product-item .button {
    width: 100%;
    max-width: 150px;
    text-align: center;
}

/* Desktop layout: Products side-by-side */
@media (min-width: 720px) {
    .recommendation-products {
        flex-direction: row; /* Switch to horizontal layout */
        justify-content: center;
        align-items: flex-start; /* Align tops of items */
        gap: 1.5rem; /* 24px space between items (meets >15px req) */
    }

    .product-item {
        flex-basis: 150px;
        flex-grow: 1;
    }
}


.recommendation p {
  margin: 0 0 1rem;
  max-width: 65ch;
}

/* Responsive layout for the widget */
@media (min-width: 720px) {
  .widget-card {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .recommendation p {
    margin-bottom: 0;
  }
  .recommendation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}



/* Footer */
footer { padding: 3rem 0; color: var(--muted); font-size: .95rem; }

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