/* ============================================================
   SHORTS OR PANTS? — Main Stylesheet
   Fredoka One (display) + Nunito (body) from Google Fonts
   Sky/weather theme: glass cards on an animated sky background
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
  --sky-1: #d4eef9;
  --sky-2: #93cfe8;
  --sky-deep: #0077b6;
  --sky-mid: #0096c7;
  --sun: #ffd166;
  --sun-warm: #ef9c3c;
  --shorts-green: #2bbc8a;
  --shorts-dark: #1a7a5e;
  --pants-navy: #2d4fa1;
  --pants-dark: #1a2f6b;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(255, 255, 255, 0.65);
  --text-dark: #1a2a3a;
  --text-mid: #4a5e72;
  --text-light: #7a93a8;
  --shadow-sm: 0 2px 8px rgba(0, 60, 120, 0.08);
  --shadow-md: 0 8px 28px rgba(0, 60, 120, 0.13);
  --shadow-lg: 0 20px 56px rgba(0, 60, 120, 0.18);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --font-display: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* --- Body & Background --- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: linear-gradient(170deg, var(--sky-1) 0%, var(--sky-2) 55%, #5ab5d8 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Atmospheric Decorations (fixed, behind everything) --- */
.clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.45;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 {
  width: 220px; height: 65px;
  top: 12%;
  left: -240px;
  animation: drift-cloud 50s linear infinite;
}
.cloud-1::before { width: 90px; height: 90px; top: -48px; left: 22px; }
.cloud-1::after  { width: 66px; height: 66px; top: -36px; left: 90px; }

.cloud-2 {
  width: 150px; height: 48px;
  top: 35%;
  left: -170px;
  opacity: 0.3;
  animation: drift-cloud 68s linear infinite 12s;
}
.cloud-2::before { width: 64px; height: 64px; top: -34px; left: 16px; }
.cloud-2::after  { width: 48px; height: 48px; top: -26px; left: 64px; }

.cloud-3 {
  width: 190px; height: 58px;
  top: 65%;
  left: -210px;
  opacity: 0.25;
  animation: drift-cloud 42s linear infinite 25s;
}
.cloud-3::before { width: 76px; height: 76px; top: -40px; left: 20px; }
.cloud-3::after  { width: 58px; height: 58px; top: -30px; left: 78px; }

@keyframes drift-cloud {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 250px)); }
}

.sun-deco {
  position: fixed;
  top: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.7) 20%, rgba(239, 156, 60, 0.35) 55%, transparent 72%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: sun-breathe 7s ease-in-out infinite;
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.07); opacity: 0.85; }
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 119, 182, 0.12);
  box-shadow: 0 2px 18px rgba(0, 60, 120, 0.08);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--sky-deep);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.nav-brand:hover { color: var(--sun-warm); text-decoration: none; }

.nav-brand-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  transition: background 0.18s, color 0.18s;
}
.nav-link:hover { background: rgba(0, 119, 182, 0.1); color: var(--sky-deep); text-decoration: none; }
.nav-link.active { background: var(--sky-deep); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--sky-deep);
  border-radius: 3px;
  transition: opacity 0.2s, transform 0.2s;
}

/* --- Page Wrapper --- */
.main-content {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 2.5rem 0 5rem;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
  animation: page-rise 0.4s ease both;
}

@keyframes page-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text-dark);
}

h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--sky-deep); }
a:hover { color: var(--sky-mid); }

/* --- Glass Cards --- */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

/* --- Alerts --- */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.alert-danger {
  background: #fff0f0;
  border: 1.5px solid #fc8181;
  color: #b83232;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.75rem 1.9rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-3px); text-decoration: none; }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--sky-deep) 0%, #00b4d8 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 119, 182, 0.38);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(0, 119, 182, 0.45); color: var(--white); }

.btn-info {
  background: linear-gradient(135deg, #0096c7 0%, #48cae4 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 150, 199, 0.32);
}
.btn-info:hover { box-shadow: 0 8px 24px rgba(0, 150, 199, 0.42); color: var(--white); }

.btn-secondary {
  background: linear-gradient(135deg, #607a90 0%, #8fa5b8 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(80, 110, 140, 0.28);
}
.btn-secondary:hover { box-shadow: 0 8px 22px rgba(80, 110, 140, 0.38); color: var(--white); }

/* --- Form Controls --- */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 119, 182, 0.18);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.1em;
}
.form-control:focus {
  border-color: var(--sky-deep);
  box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.12);
}
.form-control::placeholder {
  color: #b0c4d4;
  font-weight: 500;
  letter-spacing: 0.04em;
}


/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(0, 40, 80, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1.4rem 0;
  text-align: center;
}
.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-copy {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
}
.footer-copy a { color: var(--sky-deep); }
.footer-copy a:hover { color: var(--sky-mid); }

/* ============================================================
   HOME PAGE (index.php)
   ============================================================ */

.home-hero {
  text-align: center;
  padding: 1rem 0 0;
}

