/* Temporary runman.co: one stylesheet for every page. Colours follow the v2 app (app/src/index.css):
   white page, ink text, Run Man red, a deeper red gradient for big red areas, and black in dark mode.
   Light or dark follows the phone/computer setting automatically. */
:root {
  --paper: #FFFFFF;
  --surface: #F5F5F7;
  --ink: #111113;
  --muted: #6E6E73;
  --hairline: #E5E5EA;
  --brand: #FF3131;
  --brand-text: #D92A22;      /* red for small text on white, a touch darker so it reads well */
  --accent-soft: #FFEDED;
  --footer: #141414;
  --shadow: 0 24px 48px rgba(0,0,0,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --surface: #1C1C1E;
    --ink: #F5F5F7;
    --muted: #9A9AA1;
    --hairline: #2C2C2E;
    --brand-text: #FF5A52;
    --accent-soft: #3A1416;
    --footer: #0B0B0C;
    --shadow: 0 24px 48px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--footer); /* shows under the rounded bottom of the page, like the v2 site */
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 16px; line-height: 1.55;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* The page sits on the dark footer with a rounded, shadowed bottom edge. */
.page { position: relative; z-index: 1; background: var(--paper); border-radius: 0 0 36px 36px; box-shadow: var(--shadow); overflow: hidden; }

/* Deep red band (hero and inner-page header): softer than the bright brand red over a big area. */
.red { background-color: #c92c26; background-image: linear-gradient(160deg, #de3a32 0%, #c92c26 55%, #b0231f 100%); color: #fff; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.topbar img { height: 60px; width: auto; display: block; margin-left: -6px; }
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 28px; text-align: right; }
.topbar .navlink { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.9); text-decoration: none; }
.topbar .navlink:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Notify bell (top bar, home page): rings every few seconds, with a pulsing halo and a "2" badge, to invite a tap.
   It jumps to the Run Man 2.0 sign-up. Hover or focus shows a small label. */
