/*
Theme Name: ModsDrop
Description: File-host theme for modsdrop.com — download pages, signed links, ad slots.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: modsdrop
*/

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --ink: #131922;
  --muted: #586273;
  --line: #dde2ea;
  --accent: #ec5f12;
  --accent-hi: #d4520c;
  /* Az orange ground carries dark ink: white on #ec5f12 is 2.9:1, near-black is 8.4:1. */
  --accent-ink: #1a0d03;
  /* Links need their own, darker orange: --accent itself is only 3.0:1 on the light ground. */
  --link: #b4450b;
  --ok: #157a4e;
  --ok-bg: #e2f5ec;
  --bad: #b3261e;
  --chip: #eef1f5;
  --shadow: 0 1px 2px rgba(19, 25, 34, .06), 0 8px 24px rgba(19, 25, 34, .06);
  --r: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b24;
    --ink: #e8ecf2;
    --muted: #97a2b3;
    --line: #242d3a;
    --accent: #ff7d2e;
    --accent-hi: #ff944f;
    --accent-ink: #1a0d03;
    --link: #ff7d2e;
    --ok: #4fd69b;
    --ok-bg: #12301f;
    --bad: #ff8a80;
    --chip: #1d2530;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2 { line-height: 1.2; text-wrap: balance; margin: 0; }
code { font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }

.md-wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
.md-main { flex: 1; padding-block: 28px 56px; }
.md-skip { position: absolute; left: -9999px; }
.md-skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.md-eyebrow { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* header / footer */
.md-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.md-top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.md-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.md-logo b { color: var(--accent); font-weight: 800; }
.md-top__tag { color: var(--muted); font-size: .88rem; white-space: nowrap; }
@media (max-width: 560px) { .md-top__tag { display: none; } }
.md-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.md-foot__in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 20px; }
.md-foot__nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.md-foot a { color: var(--muted); }
.md-foot a:hover { color: var(--ink); }

/* buttons */
.md-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; font: 700 1rem/1 var(--font); padding: 14px 22px; cursor: pointer; text-decoration: none; }
.md-btn--go { width: 100%; min-height: 64px; font-size: 1.2rem; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); transition: background .15s, transform .15s; }
.md-btn--go:hover { background: var(--accent-hi); }
.md-btn--go:active { transform: translateY(1px); }
.md-btn--go.is-wait { cursor: progress; opacity: .85; }
.md-btn__size { font-weight: 500; opacity: .85; font-size: .95rem; font-variant-numeric: tabular-nums; }
.md-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.md-btn--ghost:hover { border-color: var(--muted); color: var(--ink); }

