/*
Theme Name: Red Cedar Software
Theme URI: https://redcedarsoftware.com
Author: Red Cedar Software
Author URI: https://redcedarsoftware.com
Description: A modern WordPress theme for Red Cedar Software — warm cedar-inspired palette, geometric sans typography, and { } brace motifs.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: red-cedar
Tags: custom-menu, featured-images, threaded-comments, two-columns, right-sidebar, wide-blocks
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
  /* Core palette */
  --rc-red:       #C3262E;
  --rc-red-deep:  #9E1E25;
  --rc-red-soft:  #E8565E;
  --rc-ink:       #0B0B0B;
  --rc-bark:      #2A1F17;
  --rc-cedar:     #4A2E1E;
  --rc-tan:       #D9C6A5;
  --rc-sand:      #EADFC9;
  --rc-cream:     #F6F1E8;
  --rc-paper:     #FFFFFF;
  --rc-white:     #FFFFFF;
  --rc-line:      rgba(11, 11, 11, 0.12);
  --rc-muted:     rgba(11, 11, 11, 0.58);

  /* Semantic — light mode */
  --bg:           var(--rc-paper);
  --bg-elev:      var(--rc-white);
  --bg-sunk:      var(--rc-cream);
  --fg:           var(--rc-ink);
  --fg-muted:     var(--rc-muted);
  --fg-subtle:    rgba(11, 11, 11, 0.42);
  --line:         var(--rc-line);
  --line-strong:  rgba(11, 11, 11, 0.28);
  --accent:       var(--rc-red);
  --accent-ink:   var(--rc-white);

  /* Typography */
  --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing — 4px base grid */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* Border radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11,11,11,0.06), 0 1px 3px rgba(11,11,11,0.04);
  --shadow-md: 0 4px 12px rgba(11,11,11,0.08), 0 2px 4px rgba(11,11,11,0.04);
  --shadow-lg: 0 12px 32px rgba(11,11,11,0.12), 0 4px 8px rgba(11,11,11,0.06);

  /* Layout */
  --content-width: 1200px;
  --sidebar-width: 280px;
  --nav-height: 112px;
}

/* Dark mode */
[data-theme="dark"],
.dark-mode {
  --bg:          #14110D;
  --bg-elev:     #1C1813;
  --bg-sunk:     #0E0B08;
  --fg:          #F2EBDC;
  --fg-muted:    rgba(242, 235, 220, 0.64);
  --fg-subtle:   rgba(242, 235, 220, 0.40);
  --line:        rgba(242, 235, 220, 0.12);
  --line-strong: rgba(242, 235, 220, 0.28);
  --accent:      #E8565E;
  --accent-ink:  #14110D;
  --rc-cream:    #2A221A;
  --rc-sand:     #241D16;
  --rc-paper:    #14110D;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on, 'cv11' on;
  transition: background 240ms ease, color 240ms ease;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--rc-red-deep);
}

p { margin: 0 0 var(--sp-5); }
ul, ol { margin: 0 0 var(--sp-5); padding-left: var(--sp-6); }
li { margin-bottom: var(--sp-2); }

blockquote {
  margin: var(--sp-6) 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--accent);
  background: var(--bg-sunk);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--fg-muted);
}

blockquote p:last-child { margin-bottom: 0; }

code, pre {
  font-family: var(--font-mono);
  font-size: 13px;
}

code {
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px 6px;
  color: var(--accent);
}

pre {
  background: var(--rc-ink);
  color: var(--rc-cream);
  padding: var(--sp-5);
  border-radius: var(--r-md);
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0 0 var(--sp-5);
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--sp-7) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-5);
  font-size: 14px;
}

th, td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

tr:last-child td { border-bottom: 0; }

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-4);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
}

h1 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; letter-spacing: -0.022em; font-weight: 600; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; font-weight: 600; }
h4 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
h5 { font-size: 15px; line-height: 1.4; font-weight: 600; }
h6 { font-size: 13px; line-height: 1.5; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.t-display { font-size: clamp(56px, 7vw, 104px); line-height: 0.96; letter-spacing: -0.035em; font-weight: 700; }
.t-h1      { font-size: clamp(40px, 4.2vw, 64px); line-height: 1.02; letter-spacing: -0.028em; font-weight: 700; }
.t-h2      { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -0.022em; font-weight: 600; }
.t-h3      { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; font-weight: 600; }
.t-h4      { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.t-body    { font-size: 16px; line-height: 1.6; }
.t-small   { font-size: 13.5px; line-height: 1.5; }
.t-micro   { font-size: 11px; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.t-mono    { font-family: var(--font-mono); font-size: 13px; letter-spacing: -0.01em; }

.muted  { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.accent { color: var(--accent); }

/* ============================================================
   BRACE MOTIF { }
   ============================================================ */

.brace {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--accent);
  display: inline-block;
}

.brace-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
}

.brace-wrap::before { content: "{"; color: var(--accent); font-weight: 400; }
.brace-wrap::after  { content: "}"; color: var(--accent); font-weight: 400; }

.sec-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}

.sec-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 160ms ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--rc-red-deep);
  border-color: var(--rc-red-deep);
  color: var(--rc-white);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--bg-sunk);
  color: var(--fg);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  padding: 8px 12px;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-sunk);
  color: var(--fg);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* WordPress button compatibility */
