/* ==========================================================================
   RMAINCAI — Institutional Site Stylesheet
   Palette: Navy #0A2E52 / Off-white #F5F5EB / Green #3FBF7F
   ========================================================================== */

:root {
  --navy: #0A2E52;
  --navy-light: #123A66;
  --off-white: #F5F5EB;
  --green: #3FBF7F;
  --green-dark: #2E9E5B;
  --text-muted: #9FB3C8;
  --white: #FFFFFF;
  --border-subtle: rgba(245, 245, 235, 0.12);
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--off-white);
  line-height: 1.6;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--off-white);
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 16px; }

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

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 820px;
}

.centered { text-align: center; }
.centered .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--green);
  color: var(--navy);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  color: var(--off-white);
  border-color: var(--border-subtle);
}
.btn-outline:hover { border-color: var(--off-white); }

/* ---------- Header ---------- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
}
.site-logo-img {
  height: 46px;
  width: auto;
  display: block;
  margin-right: 4px; /* compensa a falta de margem à direita no arquivo original */
}
/* The header is a bit wider than the page (.wrap is 1120px) so the full menu
   fits in all 3 languages; menu items never break into several lines. */
.site-header .wrap { max-width: 1200px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  color: var(--off-white);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--green); text-decoration: none; }
.site-nav .btn { padding: 10px 20px; }
/* Two-line menu item: small green "Telêmaco Project" over "OpenClaw Guide" */
.nav-guide { line-height: 1.2; }
.nav-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

/* Language switcher (EN · ES · PT) — always visible, also on phones beside the
   hamburger, so a visitor never has to open the menu to change language. */
.site-nav { margin-left: auto; }
.site-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.site-lang a {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.site-lang a:hover { color: var(--off-white); text-decoration: none; }
.site-lang a.active { background: var(--green); color: var(--navy); }

/* Hamburger button — hidden on desktop, shown only on mobile via media query */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--off-white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; }
/* Background photo on the top of the 4 main pages (Home, rmAgentBooking, Pricing, About).
   Abstract network image from Pixabay (Pixabay Content License), pre-blurred; the navy layer keeps
   the text readable and fades into the page navy at the bottom. Only one file downloads:
   the small one on phones, the large one elsewhere. */
.hero-bg {
  background:
    linear-gradient(180deg, rgba(10, 46, 82, 0.55) 0%, rgba(10, 46, 82, 0.72) 65%, var(--navy) 100%),
    url('assets/bg/hero-network.webp') center bottom / cover no-repeat;
}
@media (max-width: 768px) {
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(10, 46, 82, 0.55) 0%, rgba(10, 46, 82, 0.72) 65%, var(--navy) 100%),
      url('assets/bg/hero-network-sm.webp') center bottom / cover no-repeat;
  }
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero h1 { max-width: 780px; margin-left: auto; margin-right: auto; }
.hero h1 .accent { color: var(--green); }
/* Used on pages where the hero headline is a longer sentence (e.g. About) —
   keeps it closer in weight to the h2s below it instead of towering over them. */
.hero-compact h1 { font-size: 2.25rem; max-width: 700px; }
/* Centered hero variant with a wider column than the default .lead cap (640px) —
   for a hero paragraph that reads cramped at 640px but should still be centered. */
.hero-wide h1 { font-size: 2rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.hero-wide .lead { max-width: 900px; margin-left: auto; margin-right: auto; }
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}
.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */
section { padding: 70px 0; }
section.alt-bg { background: var(--navy-light); }
section.on-white { background: var(--off-white); color: var(--navy); }
section.on-white h2, section.on-white h3 { color: var(--navy); }
section.on-white .lead { color: #4A5A6B; }

.section-badge {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: rgba(63, 191, 127, 0.12);
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.card {
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px;
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(63, 191, 127, 0.15);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---------- Phone-frame screenshot grid ---------- */
.phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: 44px;
}
.phone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.phone-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.phone-frame {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 390 / 844;
  border-radius: 28px;
  border: 6px solid var(--navy-light);
  outline: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  background: var(--off-white);
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
}
.phone-caption {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.5;
}

/* ---------- Desktop screenshots (rmagentbooking.php) ---------- */
.screen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 980px;
  margin: 56px auto 0;
}
.screen-card { margin: 0; text-align: center; }
.screen-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}
.screen-card figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--text-muted); }
.screens-note { margin: 28px auto 0; text-align: center; font-size: 0.85rem; color: var(--text-muted); max-width: 640px; }
.phone-card { margin: 0; }

