:root{
  --bg: #FFF1DA; --bg-2: #FFE3B3; --paper: #FFF0D9;
  --text: #2B1D0E; --muted: #7C5B41; --gold: #F59E0B; --gold-2: #FFB454;
  --blue: #6FA6D6; --border: rgba(139, 92, 46, .22);
  --shadow: 0 10px 30px rgba(95,58,12,.15); --ring: rgba(245,158,11,.35);
}
html.dark{
  --bg: #0b132b; --bg-2: #1c2541; --paper: #0f2033f0; --text: #e6edf3;
  --muted: #a4b3c5; --gold: #f1a33a; --gold-2: #ffd08a; --blue: #4f7cac;
  --border: rgba(255,255,255,.16); --shadow: 0 10px 30px rgba(0,0,0,.35);
  --ring: rgba(241,163,58,.45);
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--text);
  background:radial-gradient(1200px 500px at 50% -10%, var(--bg-2) 0%, var(--bg) 60%) no-repeat, linear-gradient(180deg, var(--bg), var(--bg));}
.page-wrap{min-height:100dvh;display:flex;flex-direction:column}
.container{max-width:1000px;margin-inline:auto;padding:1rem}
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:1rem;top:1rem;width:auto;height:auto;background:#000;padding:.5rem 1rem;border-radius:8px;color:#fff;z-index:999}
.site-header{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;background:linear-gradient(180deg, rgba(255,238,210,.85), rgba(255,238,210,.55));backdrop-filter: blur(8px);border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:800;letter-spacing:.2px}
.logo-text{background: linear-gradient(90deg, var(--gold), #ff7a18);-webkit-background-clip:text;background-clip:text;color:transparent}
.sun-dot{width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 30% 30%, #ffe8a3, var(--gold));box-shadow:0 0 20px rgba(245,158,11,.6)}
.header-actions{display:flex;gap:.5rem}
.hero{position:relative;padding:3.2rem 1rem 1rem}
.hero .hero-inner{position:relative;z-index:1;text-align:center;max-width:900px;margin:0 auto}
.eyebrow{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:.8rem;margin:0 0 .25rem}
.hero h1{font-size:clamp(1.8rem, 4vw, 2.6rem);margin:.1rem 0 .25rem;color:#2B1D0E}
.hero .sub{color:var(--muted);margin:.2rem 0 1rem}
.sunrise-decor{position:absolute;inset:0;pointer-events:none}
.sunrise-decor .sun{position:absolute;left:50%;transform:translateX(-50%);width:min(560px,80vw);height:min(560px,80vw);border-radius:50%;top:-20vw;background:radial-gradient(circle at 50% 60%, #ffe08a 0%, #ffc060 35%, rgba(255,176,80,.6) 60%, rgba(255,176,80,0) 70%);filter: blur(2px)}
.sunrise-decor .glow{position:absolute;left:50%;transform:translateX(-50%);width:min(900px,110vw);height:min(900px,110vw);border-radius:50%;top:-35vw;background:radial-gradient(circle at 50% 60%, rgba(255,200,120,.35), rgba(255,200,120,0) 65%)}
.sunrise-decor .horizon{position:absolute;left:0;right:0;bottom:-20px;height:160px;background:linear-gradient(180deg, rgba(255,210,150,.0), rgba(219,147,64,.25));filter: blur(10px)}
.card{background:linear-gradient(180deg, var(--paper), rgba(255,223,178,.8));border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);padding:1rem}
.elevate{transform:translateY(-18px)}
.row.gap{display:flex;flex-wrap:wrap;gap:1rem}
.controls{display:grid;gap:1rem;width:100%}
.label{font-size:.9rem;color:var(--muted);display:block;margin-bottom:.25rem}
.input,.select{width:100%;padding:.8rem .9rem;border-radius:12px;background:#FDE7C4;color:var(--text);border:1px solid var(--border);outline:2px solid transparent;outline-offset:2px}
.input:focus,.select:focus{border-color:var(--gold);box-shadow:0 0 0 3px var(--ring)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.8rem 1rem;border-radius:12px;background:linear-gradient(180deg, #ffb457, var(--gold));border:1px solid rgba(139, 92, 46, .22);color:#2B1D0E;cursor:pointer;font-weight:600}
.btn:hover{filter:brightness(1.03)} .btn:focus{box-shadow:0 0 0 3px var(--ring)}
.btn-outline{background:transparent;border-color:rgba(139,92,46,.35)} .btn-ghost{background:transparent;border-color:transparent}
.chips{display:flex;gap:.5rem;flex-wrap:wrap}
.chip{padding:.55rem .8rem;border-radius:999px;border:1px solid var(--border);background:#FDE7C4;color:var(--text);cursor:pointer;font-weight:600}
.chip.is-active{border-color:var(--gold);box-shadow:0 0 0 3px var(--ring) inset}
.date-picker-label{cursor:pointer;user-select:none} .hidden-input{position:absolute;opacity:0;width:0;height:0}
.segmented{display:inline-flex;background:#FDE7C4;border:1px solid var(--border);border-radius:14px;overflow:hidden}
.seg{padding:.5rem .75rem;border:0;background:transparent;color:var(--text);cursor:pointer;font-weight:600}
.seg.is-active{background:#F8D7A1}
.autocomplete{list-style:none;margin:.25rem 0 0;padding:0;border:1px solid var(--border);border-radius:12px;background:#FDE7C4;max-height:240px;overflow:auto}
.autocomplete li{padding:.6rem .8rem;cursor:pointer;border-bottom:1px solid rgba(139,92,46,.12)}
.autocomplete li[aria-selected="true"],.autocomplete li:hover{background:#F8D7A1}
.results{display:grid;gap:1rem;margin-top:1rem}
.next-event{text-align:center;font-size:1.05rem;background:linear-gradient(90deg, rgba(245,158,11,.25), rgba(111,166,214,.25));padding:.85rem;border-radius:12px;border:1px solid var(--border)}
.grid-times{display:grid;gap:.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}
.time-card{padding:.75rem;border:1px solid var(--border);border-radius:14px;background:#FDE7C4}
.time-card h3{margin:.2rem 0 .25rem;font-size:1rem}
.time-card .tag{display:inline-block;font-size:.8rem;padding:.15rem .5rem;border-radius:999px;border:1px solid var(--border);color:var(--muted)}
.tag.gold{border-color:rgba(245,158,11,.6);color:#8d5900}
.tag.blue{border-color:rgba(111,166,214,.6);color:#37566f}
.timeline{height:38px;border-radius:999px;display:flex;overflow:hidden;border:1px solid var(--border);background:#FAD9A7}
.timeline .seg{height:100%;display:flex;align-items:center;justify-content:center;font-size:.75rem;white-space:nowrap}
.timeline .day{background:#FFD9A6;color:#5f3a0c}
.timeline .night{background:#E0B98A;color:#6b4b2c}
.timeline .gold{background:linear-gradient(90deg, rgba(245,158,11,.7), rgba(255,180,84,.55))}
.timeline .blue{background:linear-gradient(90deg, rgba(111,166,214,.65), rgba(111,166,214,.4))}
.share-row{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:.5rem}
.footer{padding:2rem 1rem;text-align:center;color:var(--muted)} .footer-links a{color:inherit}
.ad-slot{min-height:280px;max-width:100%;margin:1rem auto;border:2px dashed rgba(139,92,46,.35);border-radius:14px;display:flex;align-items:center;justify-content:center;color:var(--muted);background:#FFE8C6}
.ad-small{min-height:160px}
.search-group{position:relative} label[for="search"] + .input{margin-top:.15rem}
@media (min-width:700px){ .hero{padding:3.4rem 1rem 1.2rem} }


.timeline .seg{min-width:2px}


html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 80px; /* offset for sticky header */
}

/* Smooth in-page scrolling for jump links */
html{scroll-behavior:smooth}

/* Offset for sticky header when jumping to anchors */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]{scroll-margin-top:96px}

/* Center header brand */
.site-header .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Force center the brand logo and text in header */
.site-header .container {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
}
.site-header .brand {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}



/* === Header centering & color normalization === */
header.site-header{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  text-align:center;
  padding:.75rem 1rem;
}
.site-header .brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
}
.site-header nav{
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
}
/* Make header text black and match body typography */
.site-header, .site-header .logo-text, .site-header nav a{
  color:#000;
  font: inherit;
}
.site-header nav a{
  text-decoration:none;
}
.site-header nav a:visited{
  color:#000;
}
.site-header nav a:hover,
.site-header nav a:focus{
  text-decoration:underline;
}


/* === Header typographic boost === */
.site-header .logo-text{
  font-weight: 700;
  font-size: 1.25rem; /* slightly larger for brand */
  letter-spacing: .01em;
}
.site-header nav a{
  font-weight: 600;   /* make links bold-ish */
  font-size: 1.0625rem; /* slightly larger for readability */
}


/* === Brand styling aligned with Contact header === */
.site-header .brand{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  text-decoration:none;
  color:#000;
}
.site-header .brand strong{
  font-weight:700;
  font-size:1.25rem;
  letter-spacing:.01em;
}
.site-header .brand:visited{ color:#000; }


/* === Content figures: responsive and centered === */
.content-figure{
  max-width: 800px;
  margin: 1.25rem auto;
}
.content-figure img{
  display:block;
  width:100%;
  height:auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.content-figure figcaption{
  text-align:center;
  font-size: .95rem;
  opacity: .85;
  margin-top: .5rem;
}


/* === About page layout: side margins === */
.about-main, .methodology-main{
  padding-left: 1in;
  padding-right: 1in;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1200px; /* prevents ultra-wide lines on very large screens */
}
@media (max-width: 900px){
  .about-main, .methodology-main{
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* === Prose page margins (about/methodology/guide/editorial) === */
.about-main, .methodology-main, .guide-main, .editorial-main{
  padding-left: 1in;
  padding-right: 1in;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1200px;
}
@media (max-width: 900px){
  .about-main, .methodology-main, .guide-main, .editorial-main{
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* === Guide cards grid === */
.guide-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
@media (max-width: 800px){
  .guide-cards{ grid-template-columns: 1fr; }
}
a.guide-card{
  display: block;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: var(--paper);
  color: #000;
  text-decoration: none;
  transition: transform .06s ease, box-shadow .12s ease;
}
a.guide-card:hover, a.guide-card:focus{
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(95,58,12,.18);
}
a.guide-card h3{
  margin: 0 0 .25rem 0;
  font-size: 1.1rem;
}
a.guide-card p{
  margin: 0;
  font-size: .98rem;
  opacity: .9;
}

/* Narrow figure variant for mobile guide demo images */
.figure--narrow{ max-width: 420px; margin: .75rem auto; }
@media (min-width: 1024px){ .figure--narrow{ max-width: 420px; } }

/* Tiny figure variant for demo images on the mobile-only guide */
.figure--tiny{ max-width: 320px; margin: .5rem auto; }
@media (min-width: 1024px){
  .figure--tiny{ max-width: 320px; }
}

/* Extra-small figure variant for the blue-hour traffic trails image */
.figure--mini{ max-width: 260px; margin: .5rem auto; }
@media (min-width: 1024px){
  .figure--mini{ max-width: 260px; }
}

/* Wide figure variant for the quick-settings diagram */
.figure--wide{ max-width: 1000px; margin: 1rem auto; }
@media (min-width: 1024px){ .figure--wide{ max-width: 1000px; }
}

/* Side-by-side pair for portrait + city demo images */
.figure-pair{ display:flex; flex-wrap:wrap; gap:.75rem; justify-content:center; align-items:flex-start; margin: .5rem 0 1rem; }
.figure--pairitem{ max-width: 320px; margin: 0; }
.figure--pairitem img{ width:100%; height:auto; }
@media (max-width: 720px){
  .figure--pairitem{ max-width: 92vw; }
}
