/* ─────────────────────────────────────────────────────────
   seo-index-php — merges design tokens from the explore-redesign
   branch of cykom.com with the semantic class names used across
   the Next.js views that this PHP port replaces. The tokens are
   the lead, class names are the glue.
   ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette (lifted from cykom.com explore-redesign) */
  --bg:                #f8f6f1;
  --bg-surface:        #fff;
  --bg-surface-fill:   #e2ff90;
  --bg-tone-2:         #efece5;
  --bg-ink:            #111;
  --green-dark:        #355331;
  --cykom-green:       #a6f896;
  --border-base:       #e7e1d5;
  --text-primary:      #22231f;
  --text-secondary:    #5c5e5a;
  --text-muted:        rgba(0,0,0,.75);
  --text-dim:          rgba(0,0,0,.6);
  --text-dimmer:       rgba(0,0,0,.5);
  --text-on-dark:      #fff;
  --text-on-dark-75:   rgba(255,255,255,.75);
  --text-on-dark-90:  rgba(255,255,255,.9);
  --text-lime:         #bbff33;
  --text-error:        #ff3b30;
  --shadow-card:       0 2px 6px rgba(31,32,28,.04);
  --shadow-float:      0 8px 32px rgba(0,0,0,.08);
  --radius-card:       16px;
  --radius-btn:        12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
.h1, .h2, .h3, .h4 {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}
.h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.8px; }
.h2 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.64px; }
.h3 { font-size: 24px; letter-spacing: -0.5px; font-weight: 600; }
.h4 { font-size: 20px; letter-spacing: -0.4px; font-weight: 600; }
.label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px; font-weight: 500;
  color: var(--text-dim); letter-spacing: .4px;
  text-transform: uppercase;
}
.body-lg { font-size: 18px; }
.body-md { font-size: 15px; }
.body-sm { font-size: 13px; font-weight: 500; letter-spacing: -0.1px; }

.t-muted     { color: var(--text-muted); }
.t-dim       { color: var(--text-dim); }
.t-dimmer    { color: var(--text-dimmer); }
.t-secondary { color: var(--text-secondary); }
.t-white     { color: var(--text-on-dark); }
.t-white-90  { color: var(--text-on-dark-90); }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 48px 24px; }
.section   { padding: 72px 0; }

.page-header { margin-bottom: 32px; }
.page-header h1 {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.page-header p { color: var(--text-secondary); font-size: 16px; }

/* ── Nav ── */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border-base);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(140%) blur(6px);
}
.nav-logo { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; min-width: 0; }
.nav-logo .logo-graphic { width: 36px; height: 36px; flex-shrink: 0; display: block; }
.nav-logo .logo-text    { height: 22px; width: auto; color: var(--text-primary); flex-shrink: 0; display: block; }

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--text-dim);
  font-size: 15px; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text-primary); }

/* Higher specificity than .nav-links a so the pill colours actually win. */
.nav-links .nav-cta,
.nav-cta {
  background: var(--bg-ink); color: var(--text-on-dark);
  padding: 9px 16px; border-radius: var(--radius-btn);
  font-weight: 500; font-size: 14px;
  transition: opacity .15s;
}
.nav-links .nav-cta:hover,
.nav-cta:hover { opacity: .85; color: var(--text-on-dark); }
.nav-links .nav-cta--lime,
.nav-cta--lime { background: var(--bg-surface-fill); color: var(--text-primary); }
.nav-links .nav-cta--lime:hover,
.nav-cta--lime:hover { color: var(--text-primary); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 18px;
  border-radius: var(--radius-btn);
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500;
  cursor: pointer; border: none; text-decoration: none;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
}
.btn:hover   { opacity: .85; }
.btn--lime   { background: var(--bg-surface-fill); color: var(--text-primary); }
.btn--dark   { background: var(--bg-ink); color: var(--text-on-dark); }
.btn--outline {
  background: transparent;
  border: 1px solid var(--border-base);
  color: var(--text-primary);
}