/* ---------- Pricing ---------- */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px;
  margin: 32px auto 0;
}
.toggle-option {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle-option.active {
  background: var(--green);
  color: var(--navy);
}
.toggle-badge {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.toggle-option:not(.active) .toggle-badge {
  background: rgba(63, 191, 127, 0.15);
  color: var(--green);
}

.provisional-note {
  margin: 20px auto 0;
  max-width: 560px;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(242, 146, 74, 0.12);
  border: 1px solid rgba(242, 146, 74, 0.35);
  color: #F2924A;
  font-size: 0.85rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: start;
  margin-top: 40px;
}
.price-card {
  position: relative;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px 28px;
}
.price-card.featured {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 20px 50px rgba(63, 191, 127, 0.15);
}
.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card h3 {
  margin-bottom: 6px;
}
.price-card-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  min-height: 40px;
  margin-bottom: 20px;
}
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 24px;
}
.price-currency {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--off-white);
}
.price-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  color: var(--off-white);
  line-height: 1;
}
.price-period {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 4px;
}
.price-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 28px;
}
.price-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.price-features li {
  position: relative;
  padding-left: 26px;
  font-size: 0.88rem;
  color: var(--off-white);
  line-height: 1.4;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 800;
}

/* ---------- Coming soon ---------- */
.coming-soon {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px;
}
.coming-soon .section-badge { margin-bottom: 20px; }

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 560px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--navy-light);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 1rem; /* 16px minimum: below that, iOS Safari zooms the whole page on focus */
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}
.form-notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.form-notice.success { background: rgba(63, 191, 127, 0.15); color: var(--green); }
.form-notice.error { background: rgba(224, 90, 90, 0.15); color: #E05A5A; }

/* ---------- Founder sign-off (home, under "Built by people who use what they build") ---------- */
.founder-sign {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 620px;
  margin: 32px auto 0;
  padding: 20px 24px;
  text-align: left;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.founder-sign img { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 0%; border: 2px solid var(--green); }
.founder-sign p { margin: 0; }
.founder-sign-name { font-family: var(--font-heading); font-weight: 700; color: var(--off-white); }
.founder-sign-name span { font-weight: 500; color: var(--text-muted); }
.founder-sign .founder-sign-line { color: var(--text-muted); font-size: 0.95rem; margin: 6px 0 8px; }
.founder-sign-sep { color: var(--text-muted); margin: 0 8px; }
@media (max-width: 560px) {
  .founder-sign { flex-direction: column; text-align: center; }
}

/* ---------- Related pages (footer.php, above the footer) ---------- */
.related { padding: 56px 0; border-top: 1px solid var(--border-subtle); }
.related h2 { font-size: 1.4rem; margin-bottom: 24px; }
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  color: inherit;
  transition: border-color 0.2s;
}
.related-card:hover { border-color: var(--green); text-decoration: none; }
.related-card strong { color: var(--green); font-family: 'Manrope', sans-serif; font-size: 1.05rem; }
.related-card span { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Blog (blog.php + lib/blog.php) ---------- */
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  color: inherit;
  transition: border-color 0.2s;
}
.blog-card:hover { border-color: var(--green); text-decoration: none; }
.blog-card small { color: var(--text-muted); font-size: 0.85rem; }
.blog-card strong { color: var(--off-white); font-family: var(--font-heading); font-size: 1.2rem; line-height: 1.3; }
.blog-card span { color: var(--text-muted); font-size: 0.95rem; }
.blog-card em { color: var(--green); font-style: normal; font-weight: 700; margin-top: auto; }

.post-head { padding: 64px 0 32px; }
.post .prose, .post-cta, .post-more, .video-facade, .video-frame { max-width: 760px; margin-left: auto; margin-right: auto; }
.post-head .wrap { max-width: 808px; } /* 760 + the 24px side padding of .wrap: lines up with the text below */
.post-head h1 { font-size: 2.6rem; margin: 18px 0 14px; }
.post-back { font-size: 0.95rem; }
.post-meta { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.prose { font-size: 1.1rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin: 44px 0 14px; }
.prose h3 { font-size: 1.25rem; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--off-white); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--green);
  background: var(--navy-light);
  border-radius: 0 10px 10px 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.post-cta {
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--green);
  border-radius: 14px;
  background: rgba(63, 191, 127, 0.08);
  text-align: center;
}
.post-cta h2 { font-size: 1.5rem; }
.post-cta p { color: var(--text-muted); }
.post-cta .hero-ctas { margin: 20px 0 0; }
.post-more { margin-top: 56px; }
.post-more h2 { font-size: 1.4rem; margin-bottom: 20px; }