/* file page */
.md-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; max-width: 760px; margin-inline: auto; }
.md-layout--side { max-width: none; }
@media (min-width: 960px) { .md-layout--side { grid-template-columns: minmax(0, 1fr) 300px; } }
.md-file { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); min-width: 0; }
.md-file__title { font-size: clamp(1.45rem, 3.6vw, 2.05rem); letter-spacing: -.015em; overflow-wrap: anywhere; }
.md-file__name { margin: 8px 0 0; font-family: var(--mono); font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.md-get { margin-top: 24px; }
.md-get__form { margin: 0; }
.md-get__state { min-height: 1.6em; margin: 10px 0 0; font-size: .95rem; color: var(--muted); }
.md-get__state.is-bad, .md-report__state.is-bad { color: var(--bad); }

.md-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.md-facts > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.md-facts__wide { grid-column: 1 / -1; }
.md-facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.md-facts dd { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.md-pill { display: inline-block; background: var(--chip); border-radius: 999px; padding: 2px 10px; font-size: .86rem; }
.md-pill--ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.md-src { margin: 20px 0 0; color: var(--muted); }

.md-report { margin-top: 24px; font-size: .95rem; }
.md-report summary { cursor: pointer; color: var(--muted); width: fit-content; }
.md-report summary:hover { color: var(--ink); }
.md-report__form { display: grid; gap: 14px; margin-top: 14px; max-width: 520px; }
.md-report__form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.md-report__form select, .md-report__form textarea, .md-report__form input { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.md-report__form button { justify-self: start; }
.md-report__state { margin: 0; min-height: 1.5em; color: var(--muted); }
.md-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ad slots: invisible while empty, clearly labelled and set apart from the button when filled */
.md-ad { margin-block: 24px; text-align: center; overflow: hidden; }
.md-ad__label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.md-ad--button { margin-top: 32px; }
/* reserve the slot's height so a late-loading unit cannot push the page around */
.md-ad--top { min-height: 124px; }
@media (min-width: 760px) { .md-ad--top { min-height: 114px; } }
.md-side { min-width: 0; }
.md-side .md-ad { margin-top: 0; }

/* ---- front page: centred hero, badge grid on a flowing line, deep glow at the foot ---- */
.md-home { position: relative; isolation: isolate; overflow: hidden; margin-top: -28px; padding-top: 28px; }
.md-home::before {          /* soft wash behind the hero */
  content: ""; position: absolute; inset: 0 0 auto; height: 70%; z-index: -2;
  background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 62%);
}
.md-home__glow {            /* the deep gradient that closes the section */
  height: clamp(120px, 22vw, 260px); margin-top: clamp(32px, 6vw, 72px);
  background: radial-gradient(70% 150% at 50% 100%, #0e1626 0%, #16233c 38%, color-mix(in srgb, var(--bg) 92%, #16233c) 76%, transparent 100%);
}

.md-hero2 { text-align: center; padding-block: clamp(28px, 7vw, 76px) 0; }
.md-hero2 h1 { font-size: clamp(2.1rem, 6.4vw, 3.6rem); letter-spacing: -.035em; line-height: 1.08; }
.md-hero2__lead { font-size: 1.08rem; color: var(--muted); max-width: 56ch; margin: 20px auto 0; }

/* 2x2 badge grid with the line running behind it */
.md-badges { position: relative; margin: clamp(32px, 6vw, 60px) auto 0; max-width: 900px; padding-block: 10px; }
.md-badges__line { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: 116%; height: 220px; color: var(--line); z-index: -1; pointer-events: none; }
.md-badges__grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: min(100%, 400px); margin: 0 auto; padding: 0; }
.md-badge { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); font-size: .92rem; font-weight: 600; }
.md-badge svg { color: var(--accent); }
.md-badges__aside { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; color: var(--muted); font-size: .92rem; font-weight: 600; }
.md-badges__aside svg { color: var(--ok); }
@media (min-width: 900px) {   /* on wide screens the aside sits out on the line, as in the brief */
  .md-badges__aside { position: absolute; right: 8px; top: 50%; translate: 0 -50%; margin: 0; background: var(--bg); padding: 6px 10px; border-radius: 999px; }
}

.md-cta { margin-top: clamp(36px, 7vw, 76px); }
.md-cta h2 { font-size: clamp(1.5rem, 4.2vw, 2.4rem); letter-spacing: -.03em; line-height: 1.12; }
.md-cta__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; margin: 24px 0 0; }
.md-cta__or { color: var(--muted); font-size: .92rem; }
.md-btn--inline { width: auto; min-height: 52px; font-size: 1rem; padding-inline: 26px; }
.md-cta__note { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }

.md-social { list-style: none; display: flex; justify-content: center; gap: 18px; margin: clamp(28px, 5vw, 44px) 0 0; padding: 0; }
.md-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.md-social a:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* older hero (kept for any page that still uses it) */
.md-hero { padding-block: clamp(24px, 6vw, 64px) 8px; max-width: 760px; }
.md-hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.03em; }
.md-hero__lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 18px 0 0; }
.md-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 36px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.md-stats > div { padding: 20px 24px; }
.md-stats > div + div { border-left: 1px solid var(--line); }
@media (max-width: 600px) { .md-stats > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.md-stats dt { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.md-stats dd { margin: 6px 0 0; font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.md-how, .md-faq { margin-top: 56px; max-width: 760px; }
.md-how h2, .md-faq h2 { font-size: 1.4rem; margin-bottom: 16px; }
.md-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; color: var(--muted); }
.md-steps strong { color: var(--ink); }
.md-faq details { border-top: 1px solid var(--line); padding-block: 14px; }
.md-faq details:last-child { border-bottom: 1px solid var(--line); }
.md-faq summary { cursor: pointer; font-weight: 600; }
.md-faq p { margin: 10px 0 0; color: var(--muted); max-width: 65ch; }

/* text pages, 404 */
.md-prose { max-width: 760px; }
.md-prose h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 20px; letter-spacing: -.02em; }
.md-prose h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.md-prose p, .md-prose li { max-width: 68ch; }
.md-gone { max-width: 640px; padding-block: clamp(24px, 8vw, 80px); }
.md-gone h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 14px; letter-spacing: -.02em; }
.md-gone p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