input[type="submit"],
button[type="submit"],
.wp-block-button__link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: all 160ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.wp-block-button__link:hover {
  background: var(--rc-red-deep);
  color: var(--rc-white);
}

/* ============================================================
   PILLS & TAGS
   ============================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all 160ms ease;
}

.pill:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

.pill-accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-3);
}

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.site-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo {
  height: auto;
  max-height: 100px;
  width: auto;
}

.site-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  line-height: 1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title .brace { color: var(--accent); }

/* Primary navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.primary-nav li { margin: 0; }

.primary-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: color 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-page-ancestor > a {
  color: var(--fg);
  background: var(--bg-sunk);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 160ms ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav li { position: relative; }

.primary-nav .sub-menu a {
  border-radius: var(--r-md);
  font-size: 14px;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* Get Started CTA in header */
.header-cta {
  padding: 9px 18px;
  font-size: 14px;
  white-space: nowrap;
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 16px;
  transition: all 160ms ease;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-sunk);
  color: var(--fg);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg);
  padding: 0;
  transition: all 160ms ease;
}

.menu-toggle:hover {
  background: var(--bg-sunk);
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle-icon span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 200ms ease;
}

/* ============================================================
   LAYOUT WRAPPERS
   ============================================================ */

.site-content {
  min-height: calc(100vh - var(--nav-height) - 200px);
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* No-sidebar layout */
.layout-full .content-area {
  max-width: 760px;
  margin: 0 auto;
}

/* With-sidebar layout */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--sp-8);
  align-items: start;
}

.layout-sidebar .content-area {
  min-width: 0;
}

.layout-sidebar .widget-area {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp-6));
}

/* Page header */
.page-header {
  padding: var(--sp-9) 0 var(--sp-7);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-7);
}

.page-header .sec-label {
  margin-bottom: var(--sp-4);
}

.entry-header {
  padding: var(--sp-8) 0 var(--sp-6);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

.entry-meta a,
.entry-meta span {
  font-size: 13.5px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

.entry-meta a:hover {
  color: var(--accent);
}

/* ============================================================
   POST & PAGE CONTENT
   ============================================================ */

.entry-content {
  font-size: 16px;
  line-height: 1.7;
}

.entry-content > * + * {
  margin-top: var(--sp-5);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--sp-7);
}

.entry-content img {
  border-radius: var(--r-lg);
  margin: var(--sp-6) 0;
}

.entry-content .wp-block-image figure {
  margin: var(--sp-6) 0;
}

.entry-content .wp-block-image figcaption {
  font-size: 13.5px;
  color: var(--fg-muted);
  text-align: center;
  margin-top: var(--sp-2);
  font-style: italic;
}

/* ============================================================
   POST CARDS (archive/home)
   ============================================================ */

.posts-grid {
  display: grid;
  gap: var(--sp-5);
}

.post-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-sunk);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cats {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.post-card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 var(--sp-3);
  line-height: 1.3;
}

.post-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 var(--sp-4);
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-subtle);
}

.post-card-read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

