/* ===========================================
   JP Weather Sky — The Sky Above Tokyo
   Handwritten CSS — No frameworks, no utilities
   =========================================== */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sorts Mill Goudy', serif;
  font-weight: 400;
  color: #2C3E50;
  background-color: #E6F3FF;
  line-height: 1.75;
  font-size: 17px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Quattrocento Sans', sans-serif;
  font-weight: 700;
  color: #2C3E50;
  line-height: 1.3;
}

h1 {
  font-size: 42px;
  margin-bottom: 24px;
}

h2 {
  font-size: 32px;
  margin-top: 48px;
  margin-bottom: 20px;
}

h3 {
  font-size: 24px;
  margin-top: 36px;
  margin-bottom: 16px;
}

h4 {
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 22px;
}

a {
  color: #5D8AA8;
  text-decoration: none;
}

a:hover {
  color: #E85D24;
}

/* Header */
.sky-head {
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  position: static;
  top: 0;
  z-index: 100;
  transition: border-bottom 0.3s ease;
}

.sky-head.bordered {
  border-bottom: 1px solid #B8D4E3;
}

.sky-head .logo {
  font-family: 'Quattrocento Sans', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: #2C3E50;
  letter-spacing: 1px;
}

.sky-head .logo a {
  color: #2C3E50;
}

.sky-head .logo a:hover {
  color: #2C3E50;
}

/* Navigation */
.sky-nav {
  display: flex;
  align-items: center;
}

.sky-nav a {
  font-family: 'Sorts Mill Goudy', serif;
  font-weight: 400;
  font-size: 15px;
  color: #5D8AA8;
  margin-left: 28px;
  transition: color 0.2s ease;
}

.sky-nav a:hover {
  color: #E85D24;
}

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

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

/* Hero section */
.atmos-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #E6F3FF;
  padding: 60px 20px 50px;
}

.atmos-hero h1 {
  font-family: 'Quattrocento Sans', sans-serif;
  font-weight: 700;
  font-size: 48px;
  color: #2C3E50;
  max-width: 700px;
  margin-bottom: 20px;
}

.atmos-hero .subtitle {
  font-family: 'Sorts Mill Goudy', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 20px;
  color: #5D8AA8;
  max-width: 600px;
}

/* Main content area */
.main-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* SVG Cloud Constellation */
.cloud-constellation {
  width: 100%;
  max-width: 600px;
  height: 300px;
  margin: 0 auto 40px;
  display: block;
}

.cloud-bubble {
  transition: r 0.8s ease, fill 0.8s ease;
}

.constellation-line {
  stroke: #B8D4E3;
  stroke-width: 1px;
  stroke-dasharray: 4 4;
  fill: none;
}

.bubble-label {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 10px;
  fill: #2C3E50;
  text-anchor: middle;
}

/* District cards on home */
.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.district-card {
  background-color: #FFFFFF;
  border: 1px solid #B8D4E3;
  padding: 24px 20px;
  border-radius: 0px;
}

.district-card h3 {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 12px;
}

.district-card .sky-data {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 13px;
  color: #5D8AA8;
  line-height: 1.6;
}

.district-card .view-link {
  font-family: 'Sorts Mill Goudy', serif;
  font-style: italic;
  font-size: 15px;
  color: #FF7E47;
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s ease;
}

.district-card .view-link:hover {
  border-bottom: 1px solid #FF7E47;
  color: #E85D24;
}

/* Sky data box (for district pages) */
.sky-data-box {
  background-color: #FFFFFF;
  border: 1px solid #B8D4E3;
  padding: 20px;
  border-radius: 0px;
  margin-bottom: 36px;
}

.sky-data-box h3 {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 12px;
  color: #2C3E50;
}

.sky-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.sky-data-item {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 13px;
  color: #5D8AA8;
}

