/*
Theme Name: Kobo
Theme URI: https://example.com
Author: Kobo
Description: A dark, gold-accented theme built for the Kobo Rewards platform — landing page, clean typography, and a full-width app template that lets the [kobo_app] shortcode render without theme interference.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kobo-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #1B1523;
  --surface: #241D30;
  --surface-2: #2C2438;
  --border: #3A3048;
  --text: #F3EFEA;
  --muted: #9C93A8;
  --gold: #D4A24E;
  --teal: #4FA692;
  --coral: #E2694B;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, .display {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.kobo-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------- Site header ---------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.site-brand:hover { text-decoration: none; }
.site-brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; color: #1B1523; font-size: 14px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.primary-nav a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 4px; padding: 12px 0; }
  .site-header-inner { flex-wrap: wrap; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gold); color: #1B1523; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

/* ------------------------------- Hero ---------------------------------- */

.hero {
  padding: 96px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  max-width: 780px;
  margin: 0 auto 18px;
}
.hero p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 17px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------- Feature grid ------------------------------ */

.features {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 780px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
}
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  font-family: 'Sora', sans-serif;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; }

.section-heading {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.section-heading h2 { font-size: 28px; }
.section-heading p { color: var(--muted); font-size: 15px; }

/* ------------------------------ How it works ----------------------------- */

.how {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  counter-reset: step;
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .how-grid { grid-template-columns: 1fr; }
}
.how-step {
  position: relative;
  padding-left: 8px;
}
.how-step .step-num {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 10px;
  display: block;
}
.how-step h4 { font-size: 15px; margin-bottom: 6px; }
.how-step p { color: var(--muted); font-size: 13px; margin: 0; }

/* -------------------------------- CTA ------------------------------------ */

.cta {
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 32px;
}
.cta-box h2 { font-size: 26px; margin-bottom: 10px; }
.cta-box p { color: var(--muted); margin-bottom: 26px; }

/* ------------------------------- Footer ----------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--muted);
  font-size: 13px;
}
.footer-links a:hover { color: var(--text); }

/* ------------------------------- Generic page ------------------------------ */

.page-content {
  padding: 56px 0 80px;
  max-width: 760px;
  margin: 0 auto;
}
.page-content h1 { font-size: 32px; margin-bottom: 20px; }
.page-content p { color: var(--muted); }
.page-content img { border-radius: 12px; margin: 20px 0; }

/* ------------------------------ Full-width app template -------------------- */

.template-fullwidth .site-header,
.template-fullwidth .site-footer {
  display: none;
}
.app-page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.app-page-wrap .kobo-root {
  width: 100%;
  max-width: 1080px;
}

/* --------------------------------- 404 -------------------------------------- */

.error-404 {
  padding: 96px 0;
  text-align: center;
}
.error-404 h1 { font-size: 64px; color: var(--gold); }