/* Featured post (first in grid) */
.post-card.is-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.post-card.is-featured .post-card-thumb {
  width: 45%;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.post-card.is-featured .post-card-title {
  font-size: 22px;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: var(--sp-8) 0;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-decoration: none;
  transition: all 160ms ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 var(--sp-4);
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ============================================================
   SIDEBAR / WIDGETS
   ============================================================ */

.widget-area {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.widget {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 var(--sp-4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: "{";
  color: var(--accent);
  font-weight: 600;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.widget li { margin: 0; }

.widget a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: 14px;
  color: var(--fg-muted);
  border-radius: var(--r-sm);
  transition: all 160ms ease;
}

.widget a:hover {
  color: var(--fg);
  background: var(--bg-sunk);
}

.widget_search .search-form {
  display: flex;
  gap: var(--sp-2);
}

.widget_search .search-field {
  flex: 1;
  padding: 10px var(--sp-3);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease;
}

.widget_search .search-field:focus {
  border-color: var(--accent);
}

.widget_search .search-submit {
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 14px;
  transition: background 160ms ease;
  font-family: var(--font-sans);
  font-weight: 600;
}

.widget_search .search-submit:hover {
  background: var(--rc-red-deep);
}

/* Tag cloud widget */
.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tagcloud a {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 12px !important;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  transition: all 160ms ease;
}

.tagcloud a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Recent posts widget */
.widget_recent_entries .post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  margin-left: auto;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  padding: var(--sp-10) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(195, 38, 46, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.hero-title {
  font-size: clamp(40px, 5vw, 80px);
  line-height: 0.97;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 var(--sp-5);
  max-width: 10ch;
}

.hero-title .brace { color: var(--accent); }

.hero-desc {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 520px;
  margin-bottom: var(--sp-6);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ============================================================
   SERVICE PILLARS
   ============================================================ */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
}

.pillar-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.pillar-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.pillar-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-3);
}

.pillar-key::before { content: "{ "; }
.pillar-key::after  { content: " }"; }

.pillar-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
}

.pillar-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  background: var(--rc-bark);
  color: var(--rc-cream);
  margin-top: var(--sp-10);
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--sp-9) var(--sp-6) var(--sp-7);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--sp-8);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(242, 235, 220, 0.12);
  margin-bottom: var(--sp-6);
}

.footer-brand .site-title {
  color: var(--rc-cream);
  font-size: 18px;
  margin-bottom: var(--sp-4);
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(242, 235, 220, 0.64);
  margin: 0 0 var(--sp-5);
  max-width: 280px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 235, 220, 0.48);
  margin: 0 0 var(--sp-4);
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-nav li { margin: 0; }

.footer-nav a {
  font-size: 14px;
  color: rgba(242, 235, 220, 0.72);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-nav a:hover {
  color: var(--rc-cream);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(242, 235, 220, 0.40);
}

.footer-legal a {
  color: rgba(242, 235, 220, 0.56);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--rc-cream);
}

/* ============================================================
   COMMENTS
   ============================================================ */

.comments-area {
  margin-top: var(--sp-8);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--line);
}

.comments-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--sp-6);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-7);
}

.comment {
  margin-bottom: var(--sp-5);
}

.comment-body {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.comment-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}

.comment-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  margin-top: 2px;
}

.comment-content p { margin: 0 0 var(--sp-3); }
.comment-content p:last-child { margin-bottom: 0; }

.comment-reply-link {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: none;
}

.comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease;
  margin-bottom: var(--sp-4);
  display: block;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */

.search-form {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.search-field {
  flex: 1;
  padding: 12px var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease;
}

.search-field:focus {
  border-color: var(--accent);
}

/* ============================================================
   404 PAGE
   ============================================================ */

.error-404 {
  padding: var(--sp-10) 0;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 700;
  color: var(--line);
  line-height: 1;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.05em;
}

.error-code span {
  color: var(--accent);
}

/* ============================================================
   POST NAVIGATION
   ============================================================ */

.post-navigation {
  margin-top: var(--sp-7);
}

.post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.post-nav-prev,
.post-nav-next {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.post-nav-prev:hover,
.post-nav-next:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.post-nav-next { text-align: right; }

.post-nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-subtle);
}

.post-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}

/* ============================================================
   WORDPRESS BLOCK EDITOR COMPATIBILITY
   ============================================================ */

.wp-block-pullquote {
  border-top: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  padding: var(--sp-6) 0;
  margin: var(--sp-7) 0;
}

.wp-block-pullquote blockquote {
  border: none;
  background: none;
  padding: 0;
}

.wp-block-pullquote p {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--fg);
  font-style: normal;
}

.wp-block-separator {
  height: 1px;
  background: var(--line);
  border: none;
  margin: var(--sp-7) 0;
}

.wp-block-separator.is-style-wide {
  background: var(--line);
}

.wp-block-cover {
  border-radius: var(--r-lg);
  overflow: hidden;
}

