/* Dinjir homepage, /help/, /sources/ and /advertise/ landing. Loaded AFTER /roof/assets/roof.css,
   which owns the design tokens (navy / cream / gold / blue), the unified header, buttons, cards
   and type. Only what is specific to these pages lives here.
   Colour roles on the homepage: blue = search (free), gold = paid reports, red dot = a live desk. */

/* ---------- hero: search first ---------- */
.home-hero { position: relative; padding: clamp(4.25rem, 9vw, 5.5rem) 0 clamp(2.25rem, 6vw, 3.75rem); isolation: isolate; }
.home-hero > .wrap { position: relative; z-index: 1; max-width: 920px; }
.home-hero h1 { font-size: clamp(2.15rem, 7vw, 4rem); line-height: 1.05; max-width: 15ch; }
.home-hero .lede { margin-top: 1rem; max-width: 38rem; }
.home-hero .trust { margin-top: 1.25rem; }
form.search-form.hero-search { margin-top: 1.75rem; max-width: 46rem; box-shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(47, 111, 237, 0.07); }
.hero-msg { min-height: 1.4em; margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--warn); }
.hero-msg:empty { min-height: 0; margin: 0; }
.hero-alt { margin: 0.9rem 0 0; font-size: 0.95rem; color: var(--text-2); }
.hero-alt a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--gold); text-decoration: underline; text-decoration-color: rgba(233, 180, 76, 0.45); text-underline-offset: 4px; }
.hero-alt a:hover { color: #F2C26B; text-decoration-color: var(--gold); }

/* example searches: one swipeable row on a phone, wrapping on wider screens */
.chips { display: flex; gap: 0.5rem; margin: 0.9rem 0 0; padding: 0 0 0.25rem; list-style: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: 0 0 auto; }
.chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.95rem; border-radius: 999px; white-space: nowrap;
  font-size: 0.9rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chips a:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
@media (min-width: 760px) { .chips { flex-wrap: wrap; overflow: visible; } }

/* Ambient backdrop (data/media-registry.json "home-hero" -> js/media-video.js). Confined to the
   hero, behind the content and dissolved at the bottom edge, so it never sits under the
   rest of the page. Its AI-illustration disclosure is painted top-right, clear of the copy. */
.home-hero .media-surface { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.media-surface__poster, .media-surface__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms ease; }
.media-surface__poster { background-size: cover; background-position: center; }
.media-surface[data-media-state="poster"] .media-surface__poster,
.media-surface[data-media-state="playing"] .media-surface__poster { opacity: 0.32; }
.media-surface[data-media-state="playing"] .media-surface__video { opacity: 0.32; }
.media-surface::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 35% 45%, rgba(6, 11, 20, 0.82), rgba(6, 11, 20, 0.5) 75%, transparent),
    linear-gradient(180deg, rgba(6, 11, 20, 0.5), rgba(6, 11, 20, 0.25) 40%, rgba(6, 11, 20, 0.7)); }
.media-surface__disclosure { position: absolute; top: 0.6rem; right: 1rem; z-index: 1; margin: 0; max-width: min(calc(100vw - 2rem), 30rem); padding: 0.2rem 0.55rem; border-radius: 6px;
  background: rgba(6, 11, 20, 0.78); text-align: right; font-size: 0.7rem; line-height: 1.35; letter-spacing: 0.03em; color: rgba(244, 239, 228, 0.86); opacity: 0; transition: opacity 900ms ease; }
.media-surface[data-media-state] .media-surface__disclosure { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .media-surface__poster, .media-surface__video, .media-surface__disclosure { transition: none; }
}

