/* pacefun – static one-pager. Colours match the Instagram graphics (pf.py). */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1116;
  --card: #181c23;
  --fg: #f5f5f0;
  --muted: #969ca5;
  --dim: #464c56;
  --acc: #ff6a3d;
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--acc); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }
h1, h2 { line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 900; }
h1 { font-size: clamp(2rem, 8.6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.6rem); }
p { margin: 0 0 1em; }
.acc { color: var(--acc); }
.center { text-align: center; }

.skip { position: absolute; left: -999px; top: 0; background: var(--acc); color: var(--bg); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.narrow > * { max-width: 720px; }
.section { padding: 4.5rem 0; }
.section.alt { background: var(--card); }

.tag, .kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--acc); margin: 0 0 .9rem;
}
.kicker { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block; background: var(--acc); color: var(--bg);
  font-weight: 800; text-decoration: none; padding: .9em 1.6em; border-radius: 999px;
  border: 2px solid var(--acc); transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); background: #ff7d55; border-color: #ff7d55; }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--acc); }
.btn--ghost:hover { background: var(--acc); color: var(--bg); }

/* Hero */
.hero { padding: 3rem 0 4rem; text-align: center; }
.hero-inner { display: grid; justify-items: center; gap: 1.5rem; }
.hero-logo { width: 240px; height: 240px; border-radius: 50%; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 34em; margin-inline: auto; margin-bottom: 1.8rem; }

/* Story */
#story p { font-size: 1.15rem; }
cite { font-style: italic; color: var(--fg); }

/* Numbers */
.stats {
  list-style: none; margin: 2rem 0 1.5rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem;
}
.stat {
  background: var(--bg); border-radius: var(--radius); padding: 1.2rem 1.1rem;
  display: flex; flex-direction: column; gap: .15rem; position: relative;
}
.stat::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--acc); margin-bottom: .7rem; }
.val { font-size: clamp(1.6rem, 6.5vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.val small { font-size: .5em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.lbl { color: var(--acc); font-weight: 600; font-size: .95rem; }
.sub { color: var(--muted); font-size: .85rem; }
.note { color: var(--muted); font-size: .85rem; margin: 0; }

/* Streak */
.streak-box {
  position: relative; overflow: hidden;
  border: 2px solid var(--acc); border-radius: 28px; padding: 2rem 1.5rem;
  display: grid; gap: 1.5rem; align-items: center; text-align: center; justify-items: center;
  background: radial-gradient(circle at 50% 0%, rgba(255,106,61,.12), transparent 65%);
}
.streak-ring {
  width: 96px; height: 96px; border-radius: 50%;
  border: 6px solid var(--acc); position: relative;
}
.streak-ring::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 5px solid var(--dim);
}
.streak-ring::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fg); top: -2px; right: 2px; box-shadow: 0 0 0 5px var(--bg);
}
.streak-num { font-size: clamp(3rem, 14vw, 5rem); font-weight: 900; line-height: 1; margin: 0 0 .5rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.streak-num span { color: var(--acc); }
.streak-num--static { font-size: clamp(2.4rem, 10vw, 3.6rem); }
.streak-sub { font-size: 1.1rem; margin-bottom: .3rem; }
.streak-rec { color: var(--muted); font-size: .9rem; margin: 0; }

/* Instagram grid */
.ig-grid {
  list-style: none; margin: 2rem 0 2.2rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem;
}
.ig-grid a { display: block; border-radius: 12px; overflow: hidden; background: var(--bg); }
.ig-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .25s ease, opacity .25s ease; }
.ig-grid a:hover img { transform: scale(1.03); opacity: .92; }

/* Contact */
#contact p { font-size: 1.1rem; }
#contact .btn { margin-top: .5rem; }

/* Footer */
.footer { border-top: 1px solid #232831; padding: 2.5rem 0 3rem; color: var(--muted); font-size: .95rem; }
.footer-inner { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.footer-brand { font-size: 1.6rem; font-weight: 900; color: var(--fg); margin: 0; letter-spacing: -0.02em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--dim); }
.footer a:hover { color: var(--acc); border-color: var(--acc); }
.footer-legal a { color: var(--muted); }
.footer-copy { margin: 0; font-size: .85rem; }

/* Legal pages */
.legal { padding: 2.5rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 7vw, 3rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal p, .legal li { color: #d7dade; }
.legal .back { display: inline-block; margin-bottom: 2rem; text-decoration: none; font-weight: 700; }
.template-warning {
  border: 2px dashed var(--acc); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 2rem;
  background: rgba(255,106,61,.08); color: var(--fg);
}
.ph { background: rgba(255,106,61,.18); color: var(--acc); padding: 0 .25em; border-radius: 4px; font-weight: 700; }

/* ---------- Larger screens ---------- */
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
  .ig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .section { padding: 6rem 0; }
}
@media (min-width: 900px) {
  .hero { padding: 5rem 0 6rem; text-align: left; min-height: 80vh; display: flex; align-items: center; }
  .hero-inner { grid-template-columns: 360px 1fr; gap: 4rem; align-items: center; justify-items: start; }
  .hero-logo { width: 360px; height: 360px; }
  .lead { margin-inline: 0; }
  .streak-box { grid-template-columns: auto 1fr; text-align: left; justify-items: start; padding: 2.5rem 3rem; gap: 2.5rem; }
  .streak-ring { width: 140px; height: 140px; border-width: 8px; }
  .streak-ring::before { inset: 14px; border-width: 6px; }
  .streak-ring::after { width: 30px; height: 30px; }
  .footer-inner { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; align-items: center; }
  .footer-social { justify-self: center; }
  .footer-copy { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .ig-grid img { transition: none; }
  .btn:hover, .ig-grid a:hover img { transform: none; }
}