.wp-block-columns {
  gap: var(--sp-6) !important;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.section-padding {
  padding: var(--sp-9) 0;
}

/* ============================================================
   FRONT PAGE — HERO
   ============================================================ */

.fp-hero {
  padding: var(--sp-9) 0 var(--sp-10);
  position: relative;
  overflow: hidden;
  isolation: isolate;   /* scope SVG's z:-1 without affecting mobile nav */
  background: var(--bg);
}

.fp-hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(195,38,46,0.05) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Cedar tree line-art animation ─────────────────────────────── */
.fp-cedar-anim {
  position: absolute;
  right: 3%;
  bottom: 0;
  height: 108%;
  width: auto;
  color: var(--rc-bark);
  opacity: 0.11;
  pointer-events: none;
  z-index: -1;  /* paints below all hero content; scoped inside hero's isolation context */
}
[data-theme="dark"] .fp-cedar-anim {
  color: var(--rc-tan);
  opacity: 0.07;
}

/* Each path starts invisible (dashoffset == dasharray) */
.fp-cedar-anim .ct-trunk { stroke-dasharray: 470; stroke-dashoffset: 470; animation: cedar-draw 2s cubic-bezier(0.4,0,0.2,1) 0.3s forwards; }
.fp-cedar-anim .ct-root  { stroke-dasharray:  90; stroke-dashoffset:  90; animation: cedar-draw 0.7s ease-out 0.9s forwards; }
.fp-cedar-anim .ct-b1    { stroke-dasharray: 240; stroke-dashoffset: 240; animation: cedar-draw 0.9s ease-out 0.55s forwards; }
.fp-cedar-anim .ct-s1    { stroke-dasharray:  80; stroke-dashoffset:  80; animation: cedar-draw 0.5s ease-out 1.2s forwards; }
.fp-cedar-anim .ct-b2    { stroke-dasharray: 210; stroke-dashoffset: 210; animation: cedar-draw 0.85s ease-out 0.8s forwards; }
.fp-cedar-anim .ct-s2    { stroke-dasharray:  70; stroke-dashoffset:  70; animation: cedar-draw 0.45s ease-out 1.4s forwards; }
.fp-cedar-anim .ct-b3    { stroke-dasharray: 180; stroke-dashoffset: 180; animation: cedar-draw 0.8s ease-out 1.0s forwards; }
.fp-cedar-anim .ct-s3    { stroke-dasharray:  65; stroke-dashoffset:  65; animation: cedar-draw 0.45s ease-out 1.6s forwards; }
.fp-cedar-anim .ct-b4    { stroke-dasharray: 155; stroke-dashoffset: 155; animation: cedar-draw 0.75s ease-out 1.15s forwards; }
.fp-cedar-anim .ct-s4    { stroke-dasharray:  60; stroke-dashoffset:  60; animation: cedar-draw 0.4s ease-out 1.75s forwards; }
.fp-cedar-anim .ct-b5    { stroke-dasharray: 130; stroke-dashoffset: 130; animation: cedar-draw 0.7s ease-out 1.35s forwards; }
.fp-cedar-anim .ct-b6    { stroke-dasharray: 110; stroke-dashoffset: 110; animation: cedar-draw 0.65s ease-out 1.52s forwards; }
.fp-cedar-anim .ct-b7    { stroke-dasharray:  90; stroke-dashoffset:  90; animation: cedar-draw 0.6s ease-out 1.67s forwards; }
.fp-cedar-anim .ct-b8    { stroke-dasharray:  70; stroke-dashoffset:  70; animation: cedar-draw 0.55s ease-out 1.8s forwards; }
.fp-cedar-anim .ct-b9    { stroke-dasharray:  55; stroke-dashoffset:  55; animation: cedar-draw 0.5s ease-out 1.95s forwards; }
.fp-cedar-anim .ct-top   { stroke-dasharray: 100; stroke-dashoffset: 100; animation: cedar-draw 0.6s ease-out 2.3s forwards; }

@keyframes cedar-draw {
  to { stroke-dashoffset: 0; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .fp-cedar-anim path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

.fp-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

.fp-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.fp-hero-title {
  font-size: clamp(44px, 5.5vw, 80px);
  line-height: 0.97;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 var(--sp-5);
  color: var(--fg);
}

.fp-hero-title-accent { color: var(--accent); }

.fp-hero-desc {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: var(--sp-6);
}

.fp-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.fp-hero-subtext {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  margin: 0;
  letter-spacing: 0.02em;
}

.fp-hero-terminal {
  position: relative;
}

/* ============================================================
   FRONT PAGE — TRUST BAR
   ============================================================ */

.fp-trust-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
  padding: var(--sp-5) 0;
}

.fp-trust-bar .container {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.fp-trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.fp-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

.fp-trust-list span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   FRONT PAGE — SERVICES
   ============================================================ */

.fp-services {
  padding: var(--sp-10) 0;
}

.fp-section-header {
  max-width: 600px;
  margin-bottom: var(--sp-8);
}

.fp-section-header--center {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: var(--sp-7);
}

.fp-section-header--center .sec-label {
  justify-content: center;
}

.fp-section-title {
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 700;
  margin: 0 0 var(--sp-4);
  color: var(--fg);
}

.fp-section-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0;
}

.fp-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.fp-service-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

.fp-service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.fp-service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.fp-service-card:hover::before {
  opacity: 1;
}

.fp-service-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--sp-7);
}