/* ---------- sections ---------- */
.home-section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.home-section .section-head { margin-bottom: clamp(1.25rem, 3.5vw, 2rem); }
.home-section h3 { font-size: clamp(1.15rem, 3vw, 1.35rem); }
.section-head.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 2rem; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; font-weight: 600; color: #8DB4FF; text-decoration: none; border-bottom: 1px solid rgba(141, 180, 255, 0.35); }
.text-link:hover { color: #B8D0FF; border-bottom-color: #B8D0FF; }

/* search box (hero) */
form.search-form {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem; border-radius: 20px; max-width: 46rem;
  background: rgba(13, 24, 40, 0.92); border: 1px solid var(--line-strong);
}
form.search-form:focus-within { border-color: var(--blue-hi); box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.3); }
form.search-form input[type="text"] {
  /* 16px or more, so iOS Safari does not zoom the page when the box is tapped */
  flex: 1; min-width: 0; min-height: 52px; font-family: inherit; font-size: 1.06rem; padding: 0 1rem; border: none; background: transparent; color: var(--text); outline: none;
}
form.search-form input[type="text"]::placeholder { color: rgba(244, 239, 228, 0.52); }
form.search-form button.search-btn {
  flex-shrink: 0; min-height: 52px; font-family: inherit; font-size: 1.02rem; font-weight: 600; padding: 0 1.6rem; border-radius: 15px; border: none;
  background: var(--blue); color: #fff; cursor: pointer; transition: background 0.15s ease;
}
form.search-form button.search-btn:hover { background: var(--blue-hi); }
@media (max-width: 520px) {
  form.search-form { flex-direction: column; align-items: stretch; padding: 0.5rem; }
  form.search-form input[type="text"] { padding: 0 0.75rem; }
  form.search-form button.search-btn { width: 100%; }
}

