/* =====================================================
   HOME PAGE POLISH (added 2026-11-21)
   - Hero: real photos from the field + floating app cards
   - Highlights strip under the hero
   - Photo behind the final call to action
   - Gentle reveal-on-scroll (off when reduced motion is on)
   Uses the tokens from style.css, so dark mode follows.
===================================================== */

/* ---------- Hero photos ---------- */

.hero-photos {
  position: relative;
  min-height: 460px;
  padding: 24px 0 36px;
}

.hero-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-2);
  box-shadow: 0 30px 60px -24px rgba(11, 26, 61, 0.45);
}

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

.hero-photo-main {
  width: min(78%, 400px);
  aspect-ratio: 4 / 5;
  margin-inline-start: auto;
  margin-inline-end: 6%;
  position: relative;
  z-index: 1;
}

.hero-photo-main::after {
  /* soft brand tint at the bottom so the cards sit nicely */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 26, 61, 0.35) 100%);
  pointer-events: none;
}

.hero-photo-small {
  position: absolute;
  width: min(38%, 190px);
  aspect-ratio: 3 / 4;
  inset-inline-start: 0;
  bottom: 0;
  z-index: 2;
  border: 6px solid var(--surface);
}

/* decorative brand ring behind the photos */
.hero-photos::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  inset-inline-end: -6%;
  top: 4%;
  border-radius: 50%;
  background: var(--brand-gradient);
  opacity: .14;
  filter: blur(2px);
  z-index: 0;
}

.hero-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: .86rem;
  box-shadow: 0 14px 30px -12px rgba(15, 23, 42, 0.35);
  white-space: nowrap;
  text-decoration: none;
}

.hero-chip .badge-check { flex-shrink: 0; }

.hero-chip-verified { top: 8%; inset-inline-start: 4%; }

.hero-chip-emergency { top: 42%; inset-inline-end: 0; }

.hero-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red-500);
  box-shadow: 0 0 0 4px var(--tint-red);
}

.hero-chip-place {
  bottom: 2%;
  inset-inline-end: 8%;
  background: var(--blue-900);
  color: #fff;
}

.hero-chip-place:hover { background: var(--blue-800); }
.hero-chip-place:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-chip-verified { animation: hero-float 6s ease-in-out infinite; }
  .hero-chip-emergency { animation: hero-float 7s ease-in-out -2s infinite; }
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 959.98px) {
  .hero-photos { max-width: 460px; margin-inline: auto; width: 100%; }
}

@media (max-width: 479.98px) {
  .hero-photos { min-height: 0; padding-bottom: 48px; }
  .hero-chip { font-size: .78rem; padding: 8px 12px; }
  .hero-chip-emergency { top: 46%; }
}

/* ---------- Highlights strip ---------- */

.highlights { padding-block: 8px 48px; }

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .highlights-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

.highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.highlight-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tint-blue);
  color: var(--accent-text);
}

.highlight-icon-red { background: var(--tint-red); color: var(--red-fg); }

.highlight strong { display: block; font-size: .95rem; color: var(--text); line-height: 1.35; }
.highlight span:not(.highlight-icon) { display: block; font-size: .8rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }

@media (max-width: 479.98px) {
  .highlight { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
}

/* ---------- Photo behind the final call to action ---------- */

.download-photo {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(180deg, rgba(11, 26, 61, 0.80) 0%, rgba(11, 26, 61, 0.92) 100%),
    url("../assets/gallery/kakuma-01.webp");
  background-size: cover;
  background-position: center 35%;
}

.download-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(500px 300px at 15% 0%, rgba(34,195,171,.28), transparent 60%),
    radial-gradient(500px 300px at 85% 100%, rgba(28,102,216,.38), transparent 60%);
}

/* ---------- Reveal on scroll (js/enhance.js adds .reveal-ready) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
    transition-delay: var(--reveal-delay, 0s);
  }

  .reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- About us (added 2026-11-25) ---------- */

.about-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.about-inner h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  margin: 0 0 14px;
}

.about-lead {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.9;
  margin: 0 0 18px;
}

.about-link { font-weight: 700; color: var(--link); text-decoration: none; }
.about-link:hover { text-decoration: underline; }

.footer-org { margin-bottom: 6px; }

/* Legal pages: small cross-links under the footer text */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0 0 10px; font-size: .85rem; }
.legal-links a { color: var(--link); text-decoration: none; font-weight: 600; }
.legal-links a:hover { text-decoration: underline; }