/* ── Pills ── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.pill--lime    { background: var(--bg-surface-fill); color: var(--text-primary); }
.pill--outline { background: var(--bg-surface); border: 1px solid var(--border-base); color: var(--text-secondary); }
.pill--gray    { background: var(--bg-tone-2); color: var(--text-secondary); }
.pill--purple  { background: #ede9fe; color: #7c3aed; }
.pill--red     { background: #fee2e2; color: var(--text-error); }
.pill--dark    { background: var(--bg-ink); color: var(--text-lime); }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--text-dimmer);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dimmer); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .current { color: var(--text-secondary); }
.breadcrumb .sep { color: var(--text-dimmer); font-size: 12px; }

/* ── Cards grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* ── Card ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.explore-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.explore-card:hover {
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
}
.explore-card-inner {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px;
}
.explore-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.explore-card-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.explore-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-tone-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  color: var(--text-primary);
}
.explore-card-icon .ph { font-size: 22px; line-height: 1; }
.explore-meta { display: flex; flex-direction: column; gap: 6px; }
.explore-meta > div { display: flex; align-items: center; gap: 8px; }
.explore-divider { height: 1px; background: var(--border-base); }
.explore-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px;
}
.explore-card-foot .extra {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-secondary);
}
.explore-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.explore-avatar.lime    { background: var(--bg-surface-fill); color: var(--text-primary); }
.explore-avatar.dark    { background: var(--bg-ink); color: var(--text-lime); }
.explore-avatar.outline { background: var(--bg-surface); border: 1px solid var(--border-base); color: var(--text-primary); }
.explore-avatar--xl { width: 72px; height: 72px; font-size: 24px; border-radius: 16px; }
.explore-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ── Hero (home) ── */
.hero {
  padding: 96px 24px 80px;
  background: linear-gradient(180deg, var(--green-dark) 0%, #2d4a2a 100%);
  color: var(--text-on-dark);
  position: relative;
}
.hero-inner {
  position: relative;
  max-width: 1140px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 20px;
}
.hero .kicker {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-surface-fill); color: var(--text-primary);
  padding: 6px 14px; border-radius: 999px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500; font-size: 13px; letter-spacing: .5px;
  text-transform: uppercase;
}
.hero h1, .hero .accent {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -1.1px;
  max-width: 760px;
}
.hero h1 { color: var(--text-on-dark); }
.hero .accent { font-style: italic; color: var(--bg-surface-fill); }
.hero .body-lg { max-width: 560px; color: var(--text-on-dark-90); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-ctas .btn--ghost {
  background: transparent;
  color: var(--text-on-dark);
  border: 1px solid rgba(255,255,255,.4);
}
.hero-ctas .btn--ghost:hover { opacity: 1; background: rgba(255,255,255,.08); }

/* ── Section head w/ view-all link ── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head-copy { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.view-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; color: var(--text-primary);
  white-space: nowrap;
}
.view-all:hover { opacity: .7; }

/* ── Filter rows (location + category links on listing pages) ── */
.filter-row { margin-bottom: 32px; }
.filter-row .label { display: block; margin-bottom: 10px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Detail pages (activity, community, mission, category) ── */
.detail-hero-band { background: var(--bg-tone-2); border-bottom: 1px solid var(--border-base); }
.detail-hero {
  max-width: 820px; margin: 0 auto;
  padding: 48px 24px 36px;
}
.detail-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-title-row { display: flex; align-items: flex-start; gap: 20px; }
.detail-title-row h1 { margin: 0; }
.detail-icon-accent {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: var(--bg-surface-fill); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.detail-icon-accent .ph { font-size: 28px; line-height: 1; }
.detail-hero .explore-avatar--xl { width: 72px; height: 72px; }
.detail-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.detail-meta .dot { color: var(--text-dimmer); }

.detail-section { max-width: 820px; margin: 0 auto; padding: 32px 24px; }
.detail-section.wide { max-width: 1140px; }
.detail-section h2 { margin-bottom: 16px; }
.detail-body {
  font-size: 17px; line-height: 1.7; color: var(--text-primary); white-space: pre-wrap;
}

.info-grid {
  background: var(--bg-tone-2);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
}
.info-grid-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.info-label {
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
}
.info-value { font-weight: 600; font-size: 15px; color: var(--text-primary); word-wrap: break-word; }
.info-value a { color: var(--text-primary); text-decoration: underline; }

.organised-by-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
  text-decoration: none; color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-card);
  transition: box-shadow .15s;
}
.organised-by-card:hover { box-shadow: var(--shadow-float); }
.organised-by-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.organised-by-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
  color: var(--text-secondary); font-size: 13px;
}
.organised-by-arrow { color: var(--text-secondary); flex-shrink: 0; }

.join-cta-band {
  background: var(--bg-surface-fill);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  text-align: center;
}
.join-cta-band h2 { margin-bottom: 12px; }

/* ── Store badges ── */
.store-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-ink); color: var(--text-on-dark);
  padding: 10px 18px; border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.store-badge:hover { opacity: .85; }
.store-badge svg { flex-shrink: 0; }

/* ── FAQ (accordion rendered as <details>) ── */
.faq-list   { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-card);
  padding: 16px 20px;
}
.faq-q {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-q::marker, .faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 20px; color: var(--text-dim); line-height: 1; }
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a { margin-top: 10px; }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 80px 24px;
  color: var(--text-secondary);
}
.empty-state p { margin: 4px 0; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-base);
  padding: 48px 24px 32px;
  margin-top: 96px;
}
.site-footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-col { display: flex; flex-direction: column; gap: 12px; }
.footer-brand-col .nav-logo { align-self: flex-start; }
.footer-brand-col p { color: var(--text-muted); font-size: 15px; max-width: 280px; }
.footer-col-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--text-dimmer);
  font-size: 15px;
}
.footer-col a:hover { color: var(--text-primary); }
.site-footer-bottom {
  max-width: 1140px; margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-base);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-muted); font-size: 14px;
}
.site-footer-bottom a { color: var(--text-muted); }
.site-footer-bottom a:hover { color: var(--text-primary); }

