/* ============================================================
   WRPlus Landing Page — "Civic Operations Theater"
   Aesthetic: editorial × mission control, ember/honey/cream
   ============================================================ */

/* ============= DESIGN TOKENS — WHITE × ORANGE ============= */
.landing {
  --ember:        #E8541C;     /* primary orange (graphics + accents) */
  --ember-soft:   #F26E3D;
  --ember-bright: #FF7A3F;
  --amber:        #F08A2C;
  --gold:         #F4B860;
  --honey:        #FFD089;
  --cream:        #FFFFFF;     /* page background — pure white */
  --paper:        #FFFFFF;     /* card background — pure white */
  --haze:         #FFF5E8;     /* soft warm tint for hover/subtle BG */
  --rule:         #F2E4D2;     /* warm border */
  --rule-strong:  #E8D2B6;
  --ink:          #1A0F0A;
  --charcoal:     #3D2E26;
  --mute:         #8B7B6E;
  --alert:        #C8302F;
  --warn:         #D97706;
  --safe:         #059669;
  --water:        #2563EB;
  --night:        #161009;

  font-family: "IBM Plex Sans Thai", "Prompt", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Defensive: contain any rogue absolute-positioned children from causing
     page-wide horizontal scroll (e.g. blob backgrounds, decorative pseudos). */
  overflow-x: clip;
}

.landing *,
.landing *::before,
.landing *::after {
  box-sizing: border-box;
}

.landing .display { font-family: "Fraunces", "IBM Plex Serif", Georgia, serif; font-optical-sizing: auto; font-variation-settings: "opsz" 144, "SOFT" 50; }
.landing .mono { font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace; font-feature-settings: "ss01" 1, "ss02" 1, "zero" 1; }

/* ============= HERO IMAGE SLIDER (Apple Wallet card with crossfade) ============= */
.hero-img-slider {
  position: relative;
  margin: 22px 0 26px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--haze);
  aspect-ratio: 16 / 9;
  box-shadow:
    0 1px 2px rgba(58, 31, 13, 0.04),
    0 12px 32px -16px rgba(232, 84, 28, 0.22),
    0 28px 56px -28px rgba(58, 31, 13, 0.2);
  isolation: isolate;
}

.hero-img-slider .his-stage {
  position: absolute; inset: 0;
}

.hero-img-slider .his-slide {
  position: absolute; inset: 0;
  display: block;
  text-decoration: none;
  color: var(--cream);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s cubic-bezier(0.65, 0, 0.35, 1),
              transform 6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hero-img-slider .his-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  /* Subtle Ken Burns zoom while active */
  animation: kenBurnsSlide 8s ease-out forwards;
}

@keyframes kenBurnsSlide {
  from { transform: scale(1.0) translate(0, 0); }
  to   { transform: scale(1.06) translate(-1%, -0.8%); }
}

.hero-img-slider .his-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-slider .his-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 60px 18px 18px;
  background: linear-gradient(180deg,
              rgba(26, 15, 10, 0) 0%,
              rgba(26, 15, 10, 0.4) 45%,
              rgba(26, 15, 10, 0.85) 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-img-slider .his-cat {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  background: rgba(255, 248, 240, 0.95);
  color: var(--ember);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  margin-bottom: 4px;
}

.hero-img-slider .his-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cream);
  margin: 0;
  text-shadow: 0 2px 12px rgba(26, 15, 10, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.005em;
}

.hero-img-slider .his-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255, 248, 240, 0.78);
  font-weight: 500;
}

.hero-img-slider .his-controls {
  position: absolute;
  bottom: 14px; right: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.hero-img-slider .his-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.hero-img-slider .his-dots button {
  width: 6px; height: 6px;
  border-radius: 99px;
  border: none;
  padding: 0;
  background: rgba(255, 248, 240, 0.4);
  cursor: pointer;
  transition: all 0.4s ease;
}

.hero-img-slider .his-dots button.is-active {
  width: 22px;
  background: var(--cream);
}

.hero-img-slider .his-counter {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(255, 248, 240, 0.85);
  font-weight: 600;
  padding: 4px 9px;
  background: rgba(26, 15, 10, 0.4);
  backdrop-filter: blur(6px);
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.hero-img-slider .his-counter-num { color: var(--cream); }
.hero-img-slider .his-counter-sep,
.hero-img-slider .his-counter-total { color: rgba(255, 248, 240, 0.55); }

@media (max-width: 768px) {
  .hero-img-slider {
    margin: 16px 0 20px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
  }
  .hero-img-slider .his-overlay { padding: 50px 14px 14px; }
  .hero-img-slider .his-title { font-size: 15px; }
  .hero-img-slider .his-cat { font-size: 9px; padding: 3px 8px; }
  .hero-img-slider .his-meta { font-size: 9px; }
  .hero-img-slider .his-controls { bottom: 10px; right: 10px; gap: 8px; }
  .hero-img-slider .his-counter { font-size: 10px; padding: 3px 8px; }
}

/* ============= MOBILE GREETING + STATUS PILL (Apple Wallet feel) ============= */
.landing .mobile-greet { display: none; }

@media (max-width: 768px) {
  .landing .mobile-greet {
    display: block;
    margin-bottom: 20px;
    animation: greetIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }

  @keyframes greetIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .landing .greet-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .landing .greet-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.1;
  }

  .landing .greet-date {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--mute);
    letter-spacing: 0.04em;
    font-weight: 500;
    flex-shrink: 0;
  }

  .landing .status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 10px 12px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 99px;
    font-size: 12px;
    color: var(--charcoal);
    font-weight: 500;
    text-decoration: none;
    box-shadow:
      0 1px 2px rgba(232, 84, 28, 0.04),
      0 8px 24px -12px rgba(58, 31, 13, 0.08);
    transition: transform 0.25s ease;
  }

  .landing .status-pill:active { transform: scale(0.97); }

  .landing .status-pill .sp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
  }
  .landing .status-pill .sp-dot::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulseRing 2.4s infinite;
  }

  .landing .status-pill.status-normal .sp-dot { background: var(--safe); }
  .landing .status-pill.status-warning .sp-dot { background: var(--warn); }
  .landing .status-pill.status-critical .sp-dot { background: var(--alert); }

  .landing .status-pill .sp-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .landing .status-pill .sp-arrow {
    color: var(--mute);
    font-size: 16px;
    line-height: 1;
    margin-left: 4px;
    flex-shrink: 0;
  }
}

/* ============= SCROLL PROGRESS BAR ============= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 999;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--ember) 0%, var(--gold) 50%, var(--ember-bright) 100%);
  box-shadow: 0 0 12px rgba(232, 84, 28, 0.5);
  will-change: transform;
}

/* ============= ANIMATED TOPOGRAPHIC ATLAS (hero) ============= */
.hero-atlas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  /* Mouse parallax — small movement in opposite direction */
  transform: translate3d(calc(var(--mx, 0px) * -0.4), calc(var(--my, 0px) * -0.4), 0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero-atlas .atlas-line {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: atlasDraw 2.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  opacity: 0.5;
}

.hero-atlas .atlas-line:nth-child(1) { animation-delay: 0.2s; }
.hero-atlas .atlas-line:nth-child(2) { animation-delay: 0.32s; }
.hero-atlas .atlas-line:nth-child(3) { animation-delay: 0.44s; }
.hero-atlas .atlas-line:nth-child(4) { animation-delay: 0.56s; }
.hero-atlas .atlas-line:nth-child(5) { animation-delay: 0.68s; }
.hero-atlas .atlas-line:nth-child(6) { animation-delay: 0.80s; }
.hero-atlas .atlas-line:nth-child(7) { animation-delay: 0.92s; }
.hero-atlas .atlas-line:nth-child(8) { animation-delay: 1.04s; }

@keyframes atlasDraw {
  0%   { stroke-dashoffset: 2400; opacity: 0; }
  20%  { opacity: 0.5; }
  100% { stroke-dashoffset: 0; opacity: 0.5; }
}

.hero-atlas .atlas-dot {
  opacity: 0;
  transform-origin: center;
  animation: atlasDotIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes atlasDotIn {
  0%   { opacity: 0; r: 0; }
  60%  { opacity: 0.85; }
  100% { opacity: 0.6; }
}

.hero-atlas .atlas-dot-pulse {
  animation: atlasDotIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, dotPulse 2.4s 3s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.4); }
}

