/*
Theme Name: CalmPilot AI
Theme URI: https://calmpilot.ai/
Author: CalmPilot AI
Author URI: https://calmpilot.ai/
Description: A custom WordPress theme for CalmPilot AI.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calmpilot
*/

/* =========================================================
   CalmPilot AI — Marketing Site
   Sections: Nav · Hero · Features · How It Works ·
             Screenshots · Games · Benefits · Testimonials ·
             Final CTA · Footer
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg-0: oklch(0.16 0.04 265);
  --bg-1: oklch(0.20 0.05 270);
  --bg-2: oklch(0.24 0.06 275);
  --surface: oklch(0.24 0.03 270 / 0.55);
  --surface-2: oklch(0.28 0.04 272 / 0.7);
  --border: oklch(0.85 0.02 270 / 0.10);
  --border-strong: oklch(0.85 0.02 270 / 0.18);

  --fg: oklch(0.97 0.005 270);
  --fg-dim: oklch(0.78 0.02 270);
  --fg-muted: oklch(0.62 0.02 270);

  --accent: oklch(0.78 0.13 290);     /* lavender (primary, matches app's Ask Milo) */
  --accent-2: oklch(0.85 0.13 180);   /* cyan-mint (from icon) */
  --accent-3: oklch(0.78 0.16 350);   /* magenta-pink (from icon) */
  --accent-soft: oklch(0.78 0.13 290 / 0.18);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-glow: 0 30px 80px -20px oklch(0.55 0.18 290 / 0.45);
  --shadow-card: 0 20px 50px -25px oklch(0.10 0.05 270 / 0.8);

  --maxw: 1200px;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* aurora background */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 15% -10%, oklch(0.50 0.18 295 / 0.45), transparent 60%),
    radial-gradient(50rem 35rem at 100% 10%, oklch(0.55 0.15 200 / 0.35), transparent 60%),
    radial-gradient(40rem 30rem at 50% 110%, oklch(0.60 0.16 350 / 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-0));
}
.aurora::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, oklch(1 0 0 / 0.5), transparent 50%),
    radial-gradient(1px 1px at 80% 70%, oklch(1 0 0 / 0.4), transparent 50%),
    radial-gradient(1px 1px at 60% 20%, oklch(1 0 0 / 0.35), transparent 50%),
    radial-gradient(1px 1px at 30% 80%, oklch(1 0 0 / 0.3), transparent 50%),
    radial-gradient(1px 1px at 75% 40%, oklch(1 0 0 / 0.45), transparent 50%);
  background-size: 400px 400px, 600px 600px, 350px 350px, 500px 500px, 450px 450px;
  opacity: 0.6;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(0.22 0.03 270 / 0.5);
  backdrop-filter: blur(10px);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  background: oklch(0.30 0.04 272 / 0.5);
  color: var(--fg);
  backdrop-filter: blur(12px);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); background: oklch(0.34 0.05 275 / 0.65); border-color: var(--border-strong); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), oklch(0.72 0.14 270));
  color: oklch(0.15 0.02 270);
  border: none;
  box-shadow: 0 10px 30px -10px var(--accent), inset 0 1px 0 oklch(1 0 0 / 0.3);
  font-weight: 600;
}
.btn-primary:hover { background: linear-gradient(135deg, oklch(0.83 0.13 290), oklch(0.76 0.15 270)); }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0;
  backdrop-filter: blur(18px);
  background: oklch(0.16 0.04 265 / 0.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }

.nav-wrap .brand img,
.footer .brand img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px;
  box-shadow: 0 6px 20px -6px rgba(88, 131, 214, 0.4);
  box-shadow: 0 6px 20px -6px oklch(0.65 0.18 200 / 0.6);
}

