/* Design system companion: semantic theme vars, native UI primitives
   (toast, drawer, dialog), Django widget styling, status pills, maps, motion. */

/* --- Semantic theme vars --- */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --paper: #F6F6F8;
  --ink: #101014;
  --accent: #C49A5C;
  --cta: #FFB703;
  --line: #E5E5EA;
  --muted: #64748B;
  --font-display: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

/* Full-bleed sticky bands use viewport widths — never allow x-scroll. */
body { overflow-x: clip; }

/* Full-bleed sticky bands: escape the centered container to viewport edges.
   (NOT left-1/2 + translate — that resolves against the parent width and
   shifts the band half off-screen.) */
.band-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* --- Leaflet maps --- */
#map, #detail-map, #report-map, #filter-map {
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  margin-top: 0.5rem;
  z-index: 0;
  background: var(--line);
}

/* --- Django-rendered widgets inside .form-control labels ---
   NOTE: excludes DaisyUI .input/.select/.textarea, which bring their own
   fixed-height sizing — our padding would clip their text. */
.form-control input:not([type="file"]):not([type="checkbox"]):not([type="submit"]):not(.input):not(.map-search-input),
.form-control select:not(.select),
.form-control textarea:not(.textarea) {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #D6D6DB;
  border-radius: 0.5rem;
  outline: none;
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
  border-color: var(--ink);
}

.form-control textarea { resize: vertical; }

/* Native dropdown option lists follow the light theme. */
option, optgroup {
  background-color: #fff;
  color: #101014;
}

