/*
Theme Name: personalvm
Theme URI: https://personalvm.com
Author: personalvm
Description: Block theme for personalvm.com — matches the portal design (Space Grotesk / IBM Plex, ink + paper + blue accent).
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: personalvm
*/

:root {
  --ink: #0F1720;
  --paper: #F5F6F4;
  --surface: #FFFFFF;
  --text: #16202B;
  --text-muted: #5B6672;
  --line: #DADFE3;
  --accent: #2B4EFF;
  --accent-ink: #16309E;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15,23,32,0.06);
  --shadow-md: 0 10px 30px rgba(15,23,32,0.12);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:root :where(.is-layout-flow) > * { margin-block-start: 0; }

/* paragraphs on marketing sections are muted like the portal */
.hp-main p { color: var(--text-muted); max-width: 60ch; margin: 0 0 1rem; }
.hp-main h1, .hp-main h2, .hp-main h3 { margin: 0 0 0.5rem; }

/* ---------- header ---------- */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky; top: 0; z-index: 20;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  background: rgba(245,246,244,0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .brand, .site-header .brand a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--text); margin: 0; text-decoration: none;
}
.site-header .brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.site-header .brand-logo img { height: 30px; width: auto; display: block; }
.site-header__right { display: flex; align-items: center; gap: 1.4rem; }
.site-header .wp-block-navigation { font-size: 0.9rem; }
.site-header .wp-block-navigation a { color: var(--text); text-decoration: none; }
.site-header .wp-block-navigation a:hover { color: var(--accent); }
.site-header .wp-block-buttons { margin: 0; }
.site-header .wp-block-button__link { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

/* ---------- buttons ---------- */
.wp-block-button__link { transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; box-shadow: var(--shadow-sm); }
.wp-block-button__link:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cta-accent .wp-block-button__link { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-md); }
.cta-accent .wp-block-button__link:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.cta-ghost .wp-block-button__link { background: transparent; color: var(--ink); box-shadow: none; }
.cta-ghost .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 5.5rem 2rem 4rem; overflow: hidden;
  background: radial-gradient(760px 420px at 82% -10%, rgba(43,78,255,0.14), transparent 60%), var(--paper);
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.hero-grid { display: flex; gap: 3.5rem; align-items: center; flex-wrap: wrap; }
.hero-copy { flex: 1 1 460px; }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.08; max-width: 15ch; font-weight: 700; }
.hero-copy .lead { font-size: 1.12rem; max-width: 44ch; margin-top: 1.1rem; }
.cta-row { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.cta-row .price-note { font-family: var(--font-mono); font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.cta-row .wp-block-buttons { margin: 0; }

.diagram-block {
  flex: 1 1 380px;
  background: linear-gradient(165deg, #131E2C 0%, var(--ink) 65%);
  padding: 2.4rem 2.2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(14px);
  animation: rise 0.7s 0.15s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .diagram-block { animation: none; opacity: 1; transform: none; } }
.diagram-label { font-family: var(--font-mono); font-size: 0.78rem; color: #8E9AA8; margin-bottom: 0.7rem; letter-spacing: 0.02em; }
.diagram-caption { font-size: 0.87rem; color: #7C8894; margin-top: 0.7rem; }
.diagram-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 1.7rem 0; }
.diagram-block svg { display: block; width: 100%; height: auto; }

/* ---------- sections ---------- */
.hp-section { max-width: 1080px; margin: 0 auto; padding: 4.5rem 2rem; }
.hp-section.divided { border-top: 1px solid var(--line); }
.hp-section .eyebrow, .page-head .eyebrow { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); margin: 0 0 0.6rem; }
.hp-section h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.hp-section .section-lead { max-width: 52ch; margin-bottom: 2.4rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.step { padding: 0 1.6rem; position: relative; }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 0.35rem; right: 0; width: 1px; height: 2.2rem; background: var(--line); }
.step .num { font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; font-weight: 500; margin: 0; }
.step h3 { font-size: 1.1rem; margin: 0.6rem 0 0.5rem; }
.step p:last-child { font-size: 0.94rem; margin: 0; }

.panel { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 0.4rem 1.8rem; }
.plan-row { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 0; gap: 1rem; }
.plan-row.best { position: relative; }
.plan-row.best::before { content: 'Best value'; position: absolute; top: -0.65rem; left: 0; font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); background: var(--surface); padding: 0 0.4rem; }
.plan-row .plan-name { margin: 0; font-weight: 500; font-size: 1.02rem; color: var(--text); }
.plan-row .per-month { color: var(--text-muted); font-size: 0.85rem; margin-left: 0.6rem; font-weight: 400; }
.plan-row .price { margin: 0; font-family: var(--font-mono); font-size: 1.25rem; color: var(--text); }

.included-row { display: flex; align-items: center; gap: 1rem; padding: 1.05rem 0; }
.included-row .mark { flex: none; width: 26px; height: 26px; border-radius: 8px; background: rgba(43,78,255,0.1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.85rem; margin: 0; }
.included-row p:last-child { margin: 0; color: var(--text); }

.locations { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.locations p { margin: 0; font-family: var(--font-mono); font-size: 0.85rem; padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); }

.cta-band { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: 3.2rem 2.5rem; text-align: center; }
.cta-band h2 { color: var(--paper); font-size: 1.7rem; }
.cta-band p { color: #A9B4BE; max-width: 40ch; margin: 0.6rem auto 1.6rem; }
.cta-band .wp-block-buttons { justify-content: center; }

/* ---------- blog ---------- */
.page-head { max-width: 1080px; margin: 0 auto; padding: 4rem 2rem 1rem; }
.page-head h1 { margin-bottom: 0.6rem; }
.page-head p { color: var(--text-muted); max-width: 52ch; }
.blog-wrap { max-width: 1080px; margin: 0 auto; padding: 1.5rem 2rem 4rem; }

.post-cards .wp-block-post-template { gap: 1.6rem; }
.post-cards .wp-block-post-template > li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease;
  display: flex; flex-direction: column;
}
.post-cards .wp-block-post-template > li:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-cards .wp-block-post-featured-image { margin: 0; }
.post-cards .wp-block-post-featured-image img { border-radius: 0; width: 100%; }
.post-cards .card-body { padding: 1.2rem 1.4rem 1.5rem; }
.post-cards .wp-block-post-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin: 0 0 0.4rem; }
.post-cards .wp-block-post-title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.post-cards .wp-block-post-title a { color: var(--ink); }
.post-cards .wp-block-post-title a:hover { color: var(--accent); text-decoration: none; }
.post-cards .wp-block-post-excerpt { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.post-cards .wp-block-post-excerpt__more-link { display: none; }
.wp-block-query-pagination { margin-top: 2.5rem; font-family: var(--font-mono); font-size: 0.88rem; justify-content: space-between; }

.article { max-width: 720px; margin: 0 auto; padding: 3.5rem 2rem 2rem; }
.article-meta { display: flex; gap: 0.9rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.6rem; }
.article-meta p { margin: 0; }
.article .wp-block-post-title { margin-bottom: 0.8rem; }
.article .wp-block-post-featured-image { margin: 0 0 2rem; }
.entry-content { font-size: 1.05rem; line-height: 1.7; }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content h2 { margin-top: 2.4rem; }
.entry-content h3 { margin-top: 1.8rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li + li { margin-top: 0.4rem; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 0.55rem 0.8rem; text-align: left; }
.entry-content th { background: var(--surface); font-weight: 500; }
.entry-content :not(pre) > code { font-family: var(--font-mono); font-size: 0.9em; background: rgba(15,23,32,0.06); padding: 0.1em 0.4em; border-radius: 6px; }
.article-cta { max-width: 1080px; margin: 0 auto; padding: 2rem 2rem 4rem; }

.affiliate-note { font-size: 0.85rem; color: var(--text-muted); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.8rem 1rem; }
.affiliate-note p { margin: 0; color: var(--text-muted); }

/* ---------- footer ---------- */
.site-footer { max-width: 1080px; margin: 0 auto; padding: 2.5rem 2rem 4rem; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; color: var(--text-muted); }
.site-footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer__links p { margin: 0; }

@media (max-width: 780px) {
  .site-header { padding: 0.9rem 1.2rem; }
  .hero { padding: 3.5rem 1.2rem 3rem; }
  .hp-section, .page-head, .blog-wrap, .article, .article-cta, .site-footer { padding-left: 1.2rem; padding-right: 1.2rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .step:not(:last-child)::after { display: none; }
  .step { padding: 0; }
  .cta-band { padding: 2.4rem 1.4rem; }
  .panel { padding: 0.4rem 1.2rem; }
}

/* ---------- contact form ---------- */
.contact-wrap { max-width: 1080px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.contact-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2rem 2rem 1.6rem; max-width: 560px; }
.cf-field { margin-bottom: 1.1rem; }
.cf-field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.cf-optional { color: var(--status-off); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem; padding: 0.65rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form textarea:focus, .cf-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile-box { margin: 0 0 0.9rem; min-height: 0; }
.cf-status { min-height: 1.3em; margin: 0 0 0.9rem; font-size: 0.9rem; color: var(--text-muted); }
.cf-status.is-error { color: var(--danger); }
.cf-submit {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; padding: 0.75rem 1.5rem;
  border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff;
  cursor: pointer; box-shadow: var(--shadow-md); transition: background .15s ease, transform .15s ease;
}
.cf-submit:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); }
.cf-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.cf-note { font-size: 0.82rem; color: var(--text-muted); margin: 1rem 0 0; }
.cf-thanks h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.cf-thanks p { margin: 0; }
@media (max-width: 780px) { .contact-card { padding: 1.5rem 1.25rem; } .contact-wrap { padding: 0.5rem 1rem 3rem; } }

/* ---------- documentation page ---------- */
.docs-wrap { max-width: 1080px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.docs-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.6rem; max-width: 720px; }
.docs-jump a { font-size: 0.88rem; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.docs-jump a:hover { border-color: var(--accent); color: var(--accent); }
.docs-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.8rem 2rem; max-width: 720px; margin: 0 0 1.4rem; scroll-margin-top: 5rem; }
.docs-card h2 { font-size: 1.35rem; margin: 0 0 0.9rem; }
.docs-card ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.docs-card li { margin-bottom: 0.65rem; color: var(--text); line-height: 1.55; }
.docs-card li strong { font-weight: 600; }
.docs-card a { color: var(--accent); }
.docs-card code { font-family: var(--font-mono); font-size: 0.86em; background: #F1F3F5; padding: 0.1em 0.4em; border-radius: 5px; }
.docs-card pre { margin: 0.6rem 0 0.3rem; padding: 0.9rem 1rem; background: #F1F3F5; border-radius: var(--radius); overflow-x: auto; }
.docs-card pre code { background: none; padding: 0; font-size: 0.84rem; }
.docs-card dt { font-weight: 600; margin-top: 0.9rem; }
.docs-card dd { margin: 0.2rem 0 0; color: var(--text-muted); line-height: 1.55; }
.docs-card p { max-width: none; color: var(--text); }
.docs-tip { background: #FFF6E0; border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.92rem; }
.docs-btn { display: inline-block; font-weight: 500; padding: 0.7rem 1.4rem; border-radius: var(--radius); background: var(--accent); color: #fff !important; text-decoration: none; box-shadow: var(--shadow-md); }
.docs-btn:hover { background: var(--accent-ink); }
@media (max-width: 780px) { .docs-card { padding: 1.3rem 1.2rem; } .docs-wrap { padding: 0.5rem 1rem 3rem; } }

/* ---- legal pages ---- */
.legal-wrap { max-width: 1080px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.legal-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2rem 2.2rem; max-width: 820px; }
.legal-card h2 { font-size: 1.3rem; margin: 2rem 0 0.7rem; scroll-margin-top: 5rem; }
.legal-card > h2:first-of-type { margin-top: 0; }
.legal-card p, .legal-card li { line-height: 1.6; color: var(--text); max-width: none; }
.legal-card ul { margin: 0.4rem 0 1rem; padding-left: 1.25rem; }
.legal-card li { margin-bottom: 0.5rem; }
.legal-card a { color: var(--accent); }
.legal-meta { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 1.2rem; }
.legal-summary { background: #F1F6FF; border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 0 0 1.6rem; }
.legal-summary h2 { margin: 0 0 0.6rem !important; font-size: 1.1rem; }
.legal-summary ul { margin-bottom: 0.6rem; }
.legal-summary p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1rem; }
.legal-toc a { font-size: 0.84rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--surface); }
.legal-toc a:hover { border-color: var(--accent); color: var(--accent); }
.legal-table-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; }
.legal-table { border-collapse: collapse; width: 100%; font-size: 0.88rem; min-width: 640px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); line-height: 1.5; }
.legal-table th { font-weight: 600; background: #F6F7F9; }
@media (max-width: 780px) { .legal-card { padding: 1.3rem 1.15rem; } .legal-wrap { padding: 0.5rem 1rem 3rem; } }