.home-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sky-mid);
  margin-bottom: 0.6rem;
}

.home-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 6rem);
  color: var(--sky-deep);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 20px rgba(0, 119, 182, 0.18);
}

.home-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 2.8rem;
}

.home-form-card {
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 2.5rem 2.25rem 2.25rem;
}

.home-form-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* --- Geolocation Detection Panel --- */
.geo-detecting {
  display: none; /* shown by JS */
  max-width: 460px;
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 2.5rem 2.25rem 2rem;
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.geo-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 119, 182, 0.15);
  border-top-color: var(--sky-deep);
  border-radius: 50%;
  margin: 0 auto 1.1rem;
  animation: spin 0.9s linear infinite;
}

.geo-detecting-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 1.4rem;
}



/* ============================================================
   RESULTS PAGE (shorts.php)
   ============================================================ */

.result-page {
  text-align: center;
}

.result-location {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.weather-summary-bar {
  display: inline-flex;
  gap: 0;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 100px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}

.weather-stat {
  padding: 0.85rem 1.6rem;
  text-align: center;
  border-right: 1px solid rgba(0, 119, 182, 0.1);
}
.weather-stat:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--sky-deep);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.wear-prompt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
}

.rec-context {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Recommendation card */
.recommendation {
  display: inline-block;
  padding: 2.5rem 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  animation: pop-in 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  max-width: 420px;
  width: 100%;
}

.recommendation.shorts {
  background: linear-gradient(145deg, #cdf5e8 0%, #a1ecd2 50%, #6ddbb5 100%);
  border: 2px solid rgba(43, 188, 138, 0.28);
  box-shadow: 0 12px 40px rgba(43, 188, 138, 0.25), var(--shadow-md);
}

.recommendation.pants {
  background: linear-gradient(145deg, #d8e5fb 0%, #b4c9fa 50%, #8aaff7 100%);
  border: 2px solid rgba(45, 79, 161, 0.28);
  box-shadow: 0 12px 40px rgba(45, 79, 161, 0.22), var(--shadow-md);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.75) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.rec-image {
  margin-bottom: 1.1rem;
}
.rec-image img {
  max-height: 200px;
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}

.rec-word {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0.03em;
}
.recommendation.shorts .rec-word { color: var(--shorts-dark); }
.recommendation.pants  .rec-word { color: var(--pants-dark); }

.rec-reason {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pants-dark);
  margin-top: 0.75rem;
  opacity: 0.8;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.zip-override {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 119, 182, 0.12);
}

.zip-override-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.zip-override-form {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  max-width: 300px;
  margin: 0 auto;
}

.zip-override-input {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 1rem;
}

/* ============================================================
   FORECAST PAGE (forecast.php)
   ============================================================ */

.forecast-header {
  margin-bottom: 1.75rem;
}

.forecast-location {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-mid);
  margin-top: 0.3rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.forecast-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1rem 1.2rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: card-up 0.4s ease both;
}
.forecast-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.forecast-card:nth-child(1) { animation-delay: 0.04s; }
.forecast-card:nth-child(2) { animation-delay: 0.1s; }
.forecast-card:nth-child(3) { animation-delay: 0.16s; }
.forecast-card:nth-child(4) { animation-delay: 0.22s; }
.forecast-card:nth-child(5) { animation-delay: 0.28s; }

@keyframes card-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fc-day {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--sky-deep);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.fc-date {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}

.weather-icon {
  font-size: 2.6rem !important;
  color: #3d9ccc;
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.fc-temps {
  margin-bottom: 0.4rem;
}

.fc-high {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--text-dark);
}

.fc-sep {
  color: var(--text-light);
  margin: 0 0.15rem;
  font-size: 1.1rem;
}

.fc-low {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-light);
}

.fc-feels {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.fc-desc {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: capitalize;
}

/* ============================================================
   CONTENT PAGES (about.php, disclaimer.php)
   ============================================================ */

.content-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.content-card h1 {
  margin-bottom: 1.4rem;
}

.content-card p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.75;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 720px) {
  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .forecast-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 240px;
    margin: 0 auto;
    width: 100%;
  }
  .weather-summary-bar {
    border-radius: var(--radius-md);
  }
  .weather-stat {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 560px) {
  .main-content { padding: 1.5rem 0 4rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(0, 119, 182, 0.12);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .home-form-card { padding: 1.75rem 1.25rem; }

  .recommendation { padding: 2rem 1.5rem; }

  .forecast-grid { grid-template-columns: 1fr 1fr; }
  .forecast-card:nth-child(5) { max-width: 100%; }

  .weather-summary-bar {
    flex-direction: column;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 300px;
  }
  .weather-stat { border-right: none; border-bottom: 1px solid rgba(0, 119, 182, 0.1); }
  .weather-stat:last-child { border-bottom: none; }

  .content-card { padding: 1.5rem; }
}

@media (max-width: 360px) {
  .forecast-grid { grid-template-columns: 1fr; }
  .forecast-card:nth-child(5) { grid-column: auto; max-width: none; }
}