.sky-data-item strong {
  color: #2C3E50;
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

/* Observatory log style entries */
.obs-log {
  background-color: #FFFFFF;
  border: 1px solid #B8D4E3;
  padding: 24px 20px;
  margin-bottom: 28px;
}

.obs-log .log-meta {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 12px;
  color: #5D8AA8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Text links (CTAs) */
.sky-link {
  font-family: 'Sorts Mill Goudy', serif;
  font-style: italic;
  font-size: 17px;
  color: #FF7E47;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s ease;
}

.sky-link:hover {
  border-bottom: 1px solid #FF7E47;
  color: #E85D24;
}

/* Lists */
ul, ol {
  margin-bottom: 22px;
  padding-left: 28px;
}

li {
  margin-bottom: 10px;
}

/* Blockquote */
blockquote {
  border-left: 3px solid #FF7E47;
  padding-left: 20px;
  margin: 28px 0;
  font-style: italic;
  color: #5D8AA8;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid #B8D4E3;
  margin: 40px 0;
}

/* Contact form */
.sky-form {
  max-width: 600px;
}

.sky-form label {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 14px;
  color: #2C3E50;
  display: block;
  margin-bottom: 6px;
  margin-top: 20px;
}

.sky-form input[type="text"],
.sky-form input[type="email"],
.sky-form select,
.sky-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #B8D4E3;
  background-color: #FFFFFF;
  font-family: 'Sorts Mill Goudy', serif;
  font-size: 16px;
  color: #2C3E50;
  outline: none;
  transition: border-color 0.2s ease;
}

.sky-form input:focus,
.sky-form select:focus,
.sky-form textarea:focus {
  border-color: #5D8AA8;
}

.sky-form textarea {
  min-height: 160px;
  resize: vertical;
}

.sky-form .submit-btn {
  font-family: 'Sorts Mill Goudy', serif;
  font-style: italic;
  font-size: 17px;
  color: #FF7E47;
  background: none;
  border: 1px solid #FF7E47;
  padding: 10px 28px;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s ease;
}

.sky-form .submit-btn:hover {
  background-color: #FF7E47;
  color: #FFFFFF;
}

/* Thanks page */
.thanks-box {
  text-align: center;
  padding: 80px 20px;
}

.thanks-box h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 600px;
  margin: 0 auto;
  background-color: #FFFFFF;
  color: #5D8AA8;
  padding: 20px 24px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.12);
  z-index: 1000;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-banner p {
  font-family: 'Sorts Mill Goudy', serif;
  font-size: 15px;
  margin-bottom: 16px;
  color: #5D8AA8;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.cookie-btn-okay {
  background-color: #FF7E47;
  color: #FFFFFF;
}

.cookie-btn-okay:hover {
  background-color: #E85D24;
}

.cookie-btn-decline {
  background-color: transparent;
  color: #FF7E47;
  border: 1px solid #FF7E47;
}

.cookie-btn-decline:hover {
  background-color: #FF7E47;
  color: #FFFFFF;
}

.cookie-btn-settings {
  background-color: transparent;
  color: #5D8AA8;
  border: 1px solid #B8D4E3;
}

.cookie-btn-settings:hover {
  background-color: #E6F3FF;
}

/* Cookie settings modal */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 62, 80, 0.4);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.cookie-modal.active {
  display: flex;
}

.cookie-modal-content {
  background-color: #FFFFFF;
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 420px;
  width: 90%;
}

.cookie-modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
}

.cookie-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #B8D4E3;
}

.cookie-toggle-row:last-child {
  border-bottom: none;
}

.cookie-toggle-row label {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 14px;
  color: #2C3E50;
}

.cookie-toggle-row .toggle-desc {
  font-family: 'Sorts Mill Goudy', serif;
  font-size: 13px;
  color: #5D8AA8;
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 16px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #B8D4E3;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #FF7E47;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal-close {
  font-family: 'Quattrocento Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  background-color: #FF7E47;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  cursor: pointer;
  margin-top: 20px;
  float: right;
}

.cookie-modal-close:hover {
  background-color: #E85D24;
}

/* Footer */
.site-footer {
  background-color: #2C3E50;
  color: #A8C8DC;
  padding: 48px 40px 32px;
  border-top: 2px solid #FF7E47;
}

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

.footer-col h4 {
  font-family: 'Quattrocento Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #A8C8DC;
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-col a {
  color: #A8C8DC;
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
  font-family: 'Sorts Mill Goudy', serif;
}

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

.footer-col p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-bottom {
  max-width: 820px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid #5D8AA8;
  font-size: 13px;
  color: #5D8AA8;
  text-align: center;
}

/* Utility */
.text-center {
  text-align: center !important;
}

.mt-1 { margin-top: 12px !important; }
.mt-2 { margin-top: 24px !important; }
.mb-1 { margin-bottom: 12px !important; }
.mb-2 { margin-bottom: 24px !important; }

/* Responsive */
@media (max-width: 768px) {
  .sky-head {
    padding: 16px 20px;
  }

  .sky-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #E6F3FF;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid #B8D4E3;
  }

  .sky-nav.active {
    display: flex;
  }

  .sky-nav a {
    margin: 10px 0;
    font-size: 16px;
  }

  .menu-toggle {
    display: block;
  }

  .atmos-hero h1 {
    font-size: 32px;
  }

  .atmos-hero .subtitle {
    font-size: 17px;
  }

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

  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }

  .main-content {
    padding: 0 16px 40px;
  }

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

  body {
    font-size: 16px;
  }
}

/* Print */
@media print {
  .sky-head,
  .site-footer,
  .cookie-banner,
  .cookie-modal,
  .menu-toggle {
    display: none !important;
  }

  body {
    background-color: #FFFFFF;
    color: #000000;
  }
}
