/*
Theme Name: Nearby Now
Description: Theme for the Nearby Now plugin: landing page, join/login, legal pages and a full-screen map. Colours follow the time of day.
Version: 1.0.3
Requires at least: 6.2
Requires PHP: 8.1
Text Domain: up-now-theme
*/

/* Same colour tokens as the plugin, so the theme still looks right if the plugin is off. */
:root {
  color-scheme: dark;
  --bg: #120f22; --surface: #1c1833; --surface-2: #262044; --line: #352d5a;
  --fg: #f1ecff; --muted: #a49cc4; --accent: #ff9a4d; --accent-ink: #2a1300; --rose: #ff5f8f;
  --glow1: rgba(255,154,77,.16); --glow2: rgba(255,95,143,.10);
  --display: "Syne", "Trebuchet MS", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
:root[data-period="morning"] { --bg: #1a1630; --surface: #251f3d; --surface-2: #30284f; --line: #40366a; --accent: #ffb46b; --glow1: rgba(255,180,110,.32); --glow2: rgba(255,130,170,.20); }
:root[data-period="day"] { color-scheme: light; --bg: #f4f2fb; --surface: #ffffff; --surface-2: #ece8f7; --line: #d9d2ee; --fg: #1d1733; --muted: #6a6288; --accent: #e0611f; --accent-ink: #ffffff; --rose: #e0336b; --glow1: rgba(255,170,60,.22); --glow2: rgba(80,170,255,.16); }
:root[data-period="evening"] { --bg: #170f25; --surface: #22183a; --surface-2: #2e2149; --line: #3f2f62; --accent: #ff8a5c; --glow1: rgba(255,110,90,.26); --glow2: rgba(170,90,255,.20); }

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55;
  background-image: radial-gradient(60% 40% at 80% -5%, var(--glow1), transparent 70%), radial-gradient(50% 35% at 0% 100%, var(--glow2), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap-in {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 24px; text-decoration: none; color: var(--fg); }
.logo em { font-style: normal; color: var(--accent); }
.site-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-nav a.btn { color: inherit; }
.btn { border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; background: var(--surface-2); color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 700; }
.btn.primary { background: var(--accent); color: var(--accent-ink) !important; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }

/* landing */
.landing { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 56px 40px; }
@media (max-width: 860px) { .landing { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 32px; } }
.hero { display: grid; gap: 22px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; margin: 0; line-height: .9; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 44ch; margin: 0; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.steps li::marker { font-family: var(--mono); color: var(--accent); }
.promises { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; color: var(--muted); }
.promises li { display: flex; gap: 10px; }
.promises li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
.live-count { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.live-count i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* pages */
.page-main { max-width: 760px; margin: 0 auto; padding-block: 40px 56px; }
.page-main h1 { font-size: clamp(32px, 6vw, 44px); margin: 0 0 18px; }
.entry { display: grid; gap: 4px; }
.entry p, .entry li { max-width: 68ch; }
.entry h2 { font-size: 22px; margin: 22px 0 6px; }
.entry ul { padding-left: 20px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-foot .wrap-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px 40px; }
.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

/* full-screen app page: no theme header/footer */
body.upnow-fullscreen { padding-top: env(safe-area-inset-top, 0px); }

/* phones: most visitors */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overflow-x: clip; }
.hero-cta { display: none; }
@media (max-width: 860px) {
  .hero-cta { display: inline-flex; justify-content: center; width: 100%; min-height: 52px; font-size: 17px; }
}
@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .site-head .wrap-in { padding-block: 10px; gap: 10px; }
  .logo { font-size: 21px; white-space: nowrap; }
  .site-nav { flex-wrap: nowrap; gap: 4px; }
  .site-nav ul { display: none; }   /* menu links stay in the footer */
  .site-nav > a { white-space: nowrap; }
  .site-nav > a:not(.btn) { padding: 10px 8px; }
  .site-nav .btn { padding: 9px 16px; min-height: 42px; }
  .landing { padding-block: 22px 28px; gap: 28px; }
  .hero { gap: 16px; }
  .hero .lede { font-size: 16.5px; }
  .page-main { padding-block: 24px 40px; }
  .entry h2 { font-size: 20px; }
  .site-foot .wrap-in { flex-direction: column; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .site-foot nav { gap: 4px 18px; }
  .site-foot nav a { display: inline-block; padding-block: 8px; }
}

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