.fp-service-card--wide .fp-service-icon {
  flex-shrink: 0;
  margin-top: var(--sp-1);
}

.fp-service-card--wide .fp-service-card-body {
  flex: 1;
}

.fp-service-icon {
  width: 44px;
  height: 44px;
  background: rgba(195, 38, 46, 0.08);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.fp-service-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.fp-service-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
}

.fp-service-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0;
  flex: 1;
}

.fp-service-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.fp-service-features li {
  font-size: 13.5px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
}

.fp-service-features li::before {
  content: "✓";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
}

.fp-service-features--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
}

.fp-service-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-top: auto;
  padding-top: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 160ms ease;
}

.fp-service-link:hover {
  color: var(--rc-red-deep);
  gap: 8px;
}

.fp-service-card--wide .fp-service-link {
  align-self: flex-end;
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0;
}

/* ============================================================
   FRONT PAGE — TESTIMONIALS
   ============================================================ */

.fp-testimonials {
  padding: var(--sp-10) 0;
  background: var(--bg-sunk);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fp-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.fp-testimonial {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: relative;
}

.fp-testimonial::before {
  content: "\201C";
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-6);
  font-size: 80px;
  line-height: 1;
  color: var(--line);
  font-family: Georgia, serif;
  pointer-events: none;
}

.fp-testimonial-stars {
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 2px;
}

.fp-testimonial-quote {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0;
  font-style: italic;
  flex: 1;
}

.fp-testimonial-attribution {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.fp-testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rc-cedar);
  color: var(--rc-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.fp-testimonial-name {
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  display: block;
}

.fp-testimonial-role {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 2px 0 0;
  font-family: var(--font-mono);
}

/* ============================================================
   FRONT PAGE — CTA BAND
   ============================================================ */

.fp-cta {
  padding: var(--sp-10) 0;
  background: var(--rc-bark);
  position: relative;
  overflow: hidden;
}

.fp-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(195,38,46,0.15) 0%, transparent 65%);
  pointer-events: none;
}

.fp-cta-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

.fp-cta-title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--rc-cream);
  margin: 0 0 var(--sp-4);
}

.fp-cta-desc {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(242, 235, 220, 0.64);
  margin: 0;
}

.fp-cta-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
}

.fp-cta-footnote {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(242, 235, 220, 0.40);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .fp-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }

  .fp-hero-terminal { display: none; }

  .fp-services-grid {
    grid-template-columns: 1fr;
  }

  .fp-service-card--wide {
    flex-direction: column;
    gap: var(--sp-4);
  }

  .fp-service-card--wide .fp-service-link {
    align-self: flex-start;
    margin-top: var(--sp-2);
  }

  .fp-testimonials-grid {
    grid-template-columns: 1fr;
  }

  .fp-cta-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .layout-sidebar {
    grid-template-columns: 1fr;
  }

  .layout-sidebar .widget-area {
    position: static;
    order: 2;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }

  .post-card.is-featured {
    flex-direction: column;
  }

  .post-card.is-featured .post-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  :root { --sp-6: 24px; }

  .fp-hero { padding: var(--sp-8) 0; }
  .fp-hero-actions { flex-direction: column; align-items: flex-start; }
  .fp-trust-bar .container { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .fp-testimonial { padding: var(--sp-5); }
  .fp-cta-actions { width: 100%; }
  .fp-cta-actions .btn { width: 100%; justify-content: center; }

  .menu-toggle { display: flex; }
  .header-cta { display: none; }

  .primary-nav {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0;
    background: var(--bg);
    padding: var(--sp-5);
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    z-index: 99;
    overflow-y: auto;
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }

  .primary-nav a {
    font-size: 16px;
    padding: var(--sp-3) var(--sp-4);
  }

  .primary-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--line);
    border-radius: 0;
    padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
    margin-top: var(--sp-2);
    background: none;
  }

  .hero { padding: var(--sp-8) 0; }
  .hero-title { max-width: none; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .page-header { padding: var(--sp-7) 0 var(--sp-5); }
  .entry-header { padding: var(--sp-6) 0 var(--sp-5); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}

.grecaptcha-badge { 
    visibility: hidden; 
}