/* ─── Responsive ─────────────────────────────────────────
   Three breakpoints:
     - 960px: desktop → tablet (3-col → 2-col grids, 2-col footer)
     - 720px: tablet → mobile (grids collapse to 1 col, nav gets compact)
     - 420px: mobile → small-mobile (further type/padding tightening)
   ───────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .container          { padding: 40px 20px; }
  .section            { padding: 56px 0; }
  .three-cols         { grid-template-columns: 1fr 1fr; gap: 16px; }
  .info-grid          { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .site-footer-inner  { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand-col   { grid-column: 1 / -1; }
  .site-footer        { padding: 40px 20px 28px; margin-top: 72px; }
  .hero               { padding: 72px 20px 56px; }
}

@media (max-width: 720px) {
  body                { font-size: 16px; }

  /* Nav — compact: hide secondary text links, keep "Get the app" CTA.
     The CTA alone is what we want users clicking from mobile. */
  .nav                { padding: 14px 16px; }
  .nav-links          { gap: 10px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta            { padding: 8px 12px; font-size: 13px; }
  .nav-cta:not(.nav-cta--lime) { display: none; }   /* only keep the lime "Get the app" */

  .container          { padding: 32px 16px; }
  .section            { padding: 48px 0; }

  /* Hero */
  .hero               { padding: 56px 16px 48px; }
  .hero-inner         { gap: 16px; }
  .hero h1, .hero .accent { font-size: 34px; letter-spacing: -0.8px; }
  .hero .body-lg      { font-size: 16px; }

  /* Section head — stack and let "view all" sit below as a chunky link */
  .section-head       { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .section-head-copy  { gap: 6px; }
  .view-all           { font-size: 15px; }

  /* Grids collapse to one column */
  .three-cols         { grid-template-columns: 1fr; gap: 14px; }
  .cards-grid         { grid-template-columns: 1fr; gap: 14px; }
  .explore-card-inner { padding: 18px; gap: 12px; }

  /* Filter rows */
  .filter-row         { margin-bottom: 24px; }
  .filter-pills       { gap: 6px; }

  /* Page header */
  .page-header        { margin-bottom: 24px; }
  .page-header h1     { font-size: 28px; }
  .page-header p      { font-size: 15px; }

  /* Detail pages */
  .detail-hero        { padding: 32px 16px 28px; }
  .detail-title-row   { flex-direction: column; gap: 14px; }
  .detail-icon-accent { width: 48px; height: 48px; font-size: 22px; }
  .detail-hero .explore-avatar--xl { width: 56px; height: 56px; font-size: 20px; }
  .detail-section     { padding: 24px 16px; }
  .detail-section h2  { font-size: 22px; }
  .detail-body        { font-size: 16px; line-height: 1.65; }
  .info-grid          { grid-template-columns: 1fr; padding: 18px 20px; gap: 14px; }
  .organised-by-card  { padding: 14px 16px; gap: 12px; }

  /* Join CTA band */
  .join-cta-band      { padding: 28px 20px; }
  .join-cta-band h2   { font-size: 20px; }
  .store-badges       { gap: 10px; margin-top: 16px; }
  .store-badge        { padding: 10px 16px; font-size: 13px; }

  /* Buttons */
  .btn                { height: 44px; padding: 0 16px; font-size: 14px; }

  /* Footer */
  .site-footer-inner  { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand-col p { max-width: none; }
  .site-footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 24px; padding-top: 20px; }
}

@media (max-width: 420px) {
  .container          { padding: 24px 14px; }
  .hero               { padding: 44px 14px 36px; }
  .hero h1, .hero .accent { font-size: 28px; letter-spacing: -0.6px; }
  .hero-ctas .btn     { flex: 1; }
  .page-header h1     { font-size: 24px; }
  .detail-title-row h1,
  .h1                 { font-size: 26px; letter-spacing: -0.6px; }
  .detail-section     { padding: 20px 14px; }
  .detail-hero        { padding: 24px 14px 20px; }
  .pill               { font-size: 10px; padding: 4px 8px; }
  .explore-card-top   { gap: 8px; }
  .explore-card-icon  { width: 36px; height: 36px; font-size: 16px; }
  .explore-avatar     { width: 40px; height: 40px; font-size: 14px; }
  .join-cta-band      { padding: 22px 16px; }
  .store-badge span   { display: none; }   /* icon-only badges save width */
  .store-badge        { width: 44px; height: 44px; padding: 0; justify-content: center; }
}

/* Reduce layout shift on cold loads */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