.brand .name-dim { color: var(--fg-muted); font-weight: 400; }
.nav-wrap .nav-links { display: flex; align-items: center; gap: 28px; }
.nav-wrap .nav-links a { color: var(--fg-dim); font-size: 14px; transition: color .15s; }
.nav-wrap .nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; gap: 10px; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: oklch(0.22 0.03 270 / 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  transition: background .15s, border-color .15s;
}
.nav-toggle:hover { background: oklch(0.26 0.03 270 / 0.7); border-color: var(--border-strong); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 70px; left: 12px; right: 12px;
  z-index: 49;
  background: oklch(0.18 0.04 268);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 30px 60px -20px oklch(0.05 0 0 / 0.6);
  flex-direction: column;
  gap: 4px;
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a {
  display: flex; align-items: center;
  padding: 14px 16px;
  color: var(--fg-dim);
  font-size: 16px;
  border-radius: 12px;
  transition: background .15s, color .15s;
}
.nav-drawer a:hover, .nav-drawer a[aria-current="page"] {
  background: oklch(0.26 0.04 268);
  color: var(--fg);
  text-decoration: none;
}
.nav-drawer .drawer-divider { height: 1px; background: var(--border); margin: 8px 4px; }
.nav-drawer .drawer-cta {
  display: flex; gap: 10px; padding: 6px 4px 0;
}
.nav-drawer .drawer-cta .btn { flex: 1; justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer .brand { margin-bottom: 14px; }
.footer-blurb { color: var(--fg-dim); font-size: 14px; max-width: 320px; line-height: 1.6; }
.foot-col h5 { font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 18px; font-weight: 500; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--fg-dim); font-size: 14px; transition: color .15s; }
.foot-col a:hover { color: var(--fg); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.socials { display: flex; gap: 10px; }
.social {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border);
  background: oklch(0.22 0.03 270 / 0.5);
  display: grid; place-items: center;
  color: var(--fg-dim); transition: color .15s, border-color .15s;
}
.social:hover { color: var(--fg); border-color: var(--border-strong); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-wrap .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 14px; }
  .nav-drawer { top: 64px; }
}

/* ---------- WordPress body overrides ---------- */
/* Prevent WP core / plugin stylesheets from clobbering the dark background */
body.wp-singular,
body.page,
body.single,
body.archive,
body.blog,
body.home {
  background: var(--bg-0) !important;
  color: var(--fg) !important;
}

/* ---------- Site main wrapper ---------- */
.site-main {
  padding: 60px 0 100px;
  min-height: 55vh;
}

/* ---------- Blog archive header ---------- */
.blog-archive-header {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.blog-archive-header .eyebrow { margin-bottom: 16px; }
.blog-archive-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
}

/* ---------- Blog listing grid ---------- */
.blog-listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: border-color .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.blog-post-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.blog-post-card .post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.blog-post-card .post-thumbnail a { display: block; height: 100%; }
.blog-post-card .post-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 0;
  transition: transform .35s ease;
}
.blog-post-card:hover .post-thumbnail img { transform: scale(1.05); }

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.entry-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 10px;
}
.entry-title a {
  color: var(--fg);
  transition: color .15s;
}
.entry-title a:hover { color: var(--accent-2); }

.entry-meta {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.entry-meta a { color: var(--fg-muted); transition: color .15s; }
.entry-meta a:hover { color: var(--accent-2); }

.entry-excerpt { color: var(--fg-dim); font-size: 14px; line-height: 1.65; margin: 0 0 18px; }
.entry-excerpt p { margin: 0; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-2);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: auto;
  transition: gap .15s, color .15s;
}
.read-more::after { content: "→"; }
.read-more:hover { gap: 10px; color: var(--fg); }

/* ---------- Blog pagination ---------- */
.posts-navigation {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.posts-navigation .nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.posts-navigation .nav-links a,
.posts-navigation .nav-links span {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg-dim);
  transition: background .15s, border-color .15s, color .15s;
}
.posts-navigation .nav-links a:hover {
  background: oklch(0.30 0.04 272 / 0.6);
  border-color: var(--border-strong);
  color: var(--fg);
}

.no-posts {
  text-align: center;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 60px 0;
}

/* ---------- Single post ---------- */
.single-post { max-width: 740px; margin: 0 auto; }

