/* Phase A — visual stabilization for the public homepage.
   Hero readability is independent from the global light/dark text palette. */

:root {
  --hero-bg: #0b2629;
  --hero-text: #fff4dd;
  --hero-muted: rgba(255, 242, 218, 0.9);
  --hero-line: rgba(234, 208, 142, 0.22);
  --hero-image: none;
  --on-image-title: #fff4dd;
  --on-image-body: #f5dfb7;
}

.topbar { grid-template-columns: 220px minmax(0, 1fr) 340px; padding-inline: 24px; }
.brand { gap: 9px; font-weight: 900; letter-spacing: -.02em; }
.mark {
  width: 46px !important; height: 46px !important; border: 0 !important; border-radius: 0 !important;
  padding: 0 !important; font-size: 0 !important; background-color: transparent !important;
  background-image: url('/brand/sowghati-pixel-128.png?v=20260826c') !important;
  background-repeat: no-repeat !important; background-position: center !important; background-size: 44px 44px !important;
  box-shadow: none !important; image-rendering: pixelated; filter: drop-shadow(0 7px 14px rgba(0,0,0,.16));
}
html[data-mode="light"] .mark { filter: drop-shadow(0 5px 10px rgba(88,55,20,.14)); }
.tools { gap: 8px; }
.langs { background: transparent; border-color: color-mix(in srgb, var(--line) 76%, transparent); }
.theme-controls { gap: 7px; }
.palette { width: 19px; height: 19px; opacity: .72; transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease; }
.palette:hover,.palette[aria-pressed="true"] { opacity: 1; transform: scale(1.08); }
.palette[aria-pressed="true"] { outline-width: 1px; outline-offset: 3px; }
.mode { width: 40px; height: 40px; background: rgba(255,255,255,.035); }

.hero {
  position: relative !important; min-height: 510px; height: auto; padding: 0 !important; display: flex;
  align-items: stretch; justify-content: flex-start; text-align: start; overflow: hidden; isolation: isolate;
  background: var(--hero-bg) !important;
}
.hero > picture { display: none !important; }
.hero::before {
  content: ""; position: absolute; inset: -2%; z-index: 0; pointer-events: none;
  background-color: #16393b; background-image: var(--hero-image); background-size: cover;
  background-position: center center; background-repeat: no-repeat; filter: saturate(1.035) contrast(1.015) brightness(1.01);
  transform: scale(1.018) translate3d(0,0,0); transform-origin: 62% 50%;
  animation: heroKenBurns 30s cubic-bezier(.45,.05,.55,.95) infinite alternate; transition: opacity .65s ease; will-change: transform, opacity;
}
.hero.is-swapping::before { opacity: .42; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(circle at 76% 18%,rgba(219,172,82,.08),transparent 33%),
    linear-gradient(90deg,
      rgba(7,38,43,.76) 0%,
      rgba(8,42,47,.70) 18%,
      rgba(9,44,48,.60) 32%,
      rgba(10,43,46,.46) 46%,
      rgba(10,39,42,.30) 59%,
      rgba(9,31,34,.14) 72%,
      rgba(8,25,28,.04) 84%,
      rgba(8,25,28,0) 100%) !important;
}
.hero-copy { position: relative; z-index: 3; width: 54%; max-width: 760px; margin-right: auto; margin-left: 0; padding: 64px 34px 58px 58px; align-self: center; color: var(--hero-text); }
.hero .eyebrow { display: inline-flex; margin: 0 0 14px; color: var(--gold2) !important; font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.hero h1,html[data-mode="light"] .hero h1 { max-width: 660px; min-height: 2.55em; margin: 0 0 16px; color: var(--hero-text) !important; font-size: clamp(42px,4vw,58px); line-height: 1.28; font-weight: 900; text-wrap: balance; text-shadow: 0 4px 24px rgba(2,16,18,.30); }
.hero h1.typing::after { content:""; display:inline-block; width:2px; height:.9em; margin-inline-start:.12em; vertical-align:-.07em; background:var(--gold2); animation:heroCaret .72s step-end infinite; }
.hero p,html[data-mode="light"] .hero p { max-width:650px; margin:0 0 26px; color:var(--hero-muted) !important; font-size:18px; line-height:1.95; text-shadow:0 2px 14px rgba(2,16,18,.18) !important; }
.hero .cta-row { justify-content:flex-start; gap:11px; }
.hero .btn { min-height:48px; min-width:158px; box-shadow:0 12px 28px rgba(0,0,0,.18); }
.hero .btn.secondary { background:rgba(8,37,40,.32); border-color:rgba(255,244,218,.30); color:var(--hero-text); box-shadow:none; backdrop-filter:blur(8px); }
.hero .btn.secondary:hover { background:rgba(9,44,47,.48); }

/* Text that lives on photography must never inherit the light-theme body ink. */
.city-copy h3,
html[data-mode="light"] .city-copy h3 {
  color: var(--on-image-title) !important;
  text-shadow: 0 2px 14px rgba(5, 12, 12, .72), 0 1px 2px rgba(0, 0, 0, .5);
}
.city-copy p,
html[data-mode="light"] .city-copy p {
  color: var(--on-image-body) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .54);
}