/* ============= TOPOGRAPHIC PATTERN (subtle map-contour reference) ============= */
.topo-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 800px 400px at 80% 20%, rgba(232, 84, 28, 0.05), transparent 60%),
    radial-gradient(ellipse 600px 300px at 10% 80%, rgba(244, 184, 96, 0.06), transparent 60%);
}

.topo-pattern::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'><g fill='none' stroke='%23b8956b' stroke-width='0.4' opacity='0.35'><path d='M0,200 Q100,180 200,200 T400,200'/><path d='M0,180 Q100,150 200,180 T400,180'/><path d='M0,220 Q100,250 200,220 T400,220'/><path d='M0,160 Q100,120 200,160 T400,160'/><path d='M0,240 Q100,280 200,240 T400,240'/><path d='M0,140 Q100,90 200,140 T400,140'/><path d='M0,260 Q100,310 200,260 T400,260'/></g></svg>");
  background-size: 400px 400px;
  opacity: 0.45;
}

/* ============= ALERT TICKER ============= */
.landing-ticker {
  height: 38px;
  background: linear-gradient(90deg, var(--night) 0%, var(--charcoal) 100%);
  color: var(--cream);
  font-size: 13px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  position: relative;
  z-index: 60;
}

.landing-ticker .live-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ember);
  padding: 0 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.landing-ticker .live-tag::after {
  content: '';
  position: absolute;
  right: -10px; top: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, var(--ember), transparent);
  pointer-events: none;
}

.landing-ticker .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: white;
  animation: livePulse 1.4s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.7); }
}

.landing-ticker .marquee-window {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  /* Fade-out gradient on right edge so text doesn't visually clip into clock/edge */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 24px, black calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, black 24px, black calc(100% - 32px), transparent 100%);
}

.landing-ticker .marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  padding-left: 24px;
}

.landing-ticker:hover .marquee-track { animation-play-state: paused; }

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.landing-ticker .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 248, 240, 0.92);
}

.landing-ticker .ticker-item .sev {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 700;
}

.landing-ticker .ticker-item .sev-critical { background: rgba(200, 48, 47, 0.85); color: white; }
.landing-ticker .ticker-item .sev-warn { background: rgba(217, 119, 6, 0.85); color: white; }
.landing-ticker .ticker-item .sev-info { background: rgba(244, 184, 96, 0.25); color: var(--honey); }
.landing-ticker .ticker-item .sev-safe { background: rgba(5, 150, 105, 0.6); color: white; }

.landing-ticker .ticker-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--gold);
  opacity: 0.7;
}

.landing-ticker .clock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gold);
  border-left: 1px solid rgba(244, 184, 96, 0.18);
}

/* ============= TOP NAV ============= */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(236, 224, 209, 0.6);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.landing-nav.is-scrolled {
  background: rgba(255, 248, 240, 0.95);
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 0 rgba(58, 31, 13, 0.04);
}

.landing-nav .nav-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.landing-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.landing-nav .brand img {
  width: 46px; height: 46px; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(232, 84, 28, 0.12));
}

.landing-nav .brand .brand-text {
  display: flex; flex-direction: column; line-height: 1.05;
}

.landing-nav .brand .brand-name {
  font-weight: 700; font-size: 16px; color: var(--ink);
  letter-spacing: -0.01em;
}

.landing-nav .brand .brand-sub {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute);
  font-weight: 600;
}

.landing-nav .nav-links {
  display: flex; gap: 4px;
  align-items: center;
}

.landing-nav .nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
  border-radius: 8px;
}

.landing-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.landing-nav .nav-link:hover { color: var(--ember); }
.landing-nav .nav-link:hover::after { transform: scaleX(1); }
.landing-nav .nav-link.is-active { color: var(--ember); }
.landing-nav .nav-link.is-active::after { transform: scaleX(1); }

.landing-nav .nav-actions {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}

.landing-nav .icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-nav .icon-btn:hover {
  background: var(--haze);
  border-color: var(--rule-strong);
  color: var(--ember);
}

.landing-nav .icon-btn .badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  background: var(--ember);
  color: white;
  border-radius: 99px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--cream);
}

.landing-nav .menu-toggle {
  display: none;
}

/* ============= HERO ============= */
.hero {
  position: relative;
  min-height: calc(100vh - 38px - 76px);
  padding: 80px 32px 100px;
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas {
  position: absolute; inset: 0; z-index: -2;
  /* Solid background — clean flat surface (no gradient, no atmospheric effects) */
  background: var(--paper);
}

/* Hide all decorative background layers for a solid, minimal hero */
.hero .topo-pattern,
.hero .hero-atlas,
.hero .hero-slides {
  display: none !important;
}

.hero-slides {
  position: absolute; inset: 0; z-index: -1;
}

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide .slide-blob-a,
.hero-slide .slide-blob-b,
.hero-slide .slide-blob-c {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  transition: opacity 1.6s ease;
  will-change: transform;
}

.hero-slide.is-active .slide-blob-a,
.hero-slide.is-active .slide-blob-b,
.hero-slide.is-active .slide-blob-c { opacity: 1; }

/* Slide 1 — water/ember */
.hero-slide[data-tone="ember"] .slide-blob-a {
  width: 720px; height: 720px;
  top: -200px; right: -150px;
  background: radial-gradient(circle, rgba(232, 84, 28, 0.45), transparent 70%);
  animation: blobFloat1 18s ease-in-out infinite;
}
.hero-slide[data-tone="ember"] .slide-blob-b {
  width: 500px; height: 500px;
  bottom: -100px; left: 10%;
  background: radial-gradient(circle, rgba(244, 184, 96, 0.5), transparent 70%);
  animation: blobFloat2 22s ease-in-out infinite;
}
.hero-slide[data-tone="ember"] .slide-blob-c {
  width: 400px; height: 400px;
  top: 30%; left: -100px;
  background: radial-gradient(circle, rgba(255, 208, 137, 0.4), transparent 70%);
  animation: blobFloat3 16s ease-in-out infinite;
}

/* Slide 2 — alert/warn */
.hero-slide[data-tone="warn"] .slide-blob-a {
  width: 680px; height: 680px;
  top: -100px; left: -150px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.4), transparent 70%);
  animation: blobFloat2 20s ease-in-out infinite;
}
.hero-slide[data-tone="warn"] .slide-blob-b {
  width: 540px; height: 540px;
  bottom: -150px; right: 5%;
  background: radial-gradient(circle, rgba(232, 84, 28, 0.35), transparent 70%);
  animation: blobFloat1 24s ease-in-out infinite;
}
.hero-slide[data-tone="warn"] .slide-blob-c {
  width: 380px; height: 380px;
  top: 40%; right: 30%;
  background: radial-gradient(circle, rgba(255, 208, 137, 0.45), transparent 70%);
  animation: blobFloat3 18s ease-in-out infinite;
}

/* Slide 3 — civic/gold */
.hero-slide[data-tone="gold"] .slide-blob-a {
  width: 640px; height: 640px;
  top: 10%; right: -100px;
  background: radial-gradient(circle, rgba(244, 184, 96, 0.55), transparent 70%);
  animation: blobFloat3 22s ease-in-out infinite;
}
.hero-slide[data-tone="gold"] .slide-blob-b {
  width: 480px; height: 480px;
  bottom: -50px; left: -50px;
  background: radial-gradient(circle, rgba(255, 208, 137, 0.5), transparent 70%);
  animation: blobFloat1 26s ease-in-out infinite;
}
.hero-slide[data-tone="gold"] .slide-blob-c {
  width: 360px; height: 360px;
  top: 50%; left: 30%;
  background: radial-gradient(circle, rgba(232, 84, 28, 0.25), transparent 70%);
  animation: blobFloat2 19s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, 30px) scale(1.08); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(30px, 50px) scale(0.92); }
  75%      { transform: translate(-40px, -20px) scale(1.06); }
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  max-width: 1380px;
  margin: 0 auto;
  align-items: center;
  width: 100%;
}