.post-hero-image {
  margin-bottom: 32px;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.post-hero-image img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.single-post .entry-title {
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--fg);
}

.single-post .entry-header { margin-bottom: 32px; }

.single-post .entry-content {
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.8;
}
.single-post .entry-content > * + * { margin-top: 0; }
.single-post .entry-content p { margin: 0 0 20px; }
.single-post .entry-content h2 { font-size: 24px; color: var(--fg); margin: 44px 0 14px; }
.single-post .entry-content h3 { font-size: 20px; color: var(--fg); margin: 36px 0 12px; }
.single-post .entry-content h4 { font-size: 17px; color: var(--fg); margin: 28px 0 10px; }
.single-post .entry-content a { color: var(--accent-2); text-underline-offset: 3px; transition: color .15s; }
.single-post .entry-content a:hover { color: var(--fg); text-decoration: underline; }
.single-post .entry-content img {
  border-radius: var(--r-md);
  margin: 28px 0;
  max-width: 100%;
  height: auto !important;
}
.single-post .entry-content ul,
.single-post .entry-content ol { padding-left: 22px; margin: 0 0 20px; }
.single-post .entry-content li { margin-bottom: 8px; }
.single-post .entry-content li::marker { color: var(--accent-2); }
.single-post .entry-content blockquote {
  border-left: 2px solid var(--accent);
  margin: 28px 0;
  padding: 16px 22px;
  background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--fg-dim);
  font-style: italic;
}
.single-post .entry-content pre {
  background: oklch(0.20 0.03 270);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 18px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 0 0 20px;
}
.single-post .entry-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: oklch(0.22 0.03 270);
  padding: 2px 6px;
  border-radius: 5px;
}

.entry-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.back-to-blog {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  transition: color .15s;
}
.back-to-blog:hover { color: var(--accent-2); }
.edit-link a { font-size: 13px; color: var(--fg-muted); }

/* Post navigation (prev/next) */
.post-navigation {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-navigation .nav-previous,
.post-navigation .nav-next { }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { display: flex; flex-direction: column; gap: 4px; color: var(--fg-dim); }
.post-navigation a:hover { color: var(--fg); }
.post-navigation .nav-subtitle {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.post-navigation .nav-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: inherit;
}

/* ---------- Static page ---------- */
.static-page { max-width: 820px; margin: 0 auto; }
.static-page .entry-title {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.static-page .entry-content {
  color: var(--fg-dim);
  font-size: 16.5px;
  line-height: 1.75;
}
.static-page .entry-content p { margin: 0 0 18px; }
.static-page .entry-content a { color: var(--accent-2); }
.static-page .entry-content h2 { font-size: 24px; color: var(--fg); margin: 40px 0 14px; }
.static-page .entry-content h3 { font-size: 20px; color: var(--fg); margin: 32px 0 12px; }
.static-page .entry-content img { border-radius: var(--r-md); margin: 24px 0; max-width: 100%; height: auto !important; }
.static-page .entry-content ul,
.static-page .entry-content ol { padding-left: 22px; margin: 0 0 18px; }
.static-page .entry-content li { margin-bottom: 8px; }

/* ---------- Policy page styles ---------- */
/* Loaded from assets/policy.css but this block covers the page-head
   that's generated by template-policy.php */
.policy-page-head {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  border-bottom: 1px solid var(--border);
}
.policy-page-head .eyebrow { margin-bottom: 24px; }
.policy-page-head h1 {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 14px;
}
.policy-page-head .lede {
  color: var(--fg-dim);
  font-size: 17px;
  max-width: 640px;
  line-height: 1.65;
}

/* ---------- Additional mobile responsive fixes ---------- */
@media (max-width: 720px) {
  .blog-listing { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .site-main { padding: 40px 0 80px; }
  .policy-page-head { padding: 48px 20px 32px; }
}
@media (max-width: 480px) {
  .card-body { padding: 18px; }
  .single-post .entry-content { font-size: 15.5px; }
}
