/* Rugby TTL — slim website (theme v2.0.0, 12 Oct 2026).
   Tokens copied from the app's src/app/globals.css so the two look the same.
   If a token changes in the app, change it here too. */

:root {
  --blue: #1a6bbf;
  --blue-dark: #0f4d8c;
  --blue-deep: #0a1c38;
  --green: #2ecc40;
  --green-dark: #1fa832;
  --ink: #111111;
  --mist: #f3f6fa;
  --grey: #555555;
  --grey-soft: #8a96a6;
  --border: #e3e7ee;
  --font: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  --r-2xl: 16px;
  --r-3xl: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --hero: linear-gradient(90deg, #050f1c 0%, #0f4d8c 42%, #1a6bbf 100%);
  --track-display: -0.02em;
  --track-button: 0.08em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px; }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--grey); margin: 6px 0 0; font-size: 15px; }

/* ── Top bar (matches the app's TopBar) ─────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(243, 246, 250, 0.95);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 231, 238, 0.6);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.wordmark { font-weight: 900; text-transform: uppercase; font-size: 20px; letter-spacing: -0.01em; line-height: 1; }
.wm-blue { color: var(--blue); }
.wm-green { color: var(--green); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: var(--track-button);
  padding: 8px 10px; border-radius: 999px;
}
.nav a:hover { background: #fff; color: var(--blue); }
.topbar-cta { white-space: nowrap; }
.menu-btn {
  display: none; margin-left: auto; width: 42px; height: 42px; border: 0;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.drawer {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 20px 20px; max-width: 1120px; margin: 0 auto;
}
.drawer[hidden] { display: none; }
.drawer a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 800; text-transform: uppercase;
  letter-spacing: var(--track-button); font-size: 14px; padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.drawer .btn { margin-top: 12px; }

@media (max-width: 900px) {
  .nav, .topbar-cta { display: none; }
  .menu-btn { display: flex; }
  .wordmark { font-size: 18px; }
}

/* ── Buttons (app pill buttons) ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 12px 24px; cursor: pointer;
  font-family: var(--font); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: var(--track-button);
  text-decoration: none; color: #fff; transition: transform .1s, background .15s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-dark); }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--border); }

/* ── Hero (app GradientHero, blue theme) ───────────────────────── */
.s-hero { position: relative; overflow: hidden; background: var(--hero); color: #fff; }
.s-hero::before, .s-hero::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.05); filter: blur(48px);
}
.s-hero::before { width: 288px; height: 288px; right: -80px; top: -80px; }
.s-hero::after { width: 224px; height: 224px; left: -80px; bottom: 0; }
.hero-inner {
  position: relative; max-width: 1120px; margin: 0 auto; padding: 32px 20px;
  display: flex; align-items: center; gap: 40px;
}
.hero-logo { width: 80px; height: 80px; flex-shrink: 0; }
.pill {
  display: inline-block; background: var(--green); color: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: var(--track-button); box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.hero-title {
  margin-top: 8px; font-weight: 900; text-transform: uppercase; line-height: 0.95;
  letter-spacing: var(--track-display); font-size: 56px; color: #fff;
}
.hero-tagline { margin: 12px 0 0; max-width: 640px; color: rgba(255,255,255,.85); font-size: 16px; }
@media (max-width: 760px) {
  .hero-inner { display: block; padding: 28px 20px; }
  .hero-logo { width: 56px; height: 56px; margin-bottom: 12px; }
  .hero-title { font-size: 36px; }
  .hero-tagline { font-size: 14px; }
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--r-3xl); box-shadow: var(--shadow-sm); overflow: hidden; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.section-title {
  font-weight: 900; text-transform: uppercase; letter-spacing: var(--track-display);
  font-size: 22px; color: var(--blue);
}
.section-more { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--track-button); text-decoration: none; }
.kicker {
  margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--blue);
}
.meta { margin: 0; font-size: 12px; color: var(--grey-soft); }