.post-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 22px;
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--navy-light);
}
.post-source p { margin: 0; color: var(--text-muted); font-size: 0.95rem; flex: 1 1 320px; }
.post-source-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(63, 191, 127, 0.15);
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
}
.post-source .btn { padding: 10px 18px; font-size: 0.95rem; }

.blog-cat {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-cat { margin: 18px 0 -6px; }

/* Newest post: one wide card above the grid. */
.blog-featured {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 36px;
  border: 1px solid var(--green);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(63, 191, 127, 0.10), var(--navy-light) 60%);
  color: inherit;
}
.blog-featured:hover { text-decoration: none; border-color: var(--off-white); }
.blog-featured-label { color: var(--green); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.blog-featured strong { color: var(--off-white); font-family: var(--font-heading); font-size: 1.9rem; line-height: 1.2; max-width: 820px; }
.blog-featured-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 820px; }
.blog-featured small { color: var(--text-muted); font-size: 0.9rem; }
.blog-featured em { color: var(--green); font-style: normal; font-weight: 700; }

.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.blog-chip {
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--off-white);
  font-size: 0.95rem;
}
.blog-chip:hover { text-decoration: none; border-color: var(--green); }
.blog-chip.active { background: var(--green); border-color: var(--green); color: var(--navy); font-weight: 700; }

/* Numbered sources: [1] in the text, list at the end. */
.prose sup.fn { font-size: 0.7em; line-height: 0; margin-left: 1px; }
.prose sup.fn a { text-decoration: none; }
.post-sources { max-width: 760px; margin: 40px auto 0; padding: 24px 0 0; border-top: 1px solid var(--border-subtle); } /* padding overrides the global "section { padding: 70px 0 }" */
.post-sources h2 { font-size: 1.2rem; margin-bottom: 12px; }
.post-sources ol { margin: 0; padding-left: 1.6em; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.post-sources li { margin-bottom: 8px; overflow-wrap: anywhere; }
.post-sources li:target { color: var(--off-white); }
.fn-back { text-decoration: none; margin-left: 4px; }

/* Callout box: "> [!note]" / "> [!warning]" in a post. */
.prose .callout {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  background: var(--navy-light);
}
.prose .callout-warning { border-left-color: #F2924A; }
.prose .callout-label { margin: 0 0 6px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.prose .callout-warning .callout-label { color: #F2924A; }
.prose .callout p:last-child { margin-bottom: 0; }

/* Author box at the end of a post. */
.post-author {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 760px;
  margin: 40px auto 0;
  padding: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.post-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-author p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.post-author .post-author-name { color: var(--off-white); font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }

@media (max-width: 768px) {
  .blog-featured { padding: 24px 20px; }
  .blog-featured strong { font-size: 1.45rem; }
  .post-author { padding: 18px; gap: 14px; }
  .post-author img { width: 56px; height: 56px; }
}

/* YouTube: thumbnail + play button until the click (blog.php swaps in the player). */
.video-facade {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 36px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85; }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--green);
}
.video-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent var(--navy);
}
.video-facade:hover .video-play { background: var(--green-dark); }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-bottom: 36px; }

@media (max-width: 768px) {
  .post-head { padding: 40px 0 20px; }
  .post-head h1 { font-size: 1.9rem; }
  .prose { font-size: 1.05rem; }
  .prose h2 { font-size: 1.35rem; }
  .post-cta { padding: 24px 18px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--green); }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 720px; margin: 0 auto; padding: 60px 0; }
.legal-content h1 { font-size: 2rem; }
.legal-content .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 32px; }
.legal-content h2 { font-size: 1.2rem; margin-top: 32px; }
.legal-content p, .legal-content li { color: var(--off-white); font-size: 0.95rem; }
.legal-notice {
  background: rgba(63, 191, 127, 0.1);
  border: 1px solid rgba(63, 191, 127, 0.3);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9rem;
  margin-bottom: 32px;
  color: var(--off-white);
}

/* ---------- OpenClaw guide (openclaw-guide.php / openclaw-guide-download.php) ---------- */
.guide-h1 { font-size: 2.6rem; }
.btn-disabled { opacity: 0.55; cursor: not-allowed; }
.btn-disabled:hover { transform: none; }