.bell {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%; background: #fff; color: #c92c26; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: transform .2s ease;
}
.bell svg { width: 24px; height: 24px; transform-origin: 50% 8%; animation: bell-ring 4s ease-in-out 1s infinite; }
.bell::before { /* halo */
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.9);
  animation: bell-halo 4s ease-out 1s infinite; pointer-events: none;
}
.bell .bell-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #111113; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
  border: 2px solid #c92c26; animation: bell-badge 4s ease-in-out 1s infinite;
}
.bell .tip {
  position: absolute; top: calc(100% + 10px); right: 0; white-space: nowrap; padding: 6px 10px; border-radius: 8px;
  background: #111113; color: #fff; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease; pointer-events: none;
}
.bell:hover, .bell:focus-visible { transform: scale(1.08); }
.bell:hover svg, .bell:focus-visible svg { animation: bell-ring 1s ease-in-out infinite; }
.bell:hover .tip, .bell:focus-visible .tip { opacity: 1; transform: none; }
@keyframes bell-ring {
  0%, 20%, 100% { transform: rotate(0); }
  2% { transform: rotate(16deg); } 5% { transform: rotate(-14deg); } 8% { transform: rotate(11deg); }
  11% { transform: rotate(-8deg); } 14% { transform: rotate(5deg); } 17% { transform: rotate(-2deg); }
}
@keyframes bell-halo { 0% { transform: scale(1); opacity: .9; } 30%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes bell-badge { 0%, 100% { transform: scale(1); } 3% { transform: scale(1.25); } 8% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bell svg, .bell::before, .bell .bell-count { animation: none !important; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::after { /* a soft glow so the red has some depth */
  content: ''; position: absolute; right: -180px; top: -120px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.16), transparent); pointer-events: none;
}
.hero-body { position: relative; z-index: 1; text-align: center; padding-top: 40px; padding-bottom: 88px; }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.hero h1 { margin-top: 14px; font-size: clamp(44px, 8.5vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.0; }
.hero .lede { margin: 20px auto 0; max-width: 520px; font-size: 18px; line-height: 1.5; color: rgba(255,255,255,.9); }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }

/* Store badges, same as the v2 site */
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; width: 180px; padding: 0 14px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: #000; color: #fff; text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.badge:hover { border-color: rgba(255,255,255,.6); transform: translateY(-1px); }
.badge .ic { display: grid; place-items: center; width: 24px; flex-shrink: 0; }
.badge .t { text-align: left; line-height: 1; }
.badge .t small { display: block; font-size: 11px; }
.badge .t b { display: block; margin-top: 3px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pill-white {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 26px; border-radius: 999px;
  background: #fff; color: #141414; font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .15s ease;
}
.pill-white:hover { transform: translateY(-1px); }
.pill-white svg { width: 18px; height: 18px; }

/* Version 2 */
.v2 { padding: 24px 0 96px; }
.v2-card {
  position: relative; max-width: 760px; margin: 0 auto; text-align: center;
  background: var(--surface); border-radius: 32px; padding: 56px 32px 44px; overflow: hidden;
}
.v2-card::before { /* thin red line along the top */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #de3a32, #FF3131, #b0231f);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--brand-text); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(255,49,49,.18); }
.v2 h2, .about h2 { margin-top: 18px; font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.06; }
.v2 p.body { margin: 16px auto 0; max-width: 540px; font-size: 18px; color: var(--muted); }
#notify { margin: 30px auto 0; max-width: 480px; text-align: left; }
.notify { margin-top: 14px; display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--paper); border: 1px solid var(--hairline); }
.notify:focus-within { border-color: var(--brand); }
.notify input[type=email] {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px; border: 0; background: transparent; border-radius: 999px;
  font: inherit; font-size: 16px; color: var(--ink);
}
.notify input[type=email]:focus { outline: none; }
.notify input::placeholder { color: var(--muted); }
.notify button {
  height: 48px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: filter .15s ease;
}
.notify button:hover { filter: brightness(.94); }
.notify button:disabled { opacity: .6; cursor: default; }
.msg { margin-top: 14px; min-height: 24px; font-size: 15px; font-weight: 600; color: #1F8A5B; }
.msg.err { color: var(--brand-text); }
.fine { margin-top: 4px; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* iOS / Android picker, same as the app's Notify me */
.apps { border: 0; padding: 0; margin: 0; min-width: 0; }
.apps legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.apps legend span { font-weight: 400; }
.app-opts { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-opt {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  border: 2px solid var(--hairline); border-radius: 16px; background: var(--paper); transition: border-color .15s ease, background .15s ease;
}
.app-opt:hover { border-color: var(--muted); }
.app-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app-opt .tick { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--hairline); }
.app-opt .lbl { line-height: 1.2; }
.app-opt .lbl b { display: block; font-size: 16px; font-weight: 600; }
.app-opt .lbl small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.app-opt:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
.app-opt input:checked + .tick { border: 0; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.app-opt:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }

/* About */
.about { padding: 88px 0 72px; }
.about-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; } }
.about .eyebrow { color: var(--brand-text); }
.about h2 { margin-top: 12px; }
.about p { font-size: 18px; line-height: 1.6; color: var(--ink); opacity: .86; }
.about p + p { margin-top: 16px; }
.towns { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.towns span { padding: 7px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; }

/* Inner pages (privacy, terms, contact) */
article { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; font-size: 16px; line-height: 1.7; }
article h1 { font-size: clamp(34px, 6vw, 48px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
article h2 { margin-top: 40px; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
article h3 { margin-top: 28px; font-size: 18px; font-weight: 700; }
article h4 { margin-top: 20px; font-size: 16px; font-weight: 700; }
article p { margin-top: 12px; color: var(--ink); }
article ul { margin-top: 10px; padding-left: 22px; }
article li { margin-top: 4px; }
article strong { font-weight: 700; }
article a { color: var(--brand-text); font-weight: 600; word-break: break-word; }
.updated { margin-top: 8px; color: var(--muted); font-size: 14px; }
.box { margin-top: 24px; background: var(--surface); border-radius: 20px; padding: 22px 24px; }
.box h2 { margin-top: 0; font-size: 17px; }
.box p { margin-top: 6px; }

/* Footer */
/* Footer reveal, like the v2 site: it stays pinned under the page, and the page (z-index above it, with a rounded,
   shadowed bottom) slides up to uncover it. .shade darkens it while it's still covered (set from the script). */
footer.site { position: sticky; bottom: 0; z-index: 0; background: var(--footer); color: #fff; padding: 56px 0 40px; }
footer.site .shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.45)); }
footer.site .wrap { position: relative; z-index: 1; }
.foot-grid { display: grid; gap: 36px; }
.foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
.foot-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; } .foot-grid > :first-child { grid-column: auto; } }
footer.site.unpinned { position: relative; } /* footer taller than the screen: no reveal, so all of it can be scrolled to */
footer.site img { height: 52px; width: auto; margin-left: -8px; display: block; }
footer.site .tag { margin-top: 12px; color: rgba(255,255,255,.7); font-size: 15px; }
footer.site h3 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
footer.site ul { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 10px; }
footer.site ul a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 15px; }
footer.site ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: 14px; color: rgba(255,255,255,.6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-bottom a { color: rgba(255,255,255,.6); text-decoration: none; }
.foot-bottom a:hover { color: #fff; }

@media (max-width: 560px) {
  .topbar { height: 72px; }
  .topbar img { height: 44px; }
  .topnav { gap: 18px; }
  .bell { width: 42px; height: 42px; }
  .topbar .navlink { font-size: 14px; }
  .hero-body { padding-top: 24px; padding-bottom: 72px; }
  .actions .badge { width: 100%; max-width: 300px; }
  .actions .pill-white { width: 100%; max-width: 300px; justify-content: center; }
  .v2 { padding-top: 8px; padding-bottom: 72px; }
  .about { padding-top: 64px; padding-bottom: 56px; }
  .v2-card { padding: 44px 20px 32px; border-radius: 28px; }
  .notify { flex-direction: column; border-radius: 24px; }
  .app-opt { padding: 10px 12px; gap: 10px; }
  .notify button { width: 100%; }
  .page { border-radius: 0 0 28px 28px; }
}