.app-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; text-decoration: none; transition: transform .1s; }
.tile:active { transform: scale(0.99); }
.tile-k { font-weight: 900; text-transform: uppercase; color: var(--blue); font-size: 15px; letter-spacing: var(--track-display); }
.tile-s { font-size: 13px; color: var(--grey); }
@media (max-width: 760px) { .app-tiles { grid-template-columns: 1fr 1fr; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.post-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-blank {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}
.post-card-blank span { color: rgba(255,255,255,.8); font-weight: 900; text-transform: uppercase; letter-spacing: var(--track-button); font-size: 13px; }
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card-title { font-size: 18px; font-weight: 900; line-height: 1.2; color: var(--ink); }
.post-card-excerpt {
  margin: 0; font-size: 14px; color: var(--grey);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-body .meta { margin-top: auto; padding-top: 4px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--border); }
.list a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.list a:hover { background: var(--mist); }
.list-title { font-weight: 700; }

.app-promo { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; }
.app-promo-btns { display: flex; gap: 10px; flex-shrink: 0; }
.app-promo.slim { margin: 16px 0 28px; padding: 16px 20px; }
.app-promo.slim p { margin: 0; color: var(--grey); font-size: 14px; }
@media (max-width: 700px) { .app-promo { flex-direction: column; align-items: flex-start; } }

.subscribe { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.subscribe-form input {
  min-width: 240px; border: 1px solid var(--border); background: var(--mist); border-radius: var(--r-2xl);
  padding: 12px 16px; font: inherit; font-size: 15px; color: var(--ink);
}
.subscribe-form input:focus { outline: none; border-color: var(--blue); }
.form-msg { display: none; width: 100%; margin: 4px 0 0; font-size: 13px; }
.subscribe-form.success .form-success { display: block; color: var(--green-dark); }
.subscribe-form.error .form-error { display: block; color: #c62828; }
.subscribe-form.loading button { opacity: .6; pointer-events: none; }
@media (max-width: 700px) {
  .subscribe { flex-direction: column; align-items: stretch; }
  .subscribe-form input { min-width: 0; flex: 1; }
}

/* ── Article (matches the app's /community/<slug> page) ────────── */
.back { display: inline-block; margin: 8px 0 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; }
.back:hover { text-decoration: underline; }
.cover { margin: 0; }
.cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cover figcaption { padding: 8px 24px 0; font-size: 13px; color: var(--grey-soft); }
.video-frame { position: relative; padding-bottom: 56.25%; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-body { padding: 24px; }
@media (min-width: 760px) { .article-body { padding: 40px; } }
.article-title {
  margin-top: 8px; font-size: 30px; font-weight: 900; line-height: 1.1;
  letter-spacing: var(--track-display); color: var(--ink);
}
.article-body > .meta { margin-top: 12px; }

.gh-content { margin-top: 24px; font-size: 17px; line-height: 1.7; color: var(--ink); overflow-wrap: break-word; }
.gh-content > * + * { margin-top: 1em; }
.gh-content p, .gh-content ul, .gh-content ol, .gh-content blockquote, .gh-content figure { margin-bottom: 0; }
.gh-content h1, .gh-content h2 {
  margin-top: 1.8em; font-weight: 900; color: var(--blue); line-height: 1.15;
  letter-spacing: var(--track-display); font-size: 24px;
}
.gh-content h3 { margin-top: 1.5em; font-size: 19px; font-weight: 800; }
.gh-content h4 { margin-top: 1.3em; font-size: 17px; font-weight: 800; }
.gh-content a { text-decoration: underline; text-underline-offset: 2px; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content blockquote { border-left: 4px solid var(--blue); padding-left: 16px; font-style: italic; color: var(--grey); margin-left: 0; }
.gh-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.gh-content img { border-radius: 12px; }
.gh-content figcaption { margin-top: 6px; text-align: center; font-size: 13px; color: var(--grey-soft); }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gh-content th, .gh-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.gh-content th { background: var(--mist); font-size: 12px; text-transform: uppercase; }
.gh-content pre { background: var(--ink); color: #fff; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; }
.gh-content iframe { max-width: 100%; }
/* Required by Ghost for wide/full image cards. The article card is narrow, so both stay inside it. */
.kg-width-wide, .kg-width-full { width: 100%; }
.kg-width-full img, .kg-width-wide img { width: 100%; }

.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

/* Ghost {{pagination}} */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; font-size: 13px; color: var(--grey); }
.pagination a { font-weight: 800; text-transform: uppercase; letter-spacing: var(--track-button); text-decoration: none; }

/* ── Footer (matches the app's footer nav) ─────────────────────── */
.footer { margin-top: 32px; background: var(--blue-deep); color: rgba(255,255,255,.7); }
.footer .wrap { padding: 32px 20px 40px; }
.footer .wm-blue { color: #fff; }
.footer-nav, .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.footer-nav a {
  color: #fff; text-decoration: none; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: var(--track-button);
}
.footer-nav a:hover { color: var(--green); }
.footer-legal a { color: rgba(255,255,255,.7); font-size: 12px; }
.footer-copy { margin: 18px 0 0; font-size: 12px; }

/* ── Cookie notice ─────────────────────────────────────────────── */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: var(--r-2xl); padding: 16px 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0; font-size: 13px; }
.cookie a { color: var(--green); }