.lang-switch {
  display: flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
}
.lang-switch a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}
.lang-switch a:hover { color: var(--off-white); text-decoration: none; }
.lang-switch a.active { background: var(--green); color: var(--navy); }

.timeline {
  list-style: none;
  max-width: 760px;
  margin: 24px auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: baseline;
  background: var(--navy);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 22px;
}
.timeline-time {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--green);
}
.timeline-text { color: var(--off-white); }

.chapter-list {
  list-style: none;
  max-width: 820px;
  margin: 36px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px 28px;
}
.chapter-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.chapter-num {
  flex: 0 0 28px;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--green);
  text-align: right;
}
.chapter-appendices {
  max-width: 820px;
  margin: 24px auto 0;
  color: var(--text-muted);
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.check-list, .cross-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-list li, .cross-list li {
  position: relative;
  padding-left: 28px;
  color: var(--off-white);
}
.check-list li::before, .cross-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
}
.check-list li::before { content: "✓"; color: var(--green); }
.cross-list li::before { content: "✕"; color: var(--text-muted); }

.cost-list {
  max-width: 820px;
  margin: 36px auto 0;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}
.cost-list div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--navy);
}
.cost-list div:first-child { border-top: none; }
.cost-list dt { font-weight: 700; }
.cost-list dd { margin: 0; color: var(--text-muted); }
.cost-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 16px; }

.guide-buy { max-width: 460px; margin: 40px auto 0; }
.guide-choose {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
}
.guide-editions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.guide-editions .btn { display: block; text-align: center; }
.guide-secure { margin: 20px 0 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

.faq { max-width: 820px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--navy);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 22px;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 800;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--text-muted); }

.guide-disclaimer {
  max-width: 720px;
  margin: 40px auto 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.download-list {
  max-width: 460px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.download-list .btn { display: block; text-align: center; }
.download-quota { margin: 14px 0 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Home ---------- */
.hero-note { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.home-shot { margin-top: 48px; }
.home-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
/* Text column + illustration/list column; stacks on tablets and phones. */
.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.lang-demo {
  background: var(--navy);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lang-demo-label { margin: 0 0 4px; color: var(--text-muted); font-size: 0.85rem; }
.lang-bubble {
  margin: 0;
  align-self: flex-start;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--navy-light);
  color: var(--off-white);
}
.lang-bubble-code {
  display: inline-block;
  margin-right: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
}

/* ---------- Live demo (footer.php) ---------- */
.demo-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.demo-launcher:hover { text-decoration: none; background: var(--green-dark); }
.demo-launcher[hidden] { display: none; }
.demo-launcher-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 46, 82, 0.25);
}
.demo-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 400px;
  height: min(680px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.demo-panel[hidden] { display: none; }
.demo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 6px;
}
.demo-panel-title { margin: 0; font-family: var(--font-heading); font-weight: 800; color: var(--off-white); }
.demo-panel-close {
  background: none;
  border: 0;
  color: var(--off-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.demo-panel-intro, .demo-panel-privacy { margin: 0; padding: 0 16px 8px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.demo-panel-privacy { color: var(--off-white); opacity: 0.8; }
.demo-panel-body { position: relative; flex: 1; display: flex; background: var(--white); }
.demo-panel-frame { flex: 1; width: 100%; border: 0; background: var(--white); }
.demo-panel-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.95rem;
}
.demo-panel-loading[hidden] { display: none; }
.demo-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(10, 46, 82, 0.15);
  border-top-color: var(--green-dark);
  animation: demo-spin 0.8s linear infinite;
}
@keyframes demo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .demo-spinner { animation-duration: 2.4s; } }
.demo-panel-tab { padding: 8px 16px; font-size: 0.82rem; text-align: right; }
@media (max-width: 560px) {
  .demo-launcher { right: 16px; bottom: 16px; padding: 10px 16px; font-size: 0.9rem; }
  .demo-panel { inset: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; }
  /* Room under the footer links so the floating button never covers them. */
  .site-footer { padding-bottom: 84px; }
}

/* ---------- Responsive ---------- */
/* The full menu + EN·ES·PT switcher needs ~1140px in Spanish (the longest;
   ~1095px in EN/PT) — measured 03/10 with the real fonts. Below 1180px (some
   room for a scrollbar) it collapses into the hamburger. Added a menu item or
   changed a label? Measure again and raise this limit if needed. */
@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 600px; }
  .site-nav a:not(.btn) {
    display: block;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
  }
  .site-nav .btn { margin: 16px 24px; text-align: center; }
}
/* Phones: logo, switcher and hamburger must fit side by side in 360px. */
@media (max-width: 480px) {
  .site-header .wrap { gap: 12px; padding: 0 16px; }
  .site-logo-img { height: 36px; }
  .site-lang a { padding: 4px 7px; }
}
@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .hero-compact h1 { font-size: 1.8rem; }
  .hero { padding: 60px 0 40px; }
  section { padding: 50px 0; }
  .guide-h1 { font-size: 1.9rem; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .chapter-list { grid-template-columns: 1fr; }
  .cost-list div { grid-template-columns: 1fr; gap: 4px; padding: 14px 18px; }
}
@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Diagnostic (diagnostic.php) ----------
   One question per screen, big one-tap answers. Result colors: green = fits,
   amber = with caveats, muted = not for you now. .diag-cta (below) is the green
   "Not sure it's for you?" capsule used on Home, rmAgentBooking, Pricing and blog posts. */
