/* ==========================================================================
   Shared site chrome (nav, footer) and content pages (blog, FAQ, legal)
   Builds on the tokens defined in style.css
   ========================================================================== */

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------------- Navigation ---------------- */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none;
  font-weight: 600; font-size: 14px; transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current='page'] { color: var(--primary); background: var(--primary-soft); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.2s, opacity 0.2s, top 0.2s; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .topbar { position: sticky; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.35);
    opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  }
  .site-nav a { padding: 12px 14px; font-size: 15px; }
  body.nav-open .site-nav { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .topbar-inner { position: relative; }
  .brand > span:last-child { display: inline; }
}

/* ---------------- Footer ---------------- */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--border); padding: 44px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-about p { color: var(--text-2); font-size: 14px; margin: 12px 0 0; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 4px 0 6px; }
.footer-col a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .site-footer { margin-top: 40px; padding-top: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

/* ---------------- Content page layout ---------------- */
.narrow { max-width: 760px; }
.page-hero {
  padding: 44px 0 28px;
  background: radial-gradient(800px 300px at 20% -20%, var(--hero-a), transparent 70%), var(--bg);
}
.page-hero h1 { font-size: clamp(30px, 4.6vw, 44px); margin: 10px 0 12px; }
.page-hero .lead { margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--text-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.post-meta { color: var(--muted); font-size: 14px; margin: 0; }

.prose { font-size: 16.5px; line-height: 1.75; color: var(--text-2); padding-bottom: 16px; }
.prose h2 { color: var(--text); font-size: 24px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.02em; }
.prose h3 { color: var(--text); font-size: 18px; margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--primary); }
.prose a { color: var(--primary); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose code { font-size: 0.86em; }
.prose > h2:first-child { margin-top: 12px; }
.legal { font-size: 15.5px; }
.callout { margin: 28px 0; padding: 16px 18px; border-radius: 14px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); color: var(--text); }
.cta-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.cta-inline .btn { text-decoration: none; height: 46px; padding: 0 20px; }
.prose .btn-primary { color: #fff; }

/* ---------------- Blog lists ---------------- */
.post-list { display: grid; gap: 14px; padding: 8px 0 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card a {
  display: flex; flex-direction: column; height: 100%; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.post-card a:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card .post-meta { font-size: 12.5px; }
.post-card h2 { font-size: 18px; line-height: 1.35; margin: 8px 0; color: var(--text); letter-spacing: -0.01em; }
.post-card p { margin: 0 0 14px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.read-more { margin-top: auto; color: var(--primary); font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------------- Homepage content ---------------- */
.seo-content .features { margin-top: 48px; }
.content-block { margin-top: 56px; }
.content-block > h2, .section-head h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin: 0 0 18px; }
.content-block p { color: var(--text-2); line-height: 1.7; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a, .more-link a { color: var(--primary); font-weight: 600; text-decoration: none; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-col h2 { font-size: 21px; margin: 0 0 12px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.steps h3 { margin: 4px 0 6px; font-size: 16px; }
.steps p { margin: 0; font-size: 14.5px; }
.plain-steps { color: var(--text-2); line-height: 1.8; padding-left: 20px; }

.check-list, .cross-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li, .cross-list li { position: relative; padding-left: 30px; color: var(--text-2); line-height: 1.6; }
.check-list li::before, .cross-list li::before {
  position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.check-list li::before { content: '✓'; color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.cross-list li::before { content: '✕'; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.faq-list { display: grid; gap: 10px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; transition: border-color 0.15s; }
.faq-list details[open] { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 700; color: var(--text); position: relative; font-size: 15.5px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 0; top: 13px; font-size: 22px; font-weight: 400; color: var(--primary); transition: transform 0.2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details > :not(summary) { margin-top: 0; }
.faq-list details p, .faq-list details ul { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.faq-list details > :last-child { padding-bottom: 16px; margin-bottom: 0; }
.faq-page .faq-list { margin-bottom: 8px; }
.more-link { margin-top: 16px; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .content-block { margin-top: 44px; }
}

/* ---------------- Contact & 404 ---------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 28px; }
.contact-card { padding: 18px; }
.contact-card h2 { font-size: 16px !important; margin: 0 0 6px !important; }
.contact-card p { font-size: 14.5px; margin: 0; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.not-found { text-align: center; padding: 72px 0 24px; }
.nf-code { font-size: clamp(80px, 18vw, 140px); font-weight: 800; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found .cta-inline { justify-content: center; }
.not-found .btn { text-decoration: none; }

@media (max-width: 760px) {
  .page-hero { padding: 28px 0 18px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 21px; margin-top: 32px; }
}

@media (max-width: 860px) {
  .site-nav {
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    backdrop-filter: blur(22px) saturate(1.8);
    -webkit-backdrop-filter: blur(22px) saturate(1.8);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 24px 50px -20px rgba(15, 23, 42, 0.4);
  }
}
