/* joinfor.me — shared stylesheet (static site + account pages served by the API).
   Variables first so the Go templates can reuse them. Light theme only. */
:root {
  --bg: #ffffff;
  --bg-warm: #faf8f5;
  --bg-sand: #f4efe8;
  --ink: #111110;
  --ink-soft: #45433f;
  --ink-muted: #6b6966;
  --line: rgba(17, 17, 16, 0.10);
  --accent: #ff9933;
  --accent-deep: #c85f00;       /* text/links on white: AA contrast */
  --accent-btn: #e8760f;
  --accent-tint: #fff3e6;
  --green: #2f8f4e;
  --red: #c0392b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17,17,16,.04), 0 8px 24px rgba(17,17,16,.06);
  --shadow-lg: 0 2px 4px rgba(17,17,16,.04), 0 24px 60px rgba(17,17,16,.12);
  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--bg); overflow-wrap: break-word;
  /* Footer stays at the bottom on short pages. */
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--bg-sand); padding: .1em .35em; border-radius: 6px; }
pre { background: var(--bg-sand); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; overflow-wrap: normal; }
pre code { background: none; padding: 0; border-radius: 0; font-size: 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--bg); padding: 8px 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* Header / footer */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--ink); }
/* Buttons inside the nav keep their own colours (.nav a would otherwise win: dark text on a dark button). */
.nav a.btn-primary, .nav a.btn-primary:hover, .nav a.btn-accent, .nav a.btn-accent:hover,
.nav a.btn-danger, .nav a.btn-danger:hover { color: #fff; }
.nav a.btn { font-weight: 700; }
.nav a.btn-ghost, .nav a.btn-ghost:hover { color: var(--ink); }
@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  /* Let a long nav drop below the brand instead of overflowing the screen. */
  .site-header .wrap { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 8px; padding-bottom: 8px; row-gap: 0; }
  .nav { flex-wrap: wrap; gap: 0 18px; }
  .nav a:not(.btn) { padding: 10px 0; }
}

.site-footer { border-top: 1px solid var(--line); background: var(--bg-warm); padding: 40px 0; margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer nav a { padding: 8px 0; }
.site-footer a { color: var(--ink-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; font-family: inherit;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b2a28; color: #fff; }
.btn-accent { background: var(--accent-btn); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: 72px 0; }
.section-warm { background: var(--bg-warm); }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: 10px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* Hero */
.hero { padding: 64px 0 48px; background: linear-gradient(180deg, var(--accent-tint), var(--bg) 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 18px; }
.hero .badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero .platforms { display: flex; align-items: center; gap: 14px; margin-top: 22px; color: var(--ink-muted); font-size: .95rem; flex-wrap: wrap; }
.hero .platforms img { width: 26px; height: 26px; object-fit: contain; }
.mock { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #202124; }
.mock figcaption { background: #fff; padding: 12px 16px; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Cards / grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card .tag { font-size: .8rem; font-weight: 700; color: var(--accent-deep); background: var(--accent-tint);
  padding: 3px 10px; border-radius: 999px; }
.card ul { padding-left: 1.1em; margin: 0; color: var(--ink-soft); }
.card li { margin: .3em 0; }
.quote { font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 12px; margin: 0 0 14px; }

.steps { counter-reset: step; }
.step { text-align: center; }
.step img { width: 112px; height: 112px; margin: 0 auto 12px; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--accent-deep); }

.logos { display: flex; flex-wrap: wrap; gap: 14px; }
.logo-chip { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px 8px 8px; font-weight: 600; }
.logo-chip img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-deep); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

.cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 48px 32px; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.8); }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta .btn-ghost:hover { border-color: #fff; }
.cta .btn-row { justify-content: center; }

/* Prose (legal pages) */
.prose { padding: 48px 0; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }

@media (max-width: 720px) {
  section { padding: 52px 0; }
  .hero { padding: 40px 0 36px; }
  .hero .wrap { gap: 36px; }
  .card { padding: 20px; }
  .cta { padding: 36px 20px; }
  .prose { padding: 32px 0; }
}

/* Forms + tables (account pages) */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--ink-muted); font-weight: 600; }
/* Wide tables scroll inside their own box instead of widening the page. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  /* Edge shadows appear only when there is more to scroll to. */
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(17,17,16,.16), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(17,17,16,.16), transparent) right / 12px 100% no-repeat scroll; }
.table-wrap .table th, .table-wrap .table td { white-space: nowrap; vertical-align: middle; }
.notice { background: var(--accent-tint); border: 1px solid #ffd9b0; border-radius: var(--radius-sm); padding: 12px 16px; }
.error { background: #fdecea; border: 1px solid #f5c2bd; border-radius: var(--radius-sm); padding: 12px 16px; color: #7a1f16; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg-sand); }
.pill-live { background: #e3f4e8; color: var(--green); }
.pill-fail { background: #fdecea; color: var(--red); }
.mt { margin-top: 20px; }