.diag-hero { padding-bottom: 40px; }
.diag-h1 { font-size: 2.4rem; }
.diag-privacy { font-size: 0.9rem; color: var(--text-muted); max-width: 560px; margin: 8px auto 0; }
.diag-section { padding-top: 0; scroll-margin-top: 100px; }
.diag-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  background: var(--navy-light);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.diag-progress-text { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.diag-progress { height: 6px; border-radius: 999px; background: rgba(245, 245, 235, 0.1); overflow: hidden; margin-bottom: 24px; }
.diag-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.25s ease; }
.diag-question { font-size: 1.6rem; margin-bottom: 8px; outline: none; }
.diag-hint { color: var(--text-muted); margin-bottom: 0; }
.diag-options { display: grid; gap: 12px; margin: 24px 0 20px; }
.diag-option {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--off-white);
  background: var(--navy);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.diag-option:hover, .diag-option:focus-visible { border-color: var(--green); outline: none; }
.diag-option.selected { border-color: var(--green); background: rgba(63, 191, 127, 0.1); }
.diag-back {
  background: none;
  border: 0;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
}
.diag-back:hover { color: var(--off-white); }
.diag-result h2 { outline: none; }
.diag-result-not_fit { background: rgba(245, 245, 235, 0.08); color: var(--off-white); }
.diag-result-caveats { background: rgba(242, 181, 68, 0.14); color: #F2B544; }
.diag-block { margin-top: 28px; }
.diag-block h3 { margin-bottom: 12px; }
.diag-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.diag-list li { position: relative; padding-left: 30px; color: var(--off-white); }
.diag-list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.diag-list-good li::before { content: '✓'; color: var(--green); }
.diag-list-warn li::before { content: '!'; color: #F2B544; left: 6px; }
.diag-list-never li { color: var(--text-muted); }
.diag-list-never li::before { content: '×'; color: var(--text-muted); left: 2px; }
.diag-plan {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: rgba(63, 191, 127, 0.08);
}
.diag-plan p { margin: 0; }
.diag-plan-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); font-weight: 700; }
.diag-plan-name { font-family: var(--font-heading); font-size: 1.5rem; margin: 4px 0 !important; }
.diag-plan-name span { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; margin-left: 6px; }
.diag-plan-limits { color: var(--off-white); }
.diag-plan-why { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px !important; }
.diag-ctas { margin: 32px 0 8px; }
/* .hero-ctas is display:flex, which would beat the hidden attribute. */
.diag-hero [hidden], .diag-section[hidden], .diag-section [hidden] { display: none; }
.diag-cta-wrap { margin: 20px 0 18px; }
.diag-cta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  padding: 12px 22px 12px 14px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  background: rgba(63, 191, 127, 0.12);
  font-size: 1.05rem;
  line-height: 1.35;
  transition: background 0.15s ease, transform 0.15s ease;
}
.diag-cta:hover { text-decoration: none; background: rgba(63, 191, 127, 0.22); transform: translateY(-1px); }
.diag-cta-icon {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.diag-cta-q { color: var(--off-white); }
.diag-cta-a { color: var(--green); font-family: var(--font-heading); font-weight: 800; }
@media (max-width: 560px) {
  .diag-cta { border-radius: 16px; padding: 12px 16px; font-size: 1rem; }
}
@media (max-width: 768px) {
  .diag-h1 { font-size: 1.9rem; }
  .diag-card { padding: 22px 18px; }
  .diag-question { font-size: 1.3rem; }
}
.hero .diag-cta-wrap { margin-top: 4px; }