/* --- allauth auth forms (plain <p> rows) --- */
.auth-form p { display: flex; flex-direction: column; gap: 0.25rem; }
.auth-form p label { font-weight: 600; font-size: 0.875rem; }
.auth-form p:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 0.5rem; }
.auth-form p:has(input[type="checkbox"]) label { font-weight: 500; }
.auth-form p input:not([type="checkbox"]) {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #D6D6DB;
  border-radius: 0.5rem;
  outline: none;
  box-shadow: none;
}
.auth-form p input:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: none;
}
.auth-form .errorlist { color: #dc2626; font-size: 0.85rem; list-style: none; padding: 0; }
.auth-form .helptext a { font-size: 0.8rem; color: #2563eb; text-decoration: none; }
.auth-form .helptext a:hover { text-decoration: underline; }

/* --- Combined media attach button (report form) --- */
.media-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.4rem 1rem;
  margin-top: 0.5rem;
  background: var(--bg);
  border: 2px dashed #D6D6DB;
  border-radius: 0.75rem;
  cursor: pointer;
  color: #57534E;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}

.media-add:hover { border-color: var(--ink); background: #F5F5F7; }

/* Two side-by-side attach tiles: choose from gallery vs open the camera. */
.media-add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.media-add-row .media-add {
  flex: 1 1 0;
  width: auto;
  margin-top: 0;
  padding: 1rem 0.6rem;
  font-size: 0.9rem;
}

.media-add-row .media-add-plus {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.15rem;
}

.media-add-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 1.4rem;
  line-height: 1;
}

.media-add-icon { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.media-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.media-list:empty { display: none; }

.media-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  background: var(--line);
  border-radius: 9999px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-chip:hover { background: #D6D6DB; }

.media-add:disabled { opacity: 0.45; cursor: not-allowed; }
.media-add:disabled:hover { border-color: #D6D6DB; background: var(--bg); }

/* --- Multi-photo picker previews (static/js/photo-picker.js) --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.photo-grid:empty { display: none; }

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile-name {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
}
.photo-tile-remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(16, 16, 20, 0.72);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-tile-remove:hover { background: var(--ink); }
.photo-tile-badge {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 600;
}
.photo-tile.is-removed img { opacity: 0.3; filter: grayscale(1); }
.photo-tile.is-removed .photo-tile-badge { display: none; }
.photo-tile-removed {
  position: absolute;
  inset: auto 0 0.4rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
}

/* --- Photo galleries on the dog and report pages --- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 28rem;
}
.photo-gallery > a { display: block; }
.photo-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
}
.photo-gallery-wide { grid-column: 1 / -1; }
.photo-gallery .photo-gallery-wide img { aspect-ratio: 4 / 3; }

/* --- In-page camera (keeps Android from discarding the form tab) --- */
.camera-sheet {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
}
.camera-sheet::backdrop { background: #000; }
.camera-sheet[open] { display: flex; flex-direction: column; }
.camera-sheet-video { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.camera-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom));
}
.camera-sheet-cancel,
.camera-sheet-flip {
  min-width: 4.5rem;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  color: #fff;
}
.camera-sheet-shutter {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  background: #fff;
  border: 5px solid rgba(255, 255, 255, 0.45);
  background-clip: padding-box;
}
.camera-sheet-shutter:disabled { opacity: 0.4; }

/* --- Google-Maps-style action button --- */
.gmaps-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #1a73e8;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid #dadce0;
  border-radius: 9999px;
  padding: 0.55rem 1.2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.gmaps-btn:hover {
  background: #f6fafe;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gmaps-btn svg { flex: none; }

/* --- Sort menu: pill trigger + floating panel, themed like the site's buttons --- */
.sort-menu { position: relative; display: inline-block; }

.sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2rem;
  padding: 0 0.8rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9999px;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sort-trigger::-webkit-details-marker { display: none; }
.sort-trigger:hover { border-color: #C9C9D1; }
.sort-trigger:focus-visible,
.sort-menu[open] .sort-trigger {
  outline: none;
  border-color: #1058DE;
  box-shadow: 0 0 0 3px rgba(16, 88, 222, 0.18);
}

.sort-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.sort-chevron { flex: none; transition: transform 0.15s; }
.sort-menu[open] .sort-chevron { transform: rotate(180deg); }

.sort-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  z-index: 60;
  min-width: 11.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 12px 32px -8px rgba(16, 16, 20, 0.22);
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: 0.65rem;
  text-decoration: none;
}
.sort-option:hover,
.sort-option:focus-visible { background: var(--paper); outline: none; }
.sort-option.is-selected { color: #1058DE; font-weight: 600; background: rgba(16, 88, 222, 0.08); }

/* Controls pinned to the right edge open leftwards so the panel stays on screen. */
.sort-menu--end .sort-panel { left: auto; right: 0; }
@media (min-width: 640px) {
  .sort-menu--end-sm .sort-panel { left: auto; right: 0; }
}

/* Page toolbar: two equal controls plus a full-width primary on phones,
   one tidy row from 640px up. */
.toolbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}
.toolbar-actions > * { width: 100%; }
.toolbar-primary { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .toolbar-actions { display: flex; align-items: center; width: auto; }
  .toolbar-actions > * { width: auto; }
}

/* Phone toolbars: trigger fills its grid cell, same height as the Filters button. */
@media (max-width: 639.98px) {
  .sort-menu--fill { display: block; }
  .sort-menu--fill .sort-trigger { width: 100%; justify-content: space-between; }
}

/* Narrow screens: drop the "Sort" prefix so the trigger sits beside Filters. */
@media (max-width: 480px) {
  .sort-label { display: none; }
}

/* --- Status pills: soft muted tones --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.55rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: currentColor;
  flex: none;
}

.pill-missing { background: #F7E4E4; color: #B3261E; border-color: #EAC9C9; }
.pill-pending { background: #F6ECD4; color: #7A5A00; border-color: #E4CF9E; }
.pill-reported { background: #E3EDF7; color: #1D5CAB; border-color: #C4D8EC; }
.pill-found { background: #E2F0E4; color: #2E7D32; border-color: #C6E2CA; }
.pill-id { background: #ECECF1; color: #3A3A42; border-color: #D6D6DB; }
.pill-collared { background: #E2F0E4; color: #2E7D32; border-color: #C6E2CA; }
.pill-no-collar { background: #F6ECD4; color: #7A5A00; border-color: #E4CF9E; }

/* --- Public landing page --- */
.landing-page { --landing-ink: #101014; --landing-muted: #64748B; --landing-blue: #1058DE; --landing-blue-dark: #1B50B2; --landing-gold: #C49A5C; --landing-paper: #F7F7F9; display: flex; flex-direction: column; gap: 56px; }
.landing-hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 420px;
  background: var(--landing-paper);
  color: var(--landing-ink);
}
.landing-hero-copy { padding: clamp(2rem, 6vw, 5rem); align-self: center; position: relative; z-index: 1; }
.landing-eyebrow, .landing-section-kicker { color: var(--landing-blue-dark); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.landing-eyebrow { display: flex; align-items: center; gap: .6rem; }
.landing-eyebrow span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--landing-gold); }
.landing-hero h1 { max-width: 650px; margin-top: 1.25rem; font-family: var(--font-display); font-size: clamp(2.7rem, 5.3vw, 5.1rem); font-weight: 500; line-height: .99; letter-spacing: -.055em; }
.landing-hero h1 em { color: var(--landing-blue-dark); font-weight: 500; }
.landing-lede { max-width: 34rem; margin-top: 1.35rem; color: #58635b; font-size: 1.08rem; line-height: 1.7; }
.landing-primary { border: 0; border-radius: 999px; background: var(--landing-blue); color: white; padding-inline: 1.35rem; font-weight: 700; }
.landing-primary:hover { background: var(--landing-blue-dark); color: white; }
.landing-secondary { border: 1px solid #D6D6DB; border-radius: 999px; background: transparent; color: var(--landing-ink); padding-inline: 1.35rem; }
.landing-secondary:hover { background: #F1F1F4; }
.landing-note { margin-top: .8rem; color: #778078; font-size: .8rem; }
.landing-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.landing-hero-art { min-height: 440px; position: relative; overflow: hidden; background: #E8EEF9; }
.landing-hero-art::before { position: absolute; content: ""; width: 78%; aspect-ratio: 1; left: 10%; top: 10%; border: 1px solid #D0DBEF; border-radius: 50%; }
.landing-hero-art::after { position: absolute; content: ""; width: 58%; aspect-ratio: 1; left: 20%; top: 20%; border: 1px solid #D0DBEF; border-radius: 50%; }
.landing-sun { position: absolute; width: 112px; height: 112px; border-radius: 50%; background: #E4C38F; top: 12%; right: 18%; }
.landing-dog { position: absolute; z-index: 1; width: 245px; height: 255px; border-radius: 46% 48% 43% 45%; background: #b66d43; top: 26%; left: 50%; transform: translateX(-50%) rotate(-3deg); box-shadow: inset -18px -20px 0 #9e5939; }
.landing-dog-ear { position: absolute; width: 78px; height: 130px; top: -21px; background: #7f4834; border-radius: 55% 45% 60% 40%; }
.landing-dog-ear-left { left: -39px; transform: rotate(-28deg); }
.landing-dog-ear-right { right: -35px; transform: rotate(30deg) scaleX(-1); }
.landing-dog-eye { position: absolute; z-index: 2; width: 13px; height: 17px; top: 92px; border-radius: 50%; background: #25221e; }
.landing-dog-eye-left { left: 74px; }
.landing-dog-eye-right { right: 70px; }
.landing-dog-muzzle { position: absolute; z-index: 2; width: 115px; height: 72px; background: #f0d7ad; border-radius: 50%; left: 65px; top: 127px; }
.landing-dog-nose { position: absolute; z-index: 3; width: 24px; height: 17px; left: 110px; top: 128px; border-radius: 50% 50% 45% 45%; background: #292622; }
.landing-dog-smile { position: absolute; z-index: 3; width: 33px; height: 16px; top: 151px; left: 106px; border-bottom: 2px solid #574131; border-radius: 0 0 50% 50%; }
.landing-dog-collar { position: absolute; z-index: 4; width: 178px; height: 22px; left: 34px; bottom: 31px; border-radius: 5px 5px 15px 15px; background: var(--landing-gold); transform: rotate(2deg); }
.landing-dog-collar::after { position: absolute; content: "✦"; color: #59401F; font-size: 17px; left: 78px; top: 1px; }
.landing-art-card { position: absolute; z-index: 2; display: flex; flex-direction: column; padding: .75rem 1rem; border: 1px solid #e6e4d9; border-radius: 12px; background: #fffdf5; box-shadow: 0 12px 35px #304b2d1a; }
.landing-art-card span { color: #64748B; font-size: .59rem; font-weight: 800; letter-spacing: .14em; }
.landing-art-card b { color: #101014; font-family: var(--font-display); font-size: 1.05rem; }
.landing-art-top { top: 19%; left: 8%; transform: rotate(-7deg); }
.landing-art-bottom { right: 7%; bottom: 15%; transform: rotate(5deg); }
.landing-paw { position: absolute; z-index: 2; font-size: 2rem; opacity: .55; }
.landing-paw-one { bottom: 18%; left: 17%; transform: rotate(-22deg); }
.landing-paw-two { top: 17%; left: 55%; transform: rotate(16deg); }
.landing-intro { display: flex; flex-direction: column; align-items: center; gap: .75rem; box-sizing: border-box; width: 100%; max-width: 800px; margin-inline: auto; padding: 0 1rem; text-align: center; }
.landing-intro h2, .landing-how h2, .landing-bottom-cta h2 { color: var(--landing-ink); font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.landing-video-section { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
.landing-video-section h2 { max-width: 42rem; color: var(--landing-ink); font-family: var(--font-display); font-size: clamp(1.65rem, 3.5vw, 2.4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.landing-video-frame { position: relative; width: min(100%, 270px); margin-top: .5rem; overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid #E8C887; border-radius: 1.25rem; background: radial-gradient(circle at 70% 20%, #F5B54455, transparent 38%), linear-gradient(145deg, #421B45, #211B49 70%); box-shadow: 0 12px 32px #421B4522; }
.landing-video-play { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; border: 0; background: transparent; color: #FFF7E8; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.landing-video-play:hover .landing-video-play-icon { background: #EAF0FC; transform: scale(1.06); }
.landing-video-play:focus-visible { outline: 3px solid #FFD477; outline-offset: -6px; border-radius: 1.25rem; }
.landing-video-play-icon { display: grid; width: 4rem; height: 4rem; place-items: center; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--landing-blue); box-shadow: 0 6px 18px #00000030; transition: transform .18s ease, background .18s ease; }
.landing-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.landing-video-unmute { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); display: inline-flex; min-height: 44px; align-items: center; gap: .4rem; padding: .5rem 1rem; border: 0; border-radius: 999px; background: white; color: var(--landing-blue-dark); font: inherit; font-size: .9rem; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 14px #00000040; }
.landing-video-unmute[hidden] { display: none; }
.landing-video-unmute:focus-visible { outline: 3px solid #FFF7E8; outline-offset: 2px; }
.landing-video-fallback { display: inline-flex; min-height: 44px; align-items: center; padding: .4rem .65rem; color: var(--landing-blue-dark); font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.landing-video-fallback:focus-visible { outline: 3px solid var(--landing-blue); outline-offset: 2px; border-radius: .25rem; }
.landing-intro p { max-width: 720px; margin-top: 16px; color: var(--landing-muted); font-size: 1.05rem; line-height: 1.85; }
.landing-diwali-banner { position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem; width: 100%; box-sizing: border-box; margin: 0; padding: .6rem 1rem .6rem 1.2rem; border: 1px solid #F5B544; border-radius: .8rem; background: radial-gradient(circle at 4% 28%, #F5B544 0 2px, #F5B544A8 3px, transparent 11px), radial-gradient(circle at 13% 76%, #FF718A 0 2px, #FF718A88 3px, transparent 11px), radial-gradient(circle at 24% 38%, #67E8D2 0 2px, #67E8D288 3px, transparent 11px), radial-gradient(circle at 76% 72%, #D9A7FF 0 2px, #D9A7FF88 3px, transparent 11px), radial-gradient(circle at 87% 24%, #67E8D2 0 2px, #67E8D288 3px, transparent 11px), radial-gradient(circle at 97% 65%, #F5B544 0 2px, #F5B544A8 3px, transparent 11px), linear-gradient(105deg, #421B45, #211B49); color: #FFF7E8; box-shadow: 0 4px 14px #421B4526; font-size: 1rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; transition: box-shadow .18s ease, transform .18s ease; }
.landing-why-card { box-sizing: border-box; width: min(100%, 640px); margin: 16px auto 0; padding: 24px; border: 1px solid #E8C887; border-radius: 1.25rem; background: #FFF7E8; text-align: center; }
.landing-why-card .landing-section-kicker { margin-bottom: .6rem; }
.landing-intro .landing-why-card p { max-width: none; margin: 0; color: #475569; font-size: 18px; line-height: 1.55; }
.landing-intro-register { margin-top: 24px; }
.landing-diwali-banner:hover { color: #FFF7E8; box-shadow: 0 6px 20px #421B4538; transform: translateY(-1px); }
.landing-diwali-banner > span { position: relative; z-index: 1; }
.landing-diwali-banner-tag { padding: .28rem .6rem; border-radius: 999px; background: #F5B544; color: #351936; font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.landing-diwali-banner-copy { color: #FFF7E8; font-size: 1.05rem; }
.landing-diwali-banner-action { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .8rem; border: 1px solid #FFD477; border-radius: 999px; background: #F5B544; color: #351936; font-size: .9rem; font-weight: 800; }
.landing-diwali-banner-action svg { width: 1rem; height: 1rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.landing-diwali { --diwali-plum: #421B45; --diwali-indigo: #211B49; --diwali-marigold: #F5B544; --diwali-ivory: #FFF7E8; position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, .9fr); gap: clamp(2rem, 5vw, 4rem); margin-top: 0; padding: clamp(1.75rem, 5vw, 3.5rem); border: 1px solid #E8C887; border-radius: 1.5rem; background: radial-gradient(circle at 92% 8%, #F5B54430 0 2px, transparent 3px), radial-gradient(circle at 86% 15%, #F5B54424 0 3px, transparent 4px), radial-gradient(circle at 97% 24%, #FFF7E82b 0 2px, transparent 3px), linear-gradient(125deg, var(--diwali-plum), var(--diwali-indigo)); box-shadow: 0 18px 50px #421B4522; color: var(--diwali-ivory); scroll-margin-top: 1rem; }
.landing-diwali::before { position: absolute; z-index: -1; top: -8rem; right: 19%; width: 19rem; aspect-ratio: 1; border: 1px solid #F5B54435; border-radius: 50%; box-shadow: 0 0 0 2.5rem #F5B54409, 0 0 0 5rem #FFF7E805; content: ""; }
.landing-diwali-lights { position: absolute; top: 1.35rem; right: 2rem; display: flex; gap: 1.25rem; padding: 0 .25rem; }
.landing-diwali-lights::before { position: absolute; top: -2px; right: -.35rem; left: -.35rem; height: .75rem; border-top: 1px solid #FFF7E86B; border-radius: 50%; content: ""; }
.landing-diwali-lights span { position: relative; z-index: 1; width: .45rem; height: .55rem; border-radius: 50%; background: var(--diwali-marigold); box-shadow: 0 0 7px 2px #F5B54470; }
.landing-diwali-lights span:nth-child(even) { margin-top: .22rem; background: #FFF0B8; box-shadow: 0 0 7px 2px #FFF0B866; }
.landing-diwali-label { display: inline-flex; align-items: center; gap: .5rem; color: var(--diwali-marigold); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.landing-diwali-label span { text-shadow: 0 0 14px #F5B544; }
.landing-diwali-copy h2 { max-width: 34rem; margin-top: .8rem; color: var(--diwali-ivory); font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.landing-diwali-copy > p { max-width: 34rem; margin-top: .9rem; color: #F4E9F0; line-height: 1.75; }
.landing-diwali-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.4rem; }
.landing-diwali-countdown { color: #FFF7E8; font-size: 1rem; font-weight: 700; }
.landing-diwali-share { box-sizing: border-box; display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1.1rem; border: 1px solid #FFD988; border-radius: 999px; background: var(--diwali-marigold); color: #2B1835; font-weight: 800; text-decoration: none; box-shadow: 0 5px 18px #F5B54435; }
.landing-diwali-share svg { width: .9rem; height: .9rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.landing-diwali-share:hover { background: #FFD477; color: #2B1835; }
.landing-diwali-share:focus-visible, .signup-share-link:focus-visible { outline: 3px solid #FFD477; outline-offset: 3px; }
.landing-diwali-share-secondary { border-color: #FFF7E899; background: transparent; color: #FFF7E8; box-shadow: none; }
.landing-diwali-share-secondary:hover { border-color: #FFD477; background: rgba(255, 247, 232, .14); color: #FFF7E8; }
.landing-diwali-tips { display: grid; align-content: center; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.landing-diwali-tips > .landing-diwali-option { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); align-items: start; gap: .85rem; padding: 1.1rem; border: 1px solid #F5B54480; border-radius: 1rem; background: rgba(255, 247, 232, .08); box-shadow: 0 5px 18px #180D2924; }
.landing-diwali-tips > .landing-diwali-option-recommended { border: 2px solid var(--diwali-marigold); background: rgba(255, 247, 232, .12); }
.landing-diwali-tips > .landing-diwali-option-link { box-sizing: border-box; min-height: 64px; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.landing-diwali-tips > .landing-diwali-option-link:hover { border-color: #FFD477; background: rgba(255, 247, 232, .18); }
.landing-diwali-tips > .landing-diwali-option-link:focus-visible { border-color: #FFD477; outline: 3px solid #FFD477; outline-offset: 3px; }
.landing-diwali-option-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: #F5B544; color: #421B45; font-size: 1.35rem; font-weight: 800; }
.landing-diwali .landing-diwali-tips > .landing-diwali-option strong { display: block; margin-bottom: .3rem; color: #FFF7E8; font-size: .95rem; }
.landing-diwali-option-description { display: block; color: rgba(255, 247, 232, .85); line-height: 1.6; }
.landing-text-link { display: inline-flex; gap: .45rem; align-items: center; color: var(--landing-blue-dark); font-weight: 700; text-decoration: none; }
.landing-text-link:hover .landing-text-link-label { text-decoration: underline; text-underline-offset: 3px; }
/* Icons/arrows inside underlined links: inline-block stops the link's underline reaching them. */
.link-icon { display: inline-block; text-decoration: none; }
.link-icon-start { margin-right: .3em; }
.landing-how { padding: 0; }
.landing-how h2 { margin-top: .55rem; }
.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.landing-step { position: relative; padding: 1.6rem; border: 1px solid #E5E5EA; border-radius: 1.25rem; background: white; }
.landing-step-number { position: absolute; top: 1.4rem; right: 1.5rem; color: #9ca69a; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.landing-step-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: #EAF0FC; color: var(--landing-blue); font-size: 1.55rem; }
.landing-step h3 { margin-top: 1.3rem; color: var(--landing-ink); font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.landing-step p { min-height: 6.4rem; margin: .65rem 0 1.2rem; color: var(--landing-muted); font-size: .94rem; line-height: 1.7; }
.landing-bottom-cta { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 0; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 1.5rem; background: var(--landing-paper); }
.landing-bottom-cta h2 { max-width: 620px; margin-top: .5rem; font-size: clamp(1.8rem, 3.7vw, 3rem); }
.landing-credit { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .75rem; padding: 1.5rem 1rem .75rem; color: var(--landing-muted); font-size: .88rem; text-align: center; }
.landing-credit-powered { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .4rem; max-width: 100%; }
.landing-credit-donation { max-width: 100%; overflow-wrap: anywhere; }
.landing-support-note { max-width: 42rem; overflow-wrap: anywhere; }
.landing-support-note a, .signup-support-note a { color: var(--landing-blue-dark, #1B50B2); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.landing-credit a { display: inline-flex; align-items: center; gap: .6rem; color: var(--landing-blue-dark); font-weight: 700; text-decoration: none; }
.landing-credit img { display: block; width: 3.5rem; height: 3.5rem; object-fit: contain; }
.landing-credit a:hover { color: var(--landing-blue); text-decoration: underline; text-underline-offset: 3px; }
.landing-credit .landing-support-note .support-modal-trigger, .signup-support-note .support-modal-trigger { color: #1B50B2; font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.landing-credit .landing-support-note .support-modal-trigger:hover, .signup-support-note .support-modal-trigger:hover { text-decoration-thickness: 2px; }
.support-modal-trigger:focus-visible, .support-modal button:focus-visible { outline: 3px solid #1058DE; outline-offset: 3px; }
.support-modal { box-sizing: border-box; width: min(32rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; overflow: auto; border: 1px solid #E5E5EA; border-radius: 1.25rem; background: #FFFFFF; color: #101014; box-shadow: 0 24px 70px #10101440; }
.support-modal::backdrop { background: #10101480; }
#bulk_dialog { width: min(26rem, calc(100vw - 2rem)); }
/* Form dialog, not the centred donation pitch: left-aligned, sans heading. */
#bulk_dialog .support-modal-content { text-align: left; }
#bulk_dialog h2 {
  padding: 0 2.5rem 0 0;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
}
.support-modal-content { position: relative; padding: clamp(1.25rem, 5vw, 2rem); text-align: center; }
.support-modal-close { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: #F1F1F4; color: #101014; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.support-modal h2 { padding: 0 2.5rem; color: #101014; font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; line-height: 1.15; }
#support-modal-description { margin-top: .8rem; color: #475569; line-height: 1.6; }
.support-modal-qr { margin: 1.25rem auto 0; }
.support-modal-qr img { display: block; width: min(100%, 220px); height: auto; max-height: 220px; margin-inline: auto; object-fit: contain; }
.support-modal-qr figcaption { margin-top: .45rem; color: #64748B; font-size: .85rem; }
.support-modal-number-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.support-modal-number { color: #101014; font-size: clamp(1.4rem, 6vw, 1.8rem); letter-spacing: .04em; }
.support-modal-copy { padding: .6rem .9rem; border: 1px solid #D6D6DB; border-radius: 999px; background: #F7F7F9; color: #101014; font-weight: 700; cursor: pointer; }
.support-modal-copy:hover { background: #ECECF1; }
.support-modal-payee { margin-top: .8rem; color: #64748B; font-size: .82rem; }
.signup-support-note { margin-top: 1rem; color: #64748B; font-size: .85rem; line-height: 1.6; }
.signup-share-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; margin-top: .5rem; padding: .5rem .75rem; border-radius: .5rem; color: #1B50B2; font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 768px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .landing-hero-copy { min-width: 0; padding: 24px 20px; }
  .landing-hero h1 { overflow-wrap: anywhere; font-size: clamp(2rem, 8.5vw, 2.75rem); line-height: 1.1; }
  .landing-lede { overflow-wrap: anywhere; }
  .landing-hero-actions { align-items: flex-start; flex-direction: column; }
  .landing-hero-actions .landing-primary,
  .landing-hero-actions .landing-secondary { box-sizing: border-box; width: 100%; justify-content: center; }
  /* Phones get a shorter illustration above the copy; the dog itself is
     scaled down whole so its pixel-sized parts stay in proportion. */
  .landing-hero-art { order: -1; min-height: 340px; }
  /* `scale` also shrinks the -50% centring shift in the dog's transform, so
     pull it back by the 28% of half its 245px width that scaling removes. */
  .landing-dog { top: 22px; left: calc(50% - 245px * .14); scale: .72; }
  .landing-sun { width: 72px; height: 72px; top: 8%; right: 10%; }
  .landing-art-card { padding: .5rem .7rem; border-radius: 10px; }
  .landing-art-card span { font-size: .5rem; }
  .landing-art-card b { font-size: .85rem; }
  .landing-art-top { top: 10%; left: 4%; }
  .landing-art-bottom { right: 4%; bottom: 16px; }
  .landing-paw { font-size: 1.4rem; }
  .landing-intro { gap: .75rem; padding: 0 1rem; }
  .landing-video-section { gap: .65rem; }
  .landing-video-frame { width: min(100%, 240px); }
  .landing-video-section h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .landing-why-card { padding: 20px; text-align: left; }
  .landing-intro .landing-why-card p { font-size: 17px; }
  .landing-diwali { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 0; padding: 20px; }
  .landing-diwali-actions { align-items: stretch; }
  .landing-diwali-actions .landing-diwali-share { width: 100%; }
  .landing-diwali-copy h2 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .landing-diwali-lights { display: none; }
  .landing-page { gap: 32px; }
  .landing-diwali-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .5rem; margin-bottom: 0; padding: .3rem .5rem; }
  .landing-diwali-banner-tag { grid-column: 1; grid-row: 1; justify-self: start; }
  .landing-diwali-banner-copy { grid-column: 2; grid-row: 1; min-width: 0; font-size: .75rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .landing-diwali-banner-action { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .landing-diwali-banner-tag { padding: .2rem .45rem; font-size: .65rem; }
  .landing-diwali-banner-action { gap: .2rem; padding: .3rem .5rem; font-size: .72rem; }
  .landing-diwali-banner-action svg { width: .8rem; height: .8rem; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-step p { min-height: 0; }
  .landing-bottom-cta { align-items: flex-start; flex-direction: column; }
}

/* --- Motion: shared entrance language --- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.rise {
  animation: rise-in 0.35s cubic-bezier(0.22, 0.9, 0.3, 1) both;
  animation-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .rise, .toast, .drawer-panel[open] { animation: none; }
}

/* --- Landing motion (driven by static/js/landing-motion.js) --- */
/* Dot field canvas sits under the hero copy; the art panel paints over it. */
.landing-hero-field { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: radial-gradient(130% 100% at 15% 40%, #000 35%, transparent 80%); mask-image: radial-gradient(130% 100% at 15% 40%, #000 35%, transparent 80%); }
.landing-eyebrow span { animation: landing-dot-pulse 2.4s ease-out infinite; }

/* Illustration: the dog breathes, blinks and flicks an ear; cards float.
   `translate` carries pointer parallax so it composes with the keyframed `transform`. */
.landing-hero-art { --px: 0; --py: 0; }
.landing-dog, .landing-art-card, .landing-sun, .landing-paw { transition: translate .5s cubic-bezier(.22, .9, .3, 1); }
.landing-dog { translate: calc(var(--px) * 14px) calc(var(--py) * 10px); animation: landing-dog-breathe 4.5s ease-in-out infinite; }
.landing-dog-ear { transform-origin: 50% 10%; }
.landing-dog-ear-left { animation: landing-ear-left 5.5s ease-in-out infinite; }
.landing-dog-ear-right { animation: landing-ear-right 5.5s ease-in-out 2.4s infinite; }
.landing-dog-eye { animation: landing-blink 4.8s ease-in-out infinite; }
.landing-dog-nose { animation: landing-sniff 3.2s ease-in-out infinite; }
.landing-dog-tag { position: absolute; z-index: 5; left: 50%; bottom: -14px; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: landing-tag-swing 3s ease-in-out infinite; }
.landing-dog-tag::before { width: 10px; height: 10px; margin-bottom: -3px; border: 2px solid #8A6A3C; border-radius: 50%; content: ""; }
.landing-dog-tag-name { display: inline-flex; align-items: center; min-width: 4.4rem; min-height: 1.6rem; justify-content: center; padding: .15rem .6rem; border: 1px solid #E8C887; border-radius: 999px; background: #FFF7E8; box-shadow: 0 6px 16px #59401F26; color: #101014; font-family: var(--font-display); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.landing-dog-tag-name::after { width: 1.5px; height: .85em; margin-left: 2px; background: var(--landing-blue); content: ""; animation: landing-caret 1.06s steps(1) infinite; }
.landing-sun { translate: calc(var(--px) * -10px) calc(var(--py) * -8px); animation: landing-sun-glow 4s ease-out infinite; }
.landing-art-top { translate: calc(var(--px) * -22px) calc(var(--py) * -16px); animation: landing-float-top 6s ease-in-out infinite; }
.landing-art-bottom { translate: calc(var(--px) * 22px) calc(var(--py) * 16px); animation: landing-float-bottom 7s ease-in-out infinite; }
.landing-paw { animation: landing-paw-step 3.2s ease-in-out infinite; }
.landing-paw-two { animation-delay: 1.6s; }
.landing-ripple { position: absolute; z-index: 0; top: 50%; left: 50%; width: 40%; aspect-ratio: 1; border: 1.5px solid #1058DE40; border-radius: 50%; transform: translate(-50%, -50%) scale(1); animation: landing-ripple 6s ease-out infinite; pointer-events: none; }
.landing-ripple-late { animation-delay: 3s; }

/* Buttons: a light sheen sweeps across on hover; arrows nudge forward. */
.landing-primary { position: relative; overflow: hidden; isolation: isolate; }
.landing-primary::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(110deg, transparent 30%, #FFFFFF59 50%, transparent 70%); content: ""; transform: translateX(-120%); transition: transform .7s ease; }
.landing-primary:hover::after { transform: translateX(120%); }
.landing-primary span[aria-hidden], .landing-text-link span[aria-hidden] { transition: translate .2s ease; }
.landing-primary:hover span[aria-hidden], .landing-text-link:hover span[aria-hidden] { translate: 3px 0; }

/* Ticker strip between the hero and the rest of the page. */
.landing-ticker { margin-block: -24px; padding: .85rem 0; overflow: hidden; border-block: 1px solid #E5E5EA; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.landing-ticker-track { display: flex; align-items: center; gap: 1.5rem; width: max-content; animation: landing-marquee 42s linear infinite; }
.landing-ticker span { color: #101014; font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.landing-ticker i { color: var(--landing-gold); font-size: .95rem; font-style: normal; }

/* Diwali: lights twinkle and a soft sheen crosses the banner. */
.landing-diwali-lights span { animation: landing-twinkle 2.2s ease-in-out infinite; }
.landing-diwali-lights span:nth-child(2) { animation-delay: .3s; }
.landing-diwali-lights span:nth-child(3) { animation-delay: .9s; }
.landing-diwali-lights span:nth-child(4) { animation-delay: .5s; }
.landing-diwali-lights span:nth-child(5) { animation-delay: 1.3s; }
.landing-diwali-lights span:nth-child(6) { animation-delay: .7s; }
.landing-diwali-lights span:nth-child(7) { animation-delay: 1.6s; }
.landing-diwali-banner::after { position: absolute; z-index: 0; inset: 0; background: linear-gradient(105deg, transparent 35%, #FFF7E829 50%, transparent 65%); content: ""; transform: translateX(-100%); animation: landing-banner-sheen 6s ease-in-out 1s infinite; pointer-events: none; }

/* Video play button pulses; step cards lift on hover. */
.landing-video-play-icon { position: relative; }
.landing-video-play-icon::before { position: absolute; inset: 0; border: 2px solid #FFF7E8; border-radius: 50%; content: ""; animation: landing-play-ring 2.4s ease-out infinite; }
.landing-step { transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease; }
.landing-step:hover { border-color: #D0DBEF; box-shadow: 0 16px 36px #1058DE14; translate: 0 -4px; }
.landing-step-icon { transition: rotate .3s ease, scale .3s ease; }
.landing-step:hover .landing-step-icon { rotate: -8deg; scale: 1.08; }

/* Scroll reveals: only hidden once JS has confirmed it can reveal them again. */
.landing-motion [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .7s cubic-bezier(.22, .9, .3, 1), translate .7s cubic-bezier(.22, .9, .3, 1); transition-delay: var(--reveal-delay, 0ms); }
.landing-motion [data-reveal].is-revealed { opacity: 1; translate: 0 0; }
.landing-motion .landing-step[data-reveal].is-revealed:hover { translate: 0 -4px; transition-delay: 0ms; }

@media (max-width: 768px) {
  /* The copy fills the hero on phones: dots run at full strength round the
     edges and stay faintly visible behind the text. */
  .landing-hero-field { -webkit-mask-image: radial-gradient(85% 75% at 50% 69%, #00000059 30%, #000 100%); mask-image: radial-gradient(85% 75% at 50% 69%, #00000059 30%, #000 100%); }
  .landing-ticker { margin-block: -12px; padding: .7rem 0; }
  .landing-ticker span { font-size: .95rem; }
}

@keyframes landing-dot-pulse { 0% { box-shadow: 0 0 0 0 #C49A5C80; } 100% { box-shadow: 0 0 0 .55rem #C49A5C00; } }
@keyframes landing-dog-breathe { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg); } 50% { transform: translateX(-50%) translateY(-6px) rotate(-1.5deg); } }
@keyframes landing-ear-left { 0%, 78%, 100% { transform: rotate(-28deg); } 84% { transform: rotate(-38deg); } 90% { transform: rotate(-24deg); } }
@keyframes landing-ear-right { 0%, 78%, 100% { transform: rotate(30deg) scaleX(-1); } 84% { transform: rotate(40deg) scaleX(-1); } 90% { transform: rotate(26deg) scaleX(-1); } }
@keyframes landing-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes landing-sniff { 0%, 70%, 100% { transform: scale(1); } 76% { transform: scale(1.12, .92); } 82% { transform: scale(1); } 88% { transform: scale(1.1, .94); } }
@keyframes landing-tag-swing { 0%, 100% { transform: translateX(-50%) rotate(-5deg); } 50% { transform: translateX(-50%) rotate(5deg); } }
@keyframes landing-caret { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes landing-sun-glow { 0% { box-shadow: 0 0 0 0 #E4C38F99; } 100% { box-shadow: 0 0 0 28px #E4C38F00; } }
@keyframes landing-float-top { 0%, 100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(-9px) rotate(-5deg); } }
@keyframes landing-float-bottom { 0%, 100% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(8px) rotate(3deg); } }
@keyframes landing-paw-step { 0%, 100% { opacity: 0; scale: .8; } 20%, 70% { opacity: .55; scale: 1; } }
@keyframes landing-ripple { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.9); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.3); } }
@keyframes landing-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - .75rem)); } }
@keyframes landing-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: 0 0 2px 0 #F5B54440; } }
@keyframes landing-banner-sheen { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
@keyframes landing-play-ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

@media (prefers-reduced-motion: reduce) {
  .landing-eyebrow span, .landing-dog, .landing-dog-ear, .landing-dog-eye, .landing-dog-nose, .landing-dog-tag-name::after, .landing-sun, .landing-art-card, .landing-paw,
  .landing-ticker-track, .landing-diwali-lights span, .landing-diwali-banner::after, .landing-video-play-icon::before { animation: none; }
  .landing-dog-tag { animation: none; transform: translateX(-50%); }
  .landing-ripple { display: none; }
  .landing-primary::after { display: none; }
}

/* --- Toasts --- */
.toast-stack {
  position: fixed;
  top: 4.75rem;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  pointer-events: none;
}

.toast {
  box-sizing: border-box;
  max-width: min(30rem, 100%);
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px #10101426;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  pointer-events: auto;
  animation: toast-in 0.25s cubic-bezier(0.22, 0.9, 0.3, 1);
}

.toast-success { border-color: #C6E2CA; background: #E2F0E4; color: #2E7D32; }
.toast-danger { border-color: #EAC9C9; background: #F7E4E4; color: #B3261E; }
.toast-warning { border-color: #E4CF9E; background: #F6ECD4; color: #7A5A00; }
.toast-neutral { border-color: #D6D6DB; background: #ECECF1; color: #3A3A42; }

/* --- Slide-over drawer (native <dialog>, pinned to the right edge) --- */
.drawer-panel {
  position: fixed;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  width: min(22rem, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: -18px 0 50px #10101426;
  overflow-y: auto;
}

.drawer-panel[open] { animation: drawer-in 0.28s cubic-bezier(0.22, 0.9, 0.3, 1); }
.drawer-panel::backdrop { background: #10101466; }

.drawer-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.drawer-panel-title { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }

.drawer-panel-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: #E8E8ED;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.drawer-panel-close:hover { background: #DEDEE4; }
.drawer-panel-body { padding: 1.25rem; }

/* --- Skeleton shimmer behind loading photos --- */
.img-shell {
  position: relative;
  overflow: hidden;
  background: var(--line);
}

.img-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
  pointer-events: none;
}

.img-shell.is-loaded::after { display: none; }

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .img-shell::after { animation: none; }
}

/* Navbar wordmark */
.wordmark { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; letter-spacing: .005em; color: #2B2F3A; }
.wordmark-of { color: #1058DE; font-weight: 400; }

/* QR scanner */
.scan-frame { position: relative; aspect-ratio: 1 / 1; border-radius: 1.5rem; overflow: hidden; background: #111; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-target { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 1rem; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); pointer-events: none; }

/* "Have a QR collar?" popup: a bottom sheet on phones, within thumb reach. */
@media (max-width: 640px) {
  #scan-first-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 1.25rem 1.25rem 0 0; border-bottom: 0; }
  #scan-first-dialog .support-modal-content { padding: 1.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); }
  #scan-first-dialog h2 { font-size: 1.5rem; }
}

/* Site footer */
.site-footer { border-top: 1px solid #E5E5EA; background: #FAFAFB; color: #64748B; font-size: .9rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 1.25rem; }
.site-footer-brand .wordmark { color: #101014; font-size: 1.2rem; }
.site-footer-brand p { margin-top: .5rem; max-width: 22rem; line-height: 1.5; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem 4rem; }
.site-footer h2 { margin-bottom: .6rem; color: #101014; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: .45rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #1B50B2; text-decoration: underline; text-underline-offset: 3px; }
.site-footer-minimal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; max-width: 72rem; margin: 0 auto; padding: 1.1rem 1rem; border-top-color: #ECECF1; background: transparent; font-size: .82rem; }
.site-footer-minimal nav { display: flex; gap: 1.25rem; }
.site-footer-legal { max-width: 72rem; margin: 0 auto; padding: 1rem; border-top: 1px solid #ECECF1; font-size: .8rem; }

/* About / Contact / Privacy / Terms */
.info-page { max-width: 44rem; margin: 0 auto; color: #334155; line-height: 1.7; }
.info-page h1 { color: #101014; font-size: 2rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.info-page .info-updated { margin-top: .35rem; color: #64748B; font-size: .85rem; }
.info-page h2 { margin-top: 2rem; color: #101014; font-size: 1.2rem; font-weight: 700; }
.info-page p, .info-page ul { margin-top: .75rem; }
.info-page ul { padding-left: 1.25rem; list-style: disc; }
.info-page li + li { margin-top: .35rem; }
.info-page a { color: #1B50B2; text-decoration: underline; text-underline-offset: 3px; }
.info-page strong { color: #101014; }
.info-page .info-callout { margin-top: 1.25rem; padding: 1rem 1.15rem; border: 1px solid #F3D9A4; border-left: 4px solid #C49A5C; border-radius: .75rem; background: #FFF6E3; color: #5A4310; }
.info-page .info-callout-compact { padding: .6rem .85rem; font-size: .875rem; line-height: 1.5; }
.info-page .not-found-dog { display: block; width: 8rem; max-width: 100%; height: auto; margin: 0 auto 1.25rem; }
.not-found-dog-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: not-found-dog-wag .7s ease-in-out infinite alternate; }
@keyframes not-found-dog-wag { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .not-found-dog-tail { animation: none; } }

/* Highlighted contact email (Contact page) */
.info-page .contact-email-card { display: flex; flex-direction: column; gap: .2rem; margin-top: 1.25rem; padding: 1.1rem 1.25rem; border: 1px solid #C9D9F8; border-radius: 1rem; background: #EEF4FF; text-decoration: none; }
.info-page .contact-email-card span { color: #475569; font-size: .85rem; }
.info-page .contact-email-card strong { color: #0B46B5; font-size: 1.15rem; overflow-wrap: anywhere; }
.info-page .contact-email-card:hover { border-color: #1058DE; }

/* Brand type: Poppins everywhere (matches the logo lettering). Headings that
   were Georgia 500 with tight serif tracking get Poppins weights and spacing. */
body { font-family: var(--font-display); }
.landing-hero h1, .landing-intro h2, .landing-how h2, .landing-bottom-cta h2,
.landing-video-section h2, .landing-diwali-copy h2, .support-modal h2 { font-weight: 700; letter-spacing: -.025em; }
.landing-step h3, .landing-art-card b { font-weight: 700; letter-spacing: -.01em; }
.wordmark { font-weight: 500; letter-spacing: 0; }
.wordmark-of { font-weight: 400; }
/* Poppins runs wider than Georgia/Quicksand: trim display sizes ~12% to keep the old footprint. */
.landing-hero h1 { font-size: clamp(2.1rem, 3.4vw, 3.5rem); line-height: 1.06; }
.landing-intro h2, .landing-how h2 { font-size: clamp(1.75rem, 3.5vw, 2.9rem); }
.landing-bottom-cta h2 { font-size: clamp(1.6rem, 3.25vw, 2.65rem); }
.landing-video-section h2 { font-size: clamp(1.45rem, 3.1vw, 2.1rem); }
.landing-diwali-copy h2 { font-size: clamp(1.75rem, 3.5vw, 2.7rem); }
.landing-step h3 { font-size: 1.3rem; }
.landing-art-card b { font-size: .95rem; }
.support-modal h2 { font-size: 1.6rem; }
.wordmark { font-size: 1.15rem; }
.site-footer-brand .wordmark { font-size: 1.05rem; }

/* Map picker: search floats over the top of the map, actions sit with zoom.
   Leaflet panes/controls use z-index 400–1000, so the search sits above them. */
.map-picker { position: relative; }
.map-search { position: absolute; top: 1.1rem; /* map has margin-top .5rem */ left: .6rem; right: .6rem; z-index: 1100; }
.map-search .map-search-input { width: 100%; height: 2.5rem; padding: 0 .9rem 0 2.4rem; border: 1px solid #E5E7EB; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px #0000001f; font: inherit; font-size: .9rem; color: inherit; outline: none; }
.map-search .map-search-input:focus { border-color: #9CA3AF; box-shadow: 0 2px 14px #00000029; }
.map-search-icon { position: absolute; left: .85rem; top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%); fill: none; stroke: #6B7280; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
/* Spinner on the right of the input while a search is pending; padding grows so text and the native clear button don't sit under it. */
.map-search-spinner { display: none; position: absolute; right: .85rem; top: 50%; width: 1rem; height: 1rem; margin-top: -.5rem; border: 2px solid #E5E7EB; border-top-color: #6B7280; border-radius: 50%; animation: map-search-spin .7s linear infinite; pointer-events: none; }
.map-search.is-loading .map-search-spinner { display: block; }
.map-search.is-loading .map-search-input { padding-right: 2.3rem; }
@keyframes map-search-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .map-search-spinner { animation-duration: 1.6s; } /* slowed, not stopped: a still ring wouldn't read as loading */
}
.map-search-results { position: absolute; left: 0; right: 0; top: calc(100% + .35rem); margin: 0; padding: .25rem; list-style: none; max-height: 15rem; overflow-y: auto; background: #fff; border: 1px solid #E5E7EB; border-radius: .9rem; box-shadow: 0 10px 28px #0000001f; text-align: left; }
.map-search-results.hidden { display: none; }
.map-search-results li.disabled { padding: .6rem .75rem; font-size: .85rem; color: #6B7280; }
.map-search-results a { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .5rem .75rem; border-radius: .6rem; cursor: pointer; text-decoration: none; color: inherit; }
.map-search-results a.active, .map-search-results a:hover { background: #F3F4F6; }
.map-search-title { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.map-search-sub { font-size: .75rem; line-height: 1.3; color: #6B7280; }
.map-picker-actions { display: flex; gap: .4rem; margin-bottom: 1.6rem !important; /* clear the attribution strip */ }
.map-chip { display: inline-flex; align-items: center; gap: .35rem; height: 2.1rem; padding: 0 .8rem; border: 0; border-radius: 999px; background: var(--ink, #1F1F2E); color: #fff; font: inherit; font-size: .8rem; font-weight: 600; box-shadow: 0 2px 8px #00000040; cursor: pointer; }
.map-chip:hover { filter: brightness(1.15); }
.map-chip[hidden] { display: none; }
.map-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* "Near" location filter in the list pages' filter drawers. */
.near-filter { border: 0; margin: 0; padding: 0; min-width: 0; }
#filter-map { height: 240px; }
/* The drawer's narrow map wraps the tile credit onto extra lines; shrink it and lift the chips clear. */
#filter-map .leaflet-control-attribution { font-size: 9px; line-height: 1.3; }
#filter-map .map-picker-actions { margin-bottom: 2.3rem !important; }
.near-radius { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.near-chip { position: relative; cursor: pointer; }
.near-chip input { position: absolute; opacity: 0; pointer-events: none; }
.near-chip span { display: inline-flex; align-items: center; height: 2rem; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 600; }
.near-chip:hover span { border-color: #9CA3AF; }
.near-chip input:checked + span { background: #1058DE; border-color: #1058DE; color: #fff; }
.near-chip input:focus-visible + span { outline: 2px solid #1058DE; outline-offset: 2px; }