.hero-text {
  position: relative;
}

.hero-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ember);
  padding: 8px 16px 8px 12px;
  background: rgba(232, 84, 28, 0.08);
  border: 1px solid rgba(232, 84, 28, 0.18);
  border-radius: 99px;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s 0.15s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-text .eyebrow .pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember);
  position: relative;
}

.hero-text .eyebrow .pulse-dot::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(3.5); opacity: 0; }
}

.hero-text h1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 28px 0;
  font-family: "IBM Plex Sans Thai", "Prompt", sans-serif;
}

.hero-text h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(36px);
  animation: heroFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-text h1 .line:nth-child(1) { animation-delay: 0.3s; }
.hero-text h1 .line:nth-child(2) { animation-delay: 0.5s; padding-left: clamp(20px, 6vw, 90px); }
.hero-text h1 .line:nth-child(3) { animation-delay: 0.7s; }

.hero-text h1 .accent {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
}

.hero-text .underscore {
  display: inline-block;
  position: relative;
}

.hero-text .underscore::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px;
  bottom: 0.05em;
  height: 0.15em;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  border-radius: 99px;
  transform-origin: left;
  transform: scaleX(0);
  animation: drawUnderline 1.4s 1.2s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

@keyframes drawUnderline {
  to { transform: scaleX(1); }
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-text .lede {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--charcoal);
  max-width: 520px;
  margin: 0 0 36px 0;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.9s 0.95s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.9s 1.15s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.btn-ember {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 15px;
  border-radius: 99px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.25s;
  box-shadow: 0 4px 16px rgba(26, 15, 10, 0.18);
  position: relative;
  overflow: hidden;
}

.btn-ember::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--ember) 0%, var(--ember-bright) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-ember > * { position: relative; z-index: 1; }

.btn-ember:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(232, 84, 28, 0.4);
}

.btn-ember:hover::before { opacity: 1; }

.btn-ember .arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn-ember:hover .arrow { transform: translateX(6px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  border-radius: 99px;
  text-decoration: none;
  border: 1.5px solid var(--rule-strong);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-ghost:hover {
  background: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.hero-meta {
  margin-top: 56px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.9s 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-meta .stat {
  display: flex; flex-direction: column; gap: 4px;
}

.hero-meta .stat .num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.hero-meta .stat .num-suffix {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  color: var(--mute);
  margin-left: 4px;
}

.hero-meta .stat .label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

/* ============= HERO LIVE GAUGE CARD (right side) ============= */
.gauge-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 28px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 32px 80px -32px rgba(58, 31, 13, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  animation: gaugeEntry 1.1s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  backdrop-filter: blur(12px);
}

@keyframes gaugeEntry {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gauge-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--gold), var(--amber));
}

.gauge-card .gc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}

.gauge-card .gc-station {
  display: flex; flex-direction: column;
}

.gauge-card .gc-station .id {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.16em;
  color: var(--mute); font-weight: 600;
  margin-bottom: 4px;
}

.gauge-card .gc-station .name {
  font-size: 17px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.gauge-card .gc-station .src {
  font-size: 11px; color: var(--mute);
  margin-top: 2px;
}

.gauge-card .gc-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--safe);
  padding: 4px 10px;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 99px;
}

.gauge-card .gc-live.is-warn { color: var(--warn); background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.2); }
.gauge-card .gc-live.is-alert { color: var(--alert); background: rgba(200, 48, 47, 0.08); border-color: rgba(200, 48, 47, 0.2); }

.gauge-card .gc-live .live-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; position: relative;
}
.gauge-card .gc-live .live-pulse-dot::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: inherit;
  animation: pulseRing 2.2s infinite;
}

.gauge-card .gc-body {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  align-items: stretch;
}

.gauge-tube {
  position: relative;
  width: 84px;
  height: 240px;
  background: linear-gradient(180deg, var(--haze) 0%, var(--paper) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: inset 0 2px 4px rgba(58, 31, 13, 0.06);
}

.gauge-tube::before {
  /* glass highlight */
  content: '';
  position: absolute;
  top: 8px; left: 8px;
  width: 16px; height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent);
  border-radius: 99px;
  z-index: 3;
  pointer-events: none;
}

.gauge-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--fill-pct, 0%);
  background:
    linear-gradient(180deg, rgba(255, 208, 137, 0.95) 0%, var(--gold) 35%, var(--ember) 100%);
  transition: height 2.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.6s;
  border-radius: 0 0 14px 14px;
  z-index: 1;
}

.gauge-fill.is-alert {
  background: linear-gradient(180deg, var(--ember-bright) 0%, var(--ember) 50%, var(--alert) 100%);
}

.gauge-fill::after {
  content: '';
  position: absolute;
  top: -3px; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.5), transparent);
  animation: waveTop 2.8s ease-in-out infinite;
}

@keyframes waveTop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* Animated SVG water surface inside gauge fill */
.water-wave {
  position: absolute;
  top: -12px; left: 0; right: 0;
  width: 100%;
  height: 24px;
  pointer-events: none;
  filter: drop-shadow(0 -1px 2px rgba(232, 84, 28, 0.2));
}

/* ============= REFINED CARD INTERACTIONS (subtle 3D tilt on hover) ============= */
@media (min-width: 769px) and (hover: hover) {
  .status-card,
  .news-card,
  .action-card {
    transform-style: preserve-3d;
    perspective: 800px;
  }

  .status-card:hover,
  .news-card:hover,
  .action-card:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-1deg) scale(1.01);
  }
}

/* ============= SMOOTH SCROLL ============= */
html {
  scroll-behavior: smooth;
}

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

/* ============= NEWS SKELETON (initial load state) ============= */
.news-skeleton {
  background: var(--paper);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--rule);
  flex: 0 0 78%;
  max-width: 320px;
}

.news-skeleton-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, var(--haze) 0%, var(--rule) 50%, var(--haze) 100%);
  background-size: 200% 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  animation: shimmer 1.6s ease-in-out infinite;
}

.news-skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, var(--haze) 0%, var(--rule) 50%, var(--haze) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 8px;
  animation: shimmer 1.6s ease-in-out infinite;
}

.news-skeleton-line.short { width: 60%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gauge-marker {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(58, 31, 13, 0.35);
  z-index: 2;
}

.gauge-marker .label {
  position: absolute;
  left: calc(100% + 8px);
  top: -7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
  color: var(--mute);
  font-weight: 600;
}

.gauge-marker.is-warn { background: rgba(217, 119, 6, 0.5); }
.gauge-marker.is-warn .label { color: var(--warn); }
.gauge-marker.is-alert { background: rgba(200, 48, 47, 0.55); }
.gauge-marker.is-alert .label { color: var(--alert); }

.gauge-info {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 0;
}

.gauge-info .level-row {
  display: flex; align-items: baseline; gap: 8px;
}

.gauge-info .level-display {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-size: 64px;
  line-height: 0.95;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.gauge-info .level-unit {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--mute);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.gauge-info .level-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.gauge-info .level-trend.up { color: var(--alert); background: rgba(200, 48, 47, 0.08); }
.gauge-info .level-trend.down { color: var(--safe); background: rgba(5, 150, 105, 0.08); }
.gauge-info .level-trend.flat { color: var(--mute); background: var(--haze); }

.gauge-thresholds {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--mute);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.gauge-thresholds .threshold-item {
  display: flex; align-items: center; gap: 6px;
}

.gauge-thresholds .threshold-item .swatch {
  width: 8px; height: 8px; border-radius: 2px;
}

.gauge-thresholds .threshold-item .val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--charcoal);
}

/* slider controls */
.hero-slider-controls {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

.slider-dots {
  display: flex; gap: 10px;
  align-items: center;
  pointer-events: auto;
}

.slider-dots button {
  width: 32px; height: 4px;
  border-radius: 99px;
  background: rgba(58, 31, 13, 0.12);
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.slider-dots button.is-active {
  width: 64px;
  background: rgba(58, 31, 13, 0.2);
}

.slider-dots button.is-active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ember);
  transform-origin: left;
  animation: dotProgress 6s linear forwards;
}

