/* ═══════════════════════════════════════════════════════════════
   JP Weather Pro — Global Styles
   Handwritten CSS. No framework. No utilities.
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0F172A;
  color: #F1F5F9;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: #38BDF8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Header ── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #0F172A;
  border-bottom: 1px solid #334155;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #F1F5F9;
  letter-spacing: -0.3px;
}

.logo a {
  color: #F1F5F9;
  text-decoration: none;
}

.logo a:hover {
  text-decoration: none;
}

/* ── Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s;
}

.main-nav a:hover {
  color: #F1F5F9;
  text-decoration: none;
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #F1F5F9;
  margin: 5px 0;
  transition: 0.3s;
}

/* ── Mobile Nav ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background-color: #0F172A;
  border-bottom: 1px solid #334155;
  padding: 16px 24px;
  z-index: 999;
}

.mobile-nav.active {
  display: block !important;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: #94A3B8;
  border-bottom: 1px solid #1E293B;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: #F1F5F9;
}

/* ── Main Content ── */
.main-content {
  padding-top: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Page Title ── */
.page-title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #F1F5F9;
  margin-top: 32px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: #94A3B8;
  margin-bottom: 28px;
}

/* ── City Cards Grid (Home) ── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.city-card {
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.15s;
}

.city-card:hover {
  border-color: #475569;
  transform: translateY(-1px);
}

.city-card-name {
  font-size: 15px;
  font-weight: 500;
  color: #F1F5F9;
  margin-bottom: 8px;
}

.city-card-temp {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.temp-warm {
  color: #F59E0B !important;
}

.temp-cold {
  color: #38BDF8 !important;
}

.temp-mild {
  color: #F1F5F9 !important;
}

.city-card-condition {
  font-size: 13px;
  color: #94A3B8;
  margin-bottom: 12px;
  min-height: 20px;
}

.city-card-link {
  font-size: 13px;
  font-weight: 500;
}

/* ── Current Conditions Box ── */
.current-box {
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 24px;
}

.current-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.current-city {
  font-size: 22px;
  font-weight: 600;
  color: #F1F5F9;
}

.current-time {
  font-size: 12px;
  color: #64748B;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

.temp-big {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.temp-unit {
  font-size: 28px;
  font-weight: 400;
  color: #94A3B8;
}

.current-condition-text {
  font-size: 15px;
  color: #94A3B8;
  margin-bottom: 20px;
}

.details-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid #334155;
  padding-top: 20px;
}

.detail-item {
  text-align: center;
}

.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  margin-bottom: 4px;
}

.detail-value {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 18px;
  font-weight: 600;
  color: #F1F5F9;
}

/* ── SVG Chart Section ── */
.chart-section {
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #F1F5F9;
  margin-bottom: 16px;
}

.temp-chart {
  width: 100%;
  height: 120px;
  overflow: visible;
}

.temp-chart path {
  fill: none;
  stroke: #38BDF8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.temp-chart circle {
  fill: #38BDF8;
}

.chart-axis {
  stroke: #334155;
  stroke-width: 1;
}

.chart-label {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 10px;
  fill: #64748B;
}

/* ── Forecast Table ── */
.forecast-section {
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.forecast-title {
  font-size: 14px;
  font-weight: 600;
  color: #F1F5F9;
  margin-bottom: 16px;
}

.forecast-table {
  width: 100%;
  border-collapse: collapse;
}

.forecast-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
}

.forecast-table td {
  padding: 12px;
  font-size: 14px;
  color: #F1F5F9;
  border-bottom: 1px solid #334155;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

.forecast-table tr:last-child td {
  border-bottom: none;
}

.forecast-table .day-name {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
}

/* ── Content Sections ── */
.content-section {
  margin-bottom: 32px;
}

.content-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: #F1F5F9;
  margin-bottom: 16px;
  margin-top: 32px;
}

.content-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #F1F5F9;
  margin-bottom: 10px;
  margin-top: 24px;
}

.content-section p {
  font-size: 15px;
  color: #CBD5E1;
  margin-bottom: 14px;
  line-height: 1.7;
}

.content-section ul {
  margin-bottom: 14px;
  padding-left: 24px;
}

.content-section li {
  font-size: 15px;
  color: #CBD5E1;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ── Utility Tables (what-to-wear, umbrella-check) ── */
.util-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  margin-top: 12px;
}

.util-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94A3B8;
  padding: 12px;
  background-color: #1E293B;
  border: 1px solid #334155;
}

.util-table td {
  padding: 12px;
  font-size: 14px;
  color: #CBD5E1;
  border: 1px solid #334155;
  vertical-align: top;
}

.util-table tr:nth-child(even) td {
  background-color: #151f32;
}

/* ── Contact Form ── */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #F1F5F9;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #38BDF8;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.submit-btn {
  background-color: #38BDF8;
  color: #0F172A;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* ── Thanks Page ── */
.thanks-box {
  background-color: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 48px 32px;
  text-align: center;
  margin-top: 40px;
}

.thanks-box h2 {
  font-size: 22px;
  font-weight: 600;
  color: #F1F5F9;
  margin-bottom: 12px;
}

.thanks-box p {
  font-size: 15px;
  color: #94A3B8;
  margin-bottom: 24px;
}

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1E293B;
  border-top: 1px solid #334155;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 2000;
  font-size: 13px;
  color: #94A3B8;
}

.cookie-banner.hidden {
  display: none !important;
}

.cookie-actions {
  display: flex;
  gap: 20px;
}

.cookie-actions a {
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ── Footer ── */
.app-footer {
  background-color: #020617;
  border-top: 1px solid #334155;
  padding: 40px 24px 32px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748B;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: #94A3B8;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: #F1F5F9;
}

.footer-col p {
  font-size: 13px;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 6px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid #1E293B;
  font-size: 12px;
  color: #475569;
  text-align: center;
}

/* ── Loading State ── */
.loading-text {
  color: #64748B;
  font-style: italic;
}

.error-text {
  color: #F87171;
  font-size: 13px;
}

/* ── Status badges ── */
.status-ok {
  color: #34D399;
}

.status-warn {
  color: #FBBF24;
}

/* ── Inline weather icons ── */
.weather-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .city-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .details-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .temp-big {
    font-size: 48px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .page-title {
    font-size: 22px;
  }

  .content-section h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-header {
    padding: 0 16px;
  }

  .current-box {
    padding: 20px;
  }

  .chart-section,
  .forecast-section {
    padding: 16px;
  }
}

/* ── Print ── */
@media print {
  .app-header,
  .app-footer,
  .cookie-banner,
  .menu-toggle,
  .mobile-nav {
    display: none !important;
  }

  .main-content {
    padding-top: 0;
    max-width: 100%;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .city-card {
    transition: none;
  }
}

/* ── Last Updated stamp ── */
.last-updated {
  font-size: 11px;
  color: #475569;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  margin-top: 8px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
  margin-top: 20px;
}

.breadcrumb a {
  color: #64748B;
}

.breadcrumb a:hover {
  color: #94A3B8;
}

/* ── Section divider ── */
.section-divider {
  border: none;
  border-top: 1px solid #334155;
  margin: 32px 0;
}