@keyframes heroKenBurns {
  0% { transform:scale(1.018) translate3d(0,0,0); }
  50% { transform:scale(1.048) translate3d(-.55%,.18%,0); }
  100% { transform:scale(1.072) translate3d(-1.05%,.38%,0); }
}
@keyframes heroCaret { 0%,46%{opacity:1} 47%,100%{opacity:0} }

@media (max-width:1220px) {
  .topbar { grid-template-columns:190px minmax(0,1fr) 300px; }
  .hero-copy { width:57%; padding-inline:42px 28px; }
  .hero h1 { font-size:clamp(40px,4.6vw,54px); }
}
@media (max-width:1000px) {
  .topbar { grid-template-columns:auto 1fr auto; }
  .theme-controls .palette { display:none !important; }
  .hero { min-height:0; display:grid; grid-template-rows:310px auto; background:#0d2b2e !important; }
  .hero::before { top:-2%; right:-2%; left:-2%; bottom:auto; width:auto; height:320px; background-position:66% center; transform-origin:66% 50%; }
  .hero::after { top:0; right:0; left:0; bottom:auto; height:310px; background:linear-gradient(180deg,rgba(9,38,41,.01) 0%,rgba(9,38,41,.02) 52%,rgba(11,42,45,.34) 78%,#0d2b2e 100%) !important; }
  .hero-copy { grid-row:2; width:100%; max-width:760px; margin:0 auto; padding:34px 34px 42px; text-align:center; }
  .hero h1,.hero p { margin-inline:auto; }
  .hero h1 { min-height:0; }
  .hero .cta-row { justify-content:center; }
}
@media (max-width:680px) {
  /* Restore the compact inset overridden by the desktop phase-A rule. */
  .topbar { padding-inline:11px; }
  .tools { gap:6px; } .langs { padding:2px; } .mode { width:38px; height:38px; }
  .mark { width:40px !important; height:40px !important; background-size:38px 38px !important; }
  .hero { grid-template-rows:238px auto; }
  .hero::before,.hero::after { height:246px; }
  .hero::before { background-position:68% center; }
  .hero-copy { padding:28px 20px 34px; }
  .hero .eyebrow { font-size:13px; margin-bottom:10px; }
  .hero h1,html[data-mode="light"] .hero h1 { font-size:clamp(31px,9vw,39px); line-height:1.34; }
  .hero p,html[data-mode="light"] .hero p { font-size:15px; line-height:1.9; margin-bottom:22px; }
  .hero .cta-row { display:grid; grid-template-columns:1fr; width:min(100%,360px); margin-inline:auto; }
  .hero .btn { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .palette { transition:none; }
  .hero::before { animation:none !important; transform:scale(1.015) !important; }
  .hero h1.typing::after { display:none; }
}