@keyframes dotProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.slider-arrows {
  display: flex; gap: 8px;
  pointer-events: auto;
}

.slider-arrows button {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--charcoal);
  transition: all 0.2s ease;
}

.slider-arrows button:hover {
  background: var(--ink);
  color: var(--cream);
  transform: scale(1.05);
  border-color: var(--ink);
}

/* ============= SECTION DIVIDERS — orange accent lines between sections ============= */
.landing > section + section,
.landing > section + footer {
  position: relative;
}
.landing > section + section::before,
.landing > section + footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 2px;
  background: var(--ember);
  border-radius: 99px;
  opacity: 0.85;
}

/* ============= STATUS STRIP ============= */
.status-strip {
  background: var(--paper);
  padding: 80px 32px;
  position: relative;
  overflow: hidden;
}

.status-strip .strip-header {
  max-width: 1380px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.section-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 12px;
}

.section-eyebrow .index-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  font-weight: 500;
}

.section-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--ember);
}

.section-title {
  font-family: "IBM Plex Sans Thai", "Prompt", sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  max-width: 720px;
}

.section-title .accent {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}

.section-subtitle {
  font-size: 15px; color: var(--charcoal);
  line-height: 1.55;
  max-width: 480px;
  text-align: right;
}

.status-strip .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  max-width: 1380px;
  margin: 0 auto;
}

.status-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.3s;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 200px;
  box-shadow: 0 1px 2px rgba(232, 84, 28, 0.04);
}

.status-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px -16px rgba(232, 84, 28, 0.22);
  border-color: var(--ember);
}

.status-card .sc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.status-card .sc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.status-card[data-tone="ember"] .sc-icon { background: rgba(232, 84, 28, 0.1); color: var(--ember); }
.status-card[data-tone="amber"] .sc-icon { background: rgba(244, 184, 96, 0.18); color: var(--amber); }
.status-card[data-tone="ink"] .sc-icon { background: rgba(26, 15, 10, 0.08); color: var(--ink); }
.status-card[data-tone="alert"] .sc-icon { background: rgba(200, 48, 47, 0.1); color: var(--alert); }
.status-card[data-tone="safe"] .sc-icon { background: rgba(5, 150, 105, 0.1); color: var(--safe); }

.status-card .sc-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--mute);
  padding: 4px 8px;
  background: var(--haze);
  border-radius: 5px;
}

.status-card .sc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.status-card .sc-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.status-card .sc-value .unit {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--mute);
  margin-left: 6px;
  font-weight: 500;
}

.status-card .sc-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--charcoal);
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.status-card .sc-foot .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--safe);
  animation: livePulse 2s infinite;
}

.status-card.is-feature {
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  color: var(--cream);
  border: 1px solid var(--charcoal);
}

.status-card.is-feature .sc-label,
.status-card.is-feature .sc-value,
.status-card.is-feature .sc-foot { color: var(--cream); }
.status-card.is-feature .sc-label,
.status-card.is-feature .sc-foot { color: rgba(255, 248, 240, 0.7); }

.status-card.is-feature .sc-tag {
  background: rgba(255, 208, 137, 0.15);
  color: var(--gold);
}

.status-card.is-feature .sc-icon {
  background: rgba(244, 184, 96, 0.18);
  color: var(--gold);
}

.status-card.is-feature .sc-foot { border-top-color: rgba(244, 184, 96, 0.2); }

.status-card .mini-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 32px;
  margin-top: 8px;
}

.status-card .mini-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--gold), var(--ember));
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  opacity: 0.85;
  transition: transform 0.3s;
}

.status-card.is-feature .mini-chart .bar {
  background: linear-gradient(180deg, var(--gold), var(--ember));
}

.status-card:hover .mini-chart .bar:nth-child(odd) {
  transform: scaleY(1.1);
}

/* ============= NEWS SECTION ============= */
.news-section {
  background: var(--cream);
  padding: 100px 32px;
  position: relative;
}

.news-grid {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px 28px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 20px;
  overflow: hidden;
}

.news-card:hover { transform: translateY(-4px); }

.news-card .news-img {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--haze);
  margin-bottom: 16px;
}

.news-card .news-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26, 15, 10, 0.45));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.news-card:hover .news-img::after { opacity: 1; }

.news-card .news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Inline art cover — no external image dependency, CSP-safe.
   Each tone uses a different gradient palette for visual variety. */
.news-card .art-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card:hover .art-cover { transform: scale(1.05); }

.news-card .art-topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.news-card .art-icon {
  position: relative;
  z-index: 1;
  font-size: clamp(34px, 7vw, 64px);
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 4px 16px rgba(26, 15, 10, 0.25));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-card:hover .art-icon { transform: scale(1.08) rotate(-3deg); }

/* Real cover image — overlays the SVG art when loaded */
.news-card .news-img .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.news-card .news-img.has-cover .cover-img {
  opacity: 1;
}

/* When real cover is loaded, fade out the SVG art layer */
.news-card .news-img.has-cover .art-cover {
  opacity: 0.0;
  transition: opacity 0.5s ease;
}

/* Vignette gradient when cover image is shown — improves category-tag readability */
.news-card .news-img.has-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 15, 10, 0.35) 0%, transparent 35%, transparent 65%, rgba(26, 15, 10, 0.45) 100%);
  z-index: 3;
  pointer-events: none;
}

.news-card:hover .news-img.has-cover .cover-img {
  transform: scale(1.07);
}