/* ---------- live intelligence ---------- */
.desks { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .desks { grid-template-columns: repeat(3, 1fr); } }
.desk {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: background 0.15s ease, border-color 0.15s ease;
}
.desk:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.desk b { font-size: 1.12rem; letter-spacing: -0.01em; }
.desk-k { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.desk-d { font-size: 0.92rem; color: var(--text-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF6B5A; box-shadow: 0 0 0 0 rgba(255, 107, 90, 0.5); animation: live-pulse 2.4s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 90, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(255, 107, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* recent incidents (ids unchanged; filled by the script in index.html) */
.home-events { margin: 1.5rem 0 0; text-align: left; }
.home-events[hidden] { display: none; }
.home-events-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 0.85rem; }
h3.home-events-title { margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.home-events-all { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; color: var(--text-2); text-decoration: none; border-bottom: 1px solid rgba(244, 239, 228, 0.2); }
.home-events-all:hover { color: #EAF1FF; border-bottom-color: rgba(234, 241, 255, 0.5); }
.home-events-list { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.home-events-fresh { margin-top: 0.6rem; }
.home-events-fresh[hidden] { display: none; }
.home-event-card { position: relative; display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 0.9rem; border-radius: 10px; text-decoration: none; background: rgba(244, 239, 228, 0.05); border: 1px solid rgba(244, 239, 228, 0.1); transition: background 0.12s, border-color 0.12s; }
.home-event-card:hover { background: rgba(244, 239, 228, 0.09); border-color: rgba(244, 239, 228, 0.25); }
.home-event-card:focus-visible { outline: 2px solid #F4EFE4; outline-offset: 2px; }
.home-event-card.has-media { border-color: rgba(240, 180, 76, 0.45); }
.home-event-card.has-media:hover { border-color: #F0B44C; }
.home-event-badge { position: absolute; top: 0.7rem; right: 0.8rem; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: #F0B44C; color: #14100a; padding: 2px 6px; border-radius: 4px; }
.home-event-title { font-size: 0.95rem; font-weight: 600; color: #EAF1FF; padding-right: 3rem; }
.home-event-meta { font-size: 0.78rem; color: rgba(244, 239, 228, 0.66); }
.home-event-source { font-size: 0.72rem; color: rgba(244, 239, 228, 0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- reports ---------- */
.report-feature {
  display: grid; gap: 1.5rem; padding: clamp(1rem, 3vw, 1.75rem); border-radius: 22px;
  border: 1px solid rgba(233, 180, 76, 0.32); background: linear-gradient(160deg, rgba(233, 180, 76, 0.06), rgba(244, 239, 228, 0.02) 45%);
}
.report-feature > * { min-width: 0; }
@media (min-width: 900px) { .report-feature { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2.5rem; align-items: start; } }
.report-k { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
h3.report-title { margin: 0.35rem 0 0; font-size: clamp(1.5rem, 4vw, 2rem); }
.report-d { margin: 0.6rem 0 0; color: var(--text-2); max-width: 36rem; }
.report-copy .searchbar { margin-top: 1.25rem; }
.report-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0.75rem 0 0; }
.report-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.sample-actions { margin-top: 1rem; }
.sample-actions .fine { margin-top: 0.5rem; max-width: 36rem; }

/* demo slot: the seven real sample pages */
.demo { margin: 0; }
.demo-frame {
  border-radius: 18px; border: 1px solid var(--line-strong); padding: 0.9rem;
  background: linear-gradient(180deg, rgba(244, 239, 228, 0.08), rgba(244, 239, 228, 0.03));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
}
h3.demo-label { margin: 0 0 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.demo-stage { position: relative; width: min(100%, 300px); aspect-ratio: 1275 / 1650; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line-strong); }
.demo-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.35s ease; }
.demo-stage img.is-active { opacity: 1; }
.demo-caption { margin: 0.7rem 0 0; min-height: 2.9em; font-size: 0.88rem; color: var(--text-2); }
.demo-caption b { color: var(--text); }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.5rem; margin-top: 0.25rem; }
.demo-pause { min-height: 44px; padding: 0 1rem; font-size: 0.88rem; border-radius: 12px; }
.demo-dots { display: flex; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.demo-dot { appearance: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.demo-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(244, 239, 228, 0.3); transition: background 0.15s, transform 0.15s; }
.demo-dot[aria-current="true"]::before { background: var(--gold); transform: scale(1.25); }
/* dots share the row on the narrowest phones instead of pushing past the card (44px tall at every width) */
@media (max-width: 380px) { .demo-dot { flex: 1 1 0; width: auto; min-width: 28px; max-width: 44px; } }
@media (prefers-reduced-motion: reduce) { .demo-stage img { transition: none; } }

/* price + test-mode notice */
.price-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-top: 1.25rem; padding: 1rem 1.15rem;
  border-radius: var(--radius); border: 1px solid rgba(233, 180, 76, 0.45); background: rgba(233, 180, 76, 0.07);
}
.price-strip b { display: block; font-size: 1.02rem; }
.price-strip span.k { display: block; font-size: 0.88rem; color: var(--text-2); margin-top: 0.15rem; }
.price-amt a { color: inherit; text-decoration: underline; text-underline-offset: 4px; font-size: 1rem; font-weight: 600; }
.price-amt { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.test-note { margin: 0.6rem 0 0; }
.test-note[hidden] { display: none; }

/* Dinjir Verified block */
.verified { display: grid; gap: 1rem 1.5rem; align-items: center; margin-top: 1.5rem; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.verified .seal-glyph { width: 64px; height: 64px; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.55)); }
.verified h3 { font-size: clamp(1.2rem, 3.4vw, 1.5rem); }
.verified h3 .v-tag { display: block; margin-top: 0.3rem; font-size: 0.7em; font-weight: 500; color: var(--gold); letter-spacing: -0.01em; }
.verified p { margin: 0.7rem 0 0; color: var(--text-2); max-width: 44rem; }
@media (min-width: 640px) { .verified { grid-template-columns: auto 1fr; } }

/* ---------- help tiles + source list (homepage, /help/, /sources/) ---------- */
.tiles { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: background 0.15s ease, border-color 0.15s ease;
}
.tile:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.tile b { font-size: 1.04rem; }
.tile span { font-size: 0.92rem; color: var(--text-2); }
.source-list { display: grid; gap: 0.6rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .source-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .source-list { grid-template-columns: repeat(3, 1fr); } }
.source-list li { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--line); }
.source-list b { font-size: 0.98rem; }
.source-list span { font-size: 0.86rem; color: var(--text-3); }

/* content pages (/help/, /sources/) */
.page-hero { padding: clamp(2.5rem, 7vw, 4rem) 0 clamp(1.25rem, 4vw, 2rem); }
.page-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.page-section { padding: clamp(1.5rem, 5vw, 2.5rem) 0; border-top: 1px solid var(--line); }
.page-section h2 { font-size: clamp(1.35rem, 3.6vw, 1.8rem); margin-bottom: 1rem; }
.page-section .sub { margin-bottom: 1.25rem; }
.source-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.source-table th, .source-table td { text-align: left; vertical-align: top; padding: 0.75rem 0.75rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.source-table th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.source-table td:first-child { font-weight: 600; color: var(--text); }
.source-table td { color: var(--text-2); }
@media (max-width: 640px) {
  .source-table thead { display: none; }
  .source-table tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .source-table td { display: block; padding: 0.1rem 0; border: 0; }
}

/* footer */
footer.site-foot .foot-cols { display: grid; gap: 0.5rem 2rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
footer.site-foot .foot-h { margin: 1rem 0 0.15rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
footer.site-foot .foot-col { display: flex; flex-direction: column; }
@media (min-width: 640px) { footer.site-foot .foot-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { footer.site-foot .foot-cols { grid-template-columns: repeat(4, 1fr); } }

/* /advertise/ landing */
.adv-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
.adv-grid .card h3 + p { margin-top: 0.6rem; }
.adv-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.adv-note { max-width: 46rem; }