/* Tone variants — gradient backgrounds */
.news-card .news-img[data-tone="ember"]   { background: linear-gradient(135deg, #F26E3D 0%, #DD4B14 60%, #A4310B 100%); }
.news-card .news-img[data-tone="amber"]   { background: linear-gradient(135deg, #FFD089 0%, #EA8B2C 55%, #B8590C 100%); }
.news-card .news-img[data-tone="gold"]    { background: linear-gradient(135deg, #FFE5B0 0%, #F4B860 50%, #D89132 100%); }
.news-card .news-img[data-tone="water"]   { background: linear-gradient(135deg, #93C5FD 0%, #2563EB 60%, #1E40AF 100%); }
.news-card .news-img[data-tone="ink"]     { background: linear-gradient(135deg, #3D2E26 0%, #1A0F0A 100%); }
.news-card .news-img[data-tone="safe"]    { background: linear-gradient(135deg, #6EE7B7 0%, #059669 60%, #047857 100%); }

/* topo line color varies per tone for harmony */
.news-card .news-img[data-tone="gold"] .art-topo,
.news-card .news-img[data-tone="amber"] .art-topo { color: rgba(58, 31, 13, 0.4); }
.news-card .news-img[data-tone="ink"] .art-topo { color: rgba(244, 184, 96, 0.35); }

.news-card .news-img[data-tone="gold"] .art-icon,
.news-card .news-img[data-tone="amber"] .art-icon { color: rgba(58, 31, 13, 0.85); }
.news-card .news-img[data-tone="ink"] .art-icon { color: var(--gold); }

.news-card .news-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 16px; left: 16px;
  padding: 5px 11px;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  z-index: 2;
}

.news-card .news-cat[data-cat="alert"] { color: var(--alert); }
.news-card .news-cat[data-cat="event"] { color: var(--ember); }
.news-card .news-cat[data-cat="report"] { color: var(--charcoal); }
.news-card .news-cat[data-cat="news"] { color: var(--amber); }
.news-card .news-cat[data-cat="award"] { color: var(--safe); }
.news-card .news-cat[data-cat="weather"] { color: var(--water); }

.news-card .news-meta {
  display: flex; gap: 12px; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.news-card .news-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-strong); }

.news-card .news-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 10px 0;
  transition: color 0.3s ease;
}

.news-card:hover .news-title { color: var(--ember); }

.news-card .news-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--charcoal);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* news featured (large) */
.news-card.is-featured { grid-column: span 7; grid-row: span 2; }
.news-card.is-featured .news-img { aspect-ratio: 16 / 10; }
.news-card.is-featured .news-title { font-size: clamp(26px, 2.4vw, 38px); line-height: 1.2; }
.news-card.is-featured .news-title .accent {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.news-card.is-featured .news-excerpt {
  font-size: 16px;
  -webkit-line-clamp: 3;
  margin-top: 4px;
}

.news-card.is-secondary { grid-column: span 5; }
.news-card.is-tertiary { grid-column: span 4; }

@media (max-width: 1100px) {
  .news-card.is-featured { grid-column: span 12; }
  .news-card.is-secondary { grid-column: span 6; }
  .news-card.is-tertiary { grid-column: span 6; }
}

/* ============= ALERT CENTER ============= */
.alert-center {
  background: var(--paper);
  padding: 100px 32px;
  border-top: 1px solid var(--rule);
}

.alert-center .ac-wrap {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: start;
}

.alert-tabs {
  display: flex; gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.alert-tabs .tab {
  position: relative;
  padding: 12px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  transition: color 0.2s;
}

.alert-tabs .tab .count {
  display: inline-block;
  margin-left: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--haze);
  border-radius: 99px;
  color: var(--charcoal);
}

.alert-tabs .tab.is-active {
  color: var(--ink);
}

.alert-tabs .tab.is-active::after {
  content: '';
  position: absolute;
  left: 18px; right: 18px;
  bottom: -1px;
  height: 2px;
  background: var(--ember);
}

.alert-tabs .tab.is-active .count { background: var(--ember); color: white; }

.alert-list {
  display: flex; flex-direction: column;
  gap: 0;
}

.alert-item {
  display: grid;
  grid-template-columns: 4px 60px 1fr auto;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
  align-items: center;
}

.alert-item:hover { background: rgba(255, 252, 247, 0.6); }

.alert-item .severity-bar {
  height: 100%; border-radius: 99px;
  min-height: 56px;
}

.alert-item[data-severity="critical"] .severity-bar { background: var(--alert); }
.alert-item[data-severity="warn"] .severity-bar { background: var(--warn); }
.alert-item[data-severity="info"] .severity-bar { background: var(--gold); }
.alert-item[data-severity="event"] .severity-bar { background: var(--ember); }
.alert-item[data-severity="weather"] .severity-bar { background: var(--water); }

.alert-item .alert-time {
  display: flex; flex-direction: column;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.3;
  color: var(--mute);
  text-align: right;
}

.alert-item .alert-time .day {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.alert-item .alert-time .hr { color: var(--ember); }

.alert-item .alert-body { min-width: 0; }

.alert-item .alert-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* Inline date/time chip — hidden by default, shown on mobile when side column hidden */
.alert-item .alert-when { display: none; }

.alert-item[data-severity="critical"] .alert-tag { background: rgba(200, 48, 47, 0.1); color: var(--alert); }
.alert-item[data-severity="warn"] .alert-tag { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.alert-item[data-severity="info"] .alert-tag { background: rgba(244, 184, 96, 0.18); color: var(--amber); }
.alert-item[data-severity="event"] .alert-tag { background: rgba(232, 84, 28, 0.1); color: var(--ember); }
.alert-item[data-severity="weather"] .alert-tag { background: rgba(37, 99, 235, 0.1); color: var(--water); }

.alert-item .alert-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 4px 0;
}

.alert-item .alert-source {
  font-size: 12px;
  color: var(--mute);
}

.alert-item .alert-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--haze);
  color: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.alert-item:hover .alert-arrow {
  background: var(--ink);
  color: var(--cream);
  transform: scale(1.1);
}

/* alert side panel — emergency hotline */
.alert-aside {
  position: sticky;
  top: 100px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  color: var(--cream);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.alert-aside::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232, 84, 28, 0.4), transparent 70%);
  filter: blur(40px);
  animation: blobFloat1 14s ease-in-out infinite;
}

.alert-aside .aside-eyebrow {
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  position: relative;
  z-index: 1;
}

.alert-aside .aside-title {
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px 0;
  position: relative;
  z-index: 1;
}

.alert-aside .aside-title .accent {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.alert-aside .aside-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 248, 240, 0.75);
  margin: 0 0 24px 0;
  position: relative;
  z-index: 1;
}

.alert-aside .hotline {
  font-family: "Fraunces", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--cream);
  display: block;
  margin-bottom: 4px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.alert-aside .hotline-label {
  font-size: 12px; color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.alert-aside .channels {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.alert-aside .channels a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: rgba(255, 208, 137, 0.08);
  border: 1px solid rgba(255, 208, 137, 0.18);
  border-radius: 12px;
  color: var(--cream);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.alert-aside .channels a:hover {
  background: rgba(244, 184, 96, 0.18);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.alert-aside .channels a i {
  font-size: 16px;
  color: var(--gold);
}

/* ============= RECENT EVENTS / TIMELINE ============= */
.events-section {
  background: var(--cream);
  padding: 100px 32px;
  position: relative;
}

.events-section .ev-wrap {
  max-width: 1380px; margin: 0 auto;
}

.events-list {
  position: relative;
  padding-left: 32px;
}

.events-list::before {
  content: '';
  position: absolute;
  left: 11px; top: 12px; bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--rule), var(--ember-bright), var(--rule));
}

.event-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 24px 0;
  align-items: center;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer;
  transition: padding 0.3s ease;
}

.event-item:hover { padding-left: 8px; }

.event-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ember);
  z-index: 2;
  transition: transform 0.3s, box-shadow 0.3s;
}

.event-item[data-severity="critical"]::before { border-color: var(--alert); box-shadow: 0 0 0 4px rgba(200, 48, 47, 0.15); }
.event-item[data-severity="high"]::before { border-color: var(--ember); box-shadow: 0 0 0 4px rgba(232, 84, 28, 0.15); }
.event-item[data-severity="medium"]::before { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15); }
.event-item[data-severity="low"]::before { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 184, 96, 0.15); }

.event-item:hover::before { transform: translateY(-50%) scale(1.4); }

.event-item .ev-main {
  display: flex; align-items: center; gap: 18px;
  min-width: 0;
}

.event-item .ev-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--haze);
  color: var(--ember);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.event-item[data-type="flood"] .ev-icon { background: rgba(37, 99, 235, 0.1); color: var(--water); }
.event-item[data-type="storm"] .ev-icon { background: rgba(168, 85, 247, 0.1); color: #9333ea; }
.event-item[data-type="fire"] .ev-icon { background: rgba(220, 38, 38, 0.1); color: var(--alert); }

.event-item .ev-text {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}

.event-item .ev-title {
  font-size: 17px; font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.event-item .ev-meta {
  display: flex; gap: 14px;
  font-size: 13px; color: var(--mute);
  align-items: center;
  flex-wrap: wrap;
}

.event-item .ev-meta .item {
  display: inline-flex; align-items: center; gap: 5px;
}

.event-item .ev-meta .item i { font-size: 11px; }

.event-item .ev-stat {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.event-item .ev-affected {
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.event-item .ev-affected .unit {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--mute);
  margin-left: 3px;
  font-weight: 500;
}

.event-item .ev-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.event-item[data-status="pending"] .ev-status { background: rgba(217, 119, 6, 0.12); color: var(--warn); }
.event-item[data-status="in_progress"] .ev-status { background: rgba(232, 84, 28, 0.12); color: var(--ember); }
.event-item[data-status="resolved"] .ev-status { background: rgba(5, 150, 105, 0.12); color: var(--safe); }

/* ============= QUICK ACTIONS ============= */
.actions-section {
  background: var(--ink);
  color: var(--cream);
  padding: 100px 32px;
  position: relative;
  overflow: hidden;
}

.actions-section::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232, 84, 28, 0.25), transparent 70%);
  filter: blur(60px);
  animation: blobFloat1 20s ease-in-out infinite;
  pointer-events: none;
}

.actions-section::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(244, 184, 96, 0.18), transparent 70%);
  filter: blur(60px);
  animation: blobFloat2 24s ease-in-out infinite;
  pointer-events: none;
}

.actions-section .as-wrap {
  max-width: 1380px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.actions-section .section-eyebrow { color: var(--gold); }
.actions-section .section-eyebrow::before { background: var(--gold); }
.actions-section .section-eyebrow .index-num { color: rgba(255, 208, 137, 0.5); }
.actions-section .section-title { color: var(--cream); }
.actions-section .section-title .accent { color: var(--gold); }
.actions-section .section-subtitle { color: rgba(255, 248, 240, 0.65); }

.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.action-card {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 248, 240, 0.04);
  border: 1px solid rgba(244, 184, 96, 0.12);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: flex; flex-direction: column;
  gap: 18px;
  min-height: 200px;
  cursor: pointer;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 84, 28, 0.18), rgba(244, 184, 96, 0.1));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.action-card > * { position: relative; z-index: 1; }

.action-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 24px 48px -16px rgba(232, 84, 28, 0.4);
}

.action-card:hover::before { opacity: 1; }

.action-card .ac-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(244, 184, 96, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 22px;
  transition: all 0.3s ease;
}

.action-card:hover .ac-icon {
  background: var(--gold);
  color: var(--ink);
  transform: scale(1.1) rotate(-6deg);
}

.action-card .ac-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cream);
  margin: 0;
}

.action-card .ac-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 248, 240, 0.6);
  margin: 0;
  flex: 1;
}

.action-card .ac-arrow {
  display: inline-flex;
  align-items: center; gap: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: auto;
}

.action-card .ac-arrow i {
  transition: transform 0.3s ease;
}

.action-card:hover .ac-arrow i { transform: translateX(4px); }

/* ============= FOOTER ============= */
.landing-footer {
  background: var(--night);
  color: rgba(255, 248, 240, 0.85);
  padding: 80px 32px 40px;
  position: relative;
  overflow: hidden;
}

.landing-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember) 50%, transparent);
  opacity: 0.5;
}

.landing-footer .footer-wrap {
  max-width: 1380px;
  margin: 0 auto;
}

.landing-footer .footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(244, 184, 96, 0.12);
}

.landing-footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-footer .footer-brand img {
  width: 64px; height: 64px;
  filter: drop-shadow(0 4px 8px rgba(232, 84, 28, 0.3));
}

.landing-footer .footer-brand h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--cream);
  margin: 0;
  letter-spacing: -0.01em;
}

.landing-footer .footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 248, 240, 0.6);
  max-width: 320px;
  margin: 0;
}

.landing-footer .footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px 0;
}

.landing-footer .footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}

.landing-footer .footer-col a {
  font-size: 14px;
  color: rgba(255, 248, 240, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.landing-footer .footer-col a:hover { color: var(--gold); }

.landing-footer .newsletter input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 248, 240, 0.06);
  border: 1px solid rgba(244, 184, 96, 0.15);
  border-radius: 10px;
  color: var(--cream);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.landing-footer .newsletter input::placeholder { color: rgba(255, 248, 240, 0.4); }
.landing-footer .newsletter input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 208, 137, 0.06);
}

.landing-footer .newsletter button {
  width: 100%;
  padding: 12px;
  background: var(--ember);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.landing-footer .newsletter button:hover {
  background: var(--ember-bright);
  transform: translateY(-1px);
}

.landing-footer .footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: rgba(255, 248, 240, 0.45);
}

.landing-footer .footer-bottom .socials {
  display: flex; gap: 8px;
}

.landing-footer .footer-bottom .socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 208, 137, 0.06);
  border: 1px solid rgba(244, 184, 96, 0.15);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.landing-footer .footer-bottom .socials a:hover {
  background: var(--ember);
  color: white;
  border-color: var(--ember);
}

/* ============= REVEAL ON SCROLL ============= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger.is-visible > * {
  opacity: 1; transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* ============= LANDING MODE — HIDE SIDEBAR ON DESKTOP ============= */
.landing-mode aside.sidebar {
  display: none !important;
}

@media (max-width: 767px) {
  /* On mobile keep sidebar overlay accessible (used for hamburger toggle) */
  .landing-mode aside.sidebar { display: flex !important; }
}

.landing-mode > main {
  margin-left: 0 !important;
}

/* Landing now uses the same global MobileTabbar (teleported from Sidebar.js).
   No need to hide it here — keep visible on landing for consistency. */
body.landing-active .mobile-bottom-nav {
  display: none !important; /* legacy class — old builds */
}

/* ============= MOBILE BOTTOM TAB BAR (mobile-app pattern) ============= */
.landing .m-tabbar { display: none; }

@media (max-width: 768px) {
  .landing .m-tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(255, 252, 247, 0.92);
    backdrop-filter: saturate(160%) blur(24px);
    -webkit-backdrop-filter: saturate(160%) blur(24px);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -2px 16px rgba(58, 31, 13, 0.08);
    z-index: 100;
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    align-items: center;
    justify-content: space-around;
    gap: 4px;
  }

  /* Push content above the fixed tab bar */
  body.landing-active .landing {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

.landing .m-tab {
  flex: 1;
  max-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  font-size: 10px;
  color: var(--mute);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.landing .m-tab .m-tab-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing .m-tab .m-tab-icon { font-size: 19px; line-height: 1; }
.landing .m-tab .m-tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.1; }

.landing .m-tab:active { transform: scale(0.92); }

.landing .m-tab.is-active { color: var(--ember); }
.landing .m-tab.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--ember);
  border-radius: 0 0 99px 99px;
}

.landing .m-tab .m-tab-badge {
  position: absolute;
  top: -5px; right: -10px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--alert);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
  font-family: "JetBrains Mono", monospace;
}

/* Center FAB — emergency call */
.landing .m-tab-fab {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember-bright), var(--ember));
  color: white;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-top: -22px;
  text-decoration: none;
  font-size: 22px;
  box-shadow:
    0 8px 20px rgba(232, 84, 28, 0.45),
    0 0 0 4px var(--paper),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing .m-tab-fab:active {
  transform: scale(0.92);
}

.landing .m-tab-fab .fab-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--ember);
  opacity: 0.4;
  animation: fabRing 2.2s infinite;
  z-index: -1;
}

@keyframes fabRing {
  0%   { transform: scale(0.92); opacity: 0.55; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1100px) {
  .hero { padding: 60px 24px 80px; min-height: auto; }
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .gauge-card { max-width: 480px; }
  .status-strip .grid { grid-template-columns: 1fr 1fr; }
  .alert-center .ac-wrap { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-footer .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* ---- Ticker ---- */
  .landing-ticker { height: 34px; font-size: 12px; }
  .landing-ticker .live-tag { padding: 0 11px; font-size: 10px; letter-spacing: 0.14em; }
  .landing-ticker .marquee-track { gap: 36px; padding-left: 16px; animation-duration: 80s; }
  .landing-ticker .ticker-item .sev { font-size: 9px; padding: 2px 6px; }
  .landing-ticker .clock { padding: 0 12px; font-size: 11px; }

  /* ---- Nav ---- */
  .landing-nav .nav-links { display: none; }
  .landing-nav .nav-inner { padding: 12px 16px; gap: 12px; }
  .landing-nav .menu-toggle { display: flex; }
  /* Larger, more prominent logo on mobile (presence + brand recognition) */
  .landing-nav .brand img {
    width: 56px; height: 56px;
    filter: drop-shadow(0 6px 14px rgba(232, 84, 28, 0.18));
  }
  .landing-nav .brand .brand-name { font-size: 15px; font-weight: 700; }
  .landing-nav .brand .brand-sub { font-size: 9px; letter-spacing: 0.16em; }
  .landing-nav .nav-actions { gap: 8px; }
  .landing-nav .icon-btn { width: 38px; height: 38px; }
  .landing-nav .nav-actions .btn-ember { padding: 8px 14px !important; font-size: 12px !important; min-height: 38px; }

  /* ---- Hero (refined "Civic Sunrise" mobile layout) ---- */
  .hero { padding: 18px 16px 36px; min-height: auto; }
  .hero-content { gap: 24px; }
  .hero-text .eyebrow {
    font-size: 9px;
    padding: 5px 11px 5px 9px;
    margin-bottom: 14px;
    letter-spacing: 0.2em;
  }
  /* Compact hero h1 — single visual line, bold display */
  .hero-text h1 {
    font-size: clamp(28px, 8.5vw, 42px);
    line-height: 1.05;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
  }
  .hero-text h1 .line:nth-child(2) { padding-left: 14px; }
  .hero-text .lede {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 20px;
    color: var(--charcoal);
  }
  .hero-cta { gap: 10px; }
  .hero-cta .btn-ember,
  .hero-cta .btn-ghost { width: 100%; justify-content: center; padding: 14px 20px; font-size: 14px; min-height: 48px; }
  /* Mobile stats: compact, bold display numbers, dividers between */
  .hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    margin: 0 0 28px 0;
    padding: 14px 18px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 18px;
    box-shadow:
      0 1px 2px rgba(58, 31, 13, 0.03),
      0 6px 16px -10px rgba(232, 84, 28, 0.1);
  }
  .hero-meta .stat {
    flex: 1;
    text-align: center;
    position: relative;
  }
  .hero-meta .stat + .stat::before {
    content: '';
    position: absolute;
    left: 0; top: 12%; bottom: 12%;
    width: 1px;
    background: var(--rule);
  }
  .hero-meta .stat .num {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ink);
  }
  .hero-meta .stat .num-suffix {
    font-size: 12px;
    color: var(--mute);
    margin-left: 1px;
  }
  .hero-meta .stat .label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.04em;
    color: var(--mute);
    margin-top: 2px;
    font-weight: 500;
  }

  /* ---- Gauge card (iOS Wallet-style depth) ---- */
  .gauge-card {
    padding: 20px;
    border-radius: 24px;
    box-shadow:
      0 1px 2px rgba(58, 31, 13, 0.04),
      0 8px 24px -12px rgba(232, 84, 28, 0.18),
      0 24px 48px -24px rgba(58, 31, 13, 0.18);
  }
  .gauge-card .gc-header { margin-bottom: 20px; }
  .gauge-card .gc-station .id { font-size: 10px; }
  .gauge-card .gc-station .name { font-size: 15px; }
  .gauge-card .gc-station .src { font-size: 10px; }
  .gauge-card .gc-live { font-size: 9px; padding: 3px 8px; }
  .gauge-card .gc-body { grid-template-columns: 64px 1fr; gap: 18px; }
  .gauge-tube { width: 64px; height: 200px; border-radius: 14px; }
  .gauge-info .level-display { font-size: 44px; }
  .gauge-info .level-unit { font-size: 11px; }
  .gauge-marker .label { font-size: 9px; left: calc(100% + 6px); }
  .gauge-thresholds { font-size: 10px; margin-top: 12px; padding-top: 12px; }

  /* ---- Hero slider controls (avoid overlap with content) ---- */
  .hero-slider-controls { bottom: 16px; left: 16px; right: 16px; }
  .slider-dots button { width: 22px; height: 4px; }
  .slider-dots button.is-active { width: 44px; }
  .slider-arrows button { width: 38px; height: 38px; }

  /* ---- Section frames ---- */
  .status-strip { padding: 56px 16px; }
  .news-section, .alert-center, .events-section, .actions-section { padding: 56px 16px; }
  .landing-footer { padding: 56px 16px 28px; }

  /* ---- Section header (always stack vertically on mobile) ---- */
  .status-strip .strip-header,
  .news-section .strip-header,
  .events-section .strip-header,
  .actions-section .strip-header,
  .alert-center .ac-wrap > div > .reveal {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .section-eyebrow { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 10px; }
  .section-title { font-size: clamp(24px, 6.5vw, 36px); }
  .section-subtitle { font-size: 14px; text-align: left; max-width: 100%; }

  /* ---- Status cards ---- */
  .status-strip .grid { grid-template-columns: 1fr; gap: 14px; }
  .status-card { padding: 20px; min-height: 0; border-radius: 18px; }
  .status-card .sc-value { font-size: clamp(36px, 10vw, 48px); }
  .status-card .sc-foot { padding-top: 12px; font-size: 11px; gap: 8px; }
  .status-card .sc-icon { width: 40px; height: 40px; font-size: 16px; }
  .status-card .sc-tag { font-size: 9px; padding: 3px 7px; }

  /* ---- News (horizontal scroll on mobile) ---- */
  .news-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    gap: 14px;
    padding: 4px 16px 20px;
    /* extend scroll area to viewport edges */
    margin: 0 -16px -4px;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .news-grid::-webkit-scrollbar { display: none; }

  /* Each card: fixed width, snap-aligned, card-style with shadow */
  .news-card.is-featured,
  .news-card.is-secondary,
  .news-card.is-tertiary {
    grid-column: auto;
    flex: 0 0 78%;          /* ~78% of viewport — leaves a peek of the next card */
    max-width: 320px;
    scroll-snap-align: start;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 2px 8px -4px rgba(58, 31, 13, 0.1);
  }
  .news-card.is-featured { flex-basis: 86%; max-width: 360px; }

  .news-card .news-img { aspect-ratio: 4 / 3; border-radius: 12px; margin-bottom: 12px; }
  .news-card .news-cat { font-size: 10px; padding: 4px 9px; top: 10px; left: 10px; }
  .news-card .news-title { font-size: 15px; line-height: 1.35; }
  .news-card.is-featured .news-title { font-size: 17px; line-height: 1.3; }
  .news-card .news-excerpt { font-size: 12px; -webkit-line-clamp: 2; }
  .news-card.is-featured .news-excerpt { -webkit-line-clamp: 2; }
  .news-card .news-meta { font-size: 10px; gap: 8px; margin-bottom: 8px; }

  /* Subtle scroll-hint shadow on right edge of news section */
  .news-section { position: relative; }
  .news-section::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, transparent, var(--cream));
    pointer-events: none;
    z-index: 2;
  }

  /* ---- Alert center ---- */
  .alert-center .ac-wrap { grid-template-columns: 1fr; gap: 32px; }
  /* Keep position:relative (NOT static) so the absolute-positioned ::before blob
     stays anchored inside this element and gets clipped by overflow:hidden.
     With position:static the ::before would escape to a far-up positioned ancestor
     and cause page-wide horizontal overflow. */
  .alert-aside { position: relative; padding: 24px; border-radius: 20px; }
  .alert-aside .aside-title { font-size: 22px; }
  .alert-aside .hotline { font-size: 32px; }
  .alert-aside .channels { gap: 6px; }
  .alert-aside .channels a { padding: 10px; font-size: 12px; }
  .alert-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .alert-tabs::-webkit-scrollbar { display: none; }
  .alert-tabs .tab { white-space: nowrap; flex-shrink: 0; padding: 10px 14px; font-size: 13px; }

  /* Show date+time inline (replace hidden side column) */
  .alert-item { grid-template-columns: 4px 1fr auto; gap: 12px; padding: 16px 0; }
  .alert-item .alert-time { display: none; }
  .alert-item .alert-tag { font-size: 9px; padding: 3px 7px; }
  .alert-item .alert-when {
    display: inline-block;
    margin-left: 6px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    color: var(--mute);
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .alert-item .alert-title { font-size: 14px; line-height: 1.45; }
  .alert-item .alert-source { font-size: 11px; }
  .alert-item .alert-arrow { width: 32px; height: 32px; }

  /* ---- Events timeline ---- */
  .events-list { padding-left: 22px; }
  .events-list::before { left: 8px; }
  .event-item { padding: 18px 0; gap: 12px; }
  .event-item::before { left: -22px; width: 12px; height: 12px; }
  .event-item .ev-main { gap: 12px; }
  .event-item .ev-icon { width: 42px; height: 42px; font-size: 16px; border-radius: 12px; }
  .event-item .ev-title { font-size: 14px; }
  .event-item .ev-meta { font-size: 11px; gap: 10px; }
  .event-item .ev-affected { font-size: 18px; }
  .event-item .ev-affected .unit { font-size: 9px; }
  .event-item .ev-status { font-size: 9px; padding: 3px 7px; }

  /* ---- Quick actions: APP-LAUNCHER style on mobile ---- */
  /* Convert dark section to neutral cream so colorful icons pop, like a phone home screen */
  .actions-section {
    background: var(--paper);
    color: var(--ink);
    padding: 40px 16px 32px;
  }
  .actions-section::before,
  .actions-section::after { display: none; }  /* remove dark blobs */
  .actions-section .section-eyebrow { color: var(--ember); }
  .actions-section .section-eyebrow::before { background: var(--ember); }
  .actions-section .section-eyebrow .index-num { color: var(--mute); }
  .actions-section .section-title { color: var(--ink); }
  .actions-section .section-title .accent { color: var(--ember); }
  .actions-section .section-subtitle { color: var(--charcoal); }

  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 6px;
    margin-top: 24px;
  }

  /* Each action becomes a clean app-icon tile: colorful square on top + label below */
  .action-card {
    padding: 0;
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    gap: 8px;
    text-align: center;
    align-items: center;
    overflow: visible;
  }
  .action-card::before { display: none; }
  .action-card:hover { transform: none; box-shadow: none; border: none; }

  .action-card .ac-icon {
    width: 56px; height: 56px;
    border-radius: 18px;
    font-size: 22px;
    margin: 0 auto;
    box-shadow:
      0 6px 14px -6px rgba(58, 31, 13, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: white !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Distinct color per action — like a real app launcher.
     Using nth-child since template order is stable. */
  .action-card:nth-child(1) .ac-icon { background: linear-gradient(135deg, #DD4B14, #F26E3D); }      /* แดชบอร์ด — ember */
  .action-card:nth-child(2) .ac-icon { background: linear-gradient(135deg, #2563EB, #60A5FA); }      /* สถิติน้ำ — water blue */
  .action-card:nth-child(3) .ac-icon { background: linear-gradient(135deg, #EA8B2C, #F4B860); }      /* อากาศ — amber */
  .action-card:nth-child(4) .ac-icon { background: linear-gradient(135deg, #D97706, #F59E0B); }      /* แจ้งเตือน — warn */
  .action-card:nth-child(5) .ac-icon { background: linear-gradient(135deg, #1A0F0A, #3D2E26); }      /* ภารกิจ — ink */
  .action-card:nth-child(6) .ac-icon { background: linear-gradient(135deg, #C8302F, #DC2626); }      /* ฉุกเฉิน — alert */

  .action-card:active .ac-icon { transform: scale(0.92); }

  .action-card > div {
    flex: 0 1 auto;
    width: 100%;
  }
  .action-card .ac-title {
    font-size: 11px;
    line-height: 1.25;
    color: var(--charcoal) !important;
    font-weight: 600;
  }
  .action-card .ac-desc { display: none; }
  .action-card .ac-arrow { display: none; }
  .action-card:active { transform: scale(0.95); }

  /* ---- Hero CTAs: refined iOS-style tile cards with depth ---- */
  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
  }
  .hero-cta .btn-ember,
  .hero-cta .btn-ghost {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    height: 92px;
    padding: 14px 14px 12px;
    border-radius: 20px;
    gap: 4px;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    /* iOS-style multi-layer soft shadow */
    box-shadow:
      0 1px 1px rgba(58, 31, 13, 0.04),
      0 6px 16px -8px rgba(232, 84, 28, 0.18),
      0 12px 32px -16px rgba(58, 31, 13, 0.12);
  }
  .hero-cta .btn-ember {
    /* Slightly elevated brand tile — keep dark for primary contrast */
    box-shadow:
      0 1px 2px rgba(26, 15, 10, 0.08),
      0 8px 20px -8px rgba(232, 84, 28, 0.32),
      0 16px 36px -16px rgba(26, 15, 10, 0.18);
  }
  .hero-cta .btn-ghost {
    background: var(--paper);
    border: 1px solid var(--rule);
  }
  .hero-cta .btn-ember > span:first-child,
  .hero-cta .btn-ghost > span:first-child {
    flex: 1;
  }
  .hero-cta .btn-ember .arrow,
  .hero-cta .btn-ghost .arrow,
  .hero-cta .btn-ember > i:first-child,
  .hero-cta .btn-ghost > i:first-child {
    font-size: 18px;
    align-self: flex-start;
    opacity: 0.7;
  }

  /* ---- Footer ---- */
  .landing-footer .footer-top { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
  .landing-footer .footer-brand img { width: 52px; height: 52px; }
  .landing-footer .footer-brand h3 { font-size: 20px; }
  .landing-footer .footer-brand p { font-size: 12px; }
  .landing-footer .footer-col h4 { font-size: 10px; margin-bottom: 12px; }
  .landing-footer .footer-col a { font-size: 13px; }
  .landing-footer .footer-bottom { font-size: 11px; gap: 16px; }
}

/* Narrow phones (iPhone SE, small Android) */
@media (max-width: 420px) {
  /* Ticker compact */
  .landing-ticker { height: 32px; font-size: 11px; }
  .landing-ticker .live-tag { padding: 0 9px; font-size: 9px; }
  .landing-ticker .clock { display: none; }
  .landing-ticker .ticker-item .sev { display: none; } /* tag is repeated in alert-tag */

  /* Nav: tighten — login button becomes icon-only, but logo stays prominent */
  .landing-nav .nav-inner { padding: 10px 14px; gap: 8px; }
  .landing-nav .brand .brand-sub { display: none; }
  .landing-nav .brand img { width: 50px; height: 50px; }
  .landing-nav .brand .brand-name { font-size: 14px; }
  .landing-nav .nav-actions .btn-ember span { display: none; }
  .landing-nav .nav-actions .btn-ember {
    width: 38px; height: 38px;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center;
  }
  .landing-nav .nav-actions .btn-ember i { font-size: 13px !important; margin: 0; }

  /* Hero: stack gauge tube above info, smaller display */
  .hero { padding: 28px 14px 48px; }
  .hero-text h1 { font-size: clamp(32px, 12vw, 48px); }
  .hero-text h1 .line:nth-child(2) { padding-left: 18px; }
  .hero-meta { gap: 16px; margin-top: 24px; }
  .hero-meta .stat .num { font-size: 24px; }
  .hero-meta .stat .label { font-size: 9px; }

  .gauge-card { padding: 18px; }
  .gauge-card .gc-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gauge-card .gc-body { grid-template-columns: 56px 1fr; gap: 14px; }
  .gauge-tube { width: 56px; height: 180px; }
  .gauge-info .level-display { font-size: 40px; }

  /* Sections: tighter padding */
  .status-strip,
  .news-section,
  .alert-center,
  .events-section,
  .actions-section { padding: 44px 14px; }
  .landing-footer { padding: 48px 14px 24px; }

  .section-title { font-size: clamp(22px, 7vw, 30px); }
  .section-subtitle { font-size: 13px; }

  .status-card .sc-value { font-size: 36px; }
  .status-card .sc-icon { width: 36px; height: 36px; font-size: 14px; }

  .news-card .news-title { font-size: 16px; line-height: 1.35; }
  .news-card.is-featured .news-title { font-size: 22px; line-height: 1.25; }

  .alert-aside .hotline { font-size: 28px; }
  .alert-aside .channels { grid-template-columns: 1fr; }

  .event-item .ev-meta { gap: 8px; }
  .event-item .ev-meta .item span:not([class]) { display: none; }

  /* Quick actions stay 3-col grid even on narrow phones — just smaller padding */
  .actions-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .action-card { padding: 14px 6px; min-height: 100px; }
  .action-card .ac-title { font-size: 11px; line-height: 1.25; }
  .action-card .ac-icon { width: 40px; height: 40px; font-size: 16px; }

  .landing-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* iOS safe areas + reduced motion */
@supports (padding: max(0px)) {
  .landing-nav .nav-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

@media (prefers-reduced-motion: reduce) {
  .landing *,
  .landing *::before,
  .landing *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  /* Force final state for any element that uses an entrance animation */
  .landing .hero-text .eyebrow,
  .landing .hero-text h1 .line,
  .landing .hero-text .lede,
  .landing .hero-cta,
  .landing .hero-meta,
  .landing .gauge-card,
  .landing .reveal,
  .landing .reveal-stagger,
  .landing .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-slide.is-active .slide-bg { animation: none !important; }
}
