/* Castlepoint theme — base styles.
   Palette variables are injected at runtime by the theme chooser (assets/js/site.js).
   The defaults below mirror the "Dark ops" palette so first paint is correct
   before JS runs. */

:root {
  --bg:#05090F; --sf:#0A1119; --bd:#1C2A3C; --fg:#F2F6FB; --fg2:#9FB1C7; --fg3:#55657C;
  --ac:#43E08C; --acfg:#05090F;
  --font-d:'Space Grotesk',sans-serif; --font-b:'Space Grotesk',sans-serif; --font-m:'IBM Plex Mono',monospace;
  --r-card:12px; --r-btn:8px; --dw:700;
}

* { box-sizing:border-box; }

html, body {
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font-b);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a { color:var(--fg); text-decoration:none; }
a:hover { color:var(--ac); }
input::placeholder { color:var(--fg3); }
img { max-width:100%; }

.cp-wrap { min-height:100vh; background:var(--bg); color:var(--fg); }

.cp-container { max-width:1240px; margin:0 auto; }

/* hover helpers (inline style-hover from the design is reproduced with classes) */
.cp-card { transition:border-color .15s ease; }
.cp-card:hover { border-color:var(--ac); }
.cp-btn-solid { transition:filter .15s ease; }
.cp-btn-solid:hover { filter:brightness(1.1); }
.cp-input:focus { border-color:var(--ac); }
.cp-swatch { transition:transform .1s ease; }
.cp-swatch:hover { transform:scale(1.12); }

/* Responsive — the design is desktop-first with fixed grids; collapse them on small screens */
@media (max-width:900px) {
  .cp-grid-3 { grid-template-columns:1fr 1fr !important; }
  .cp-grid-4 { grid-template-columns:1fr 1fr !important; }
  .cp-split { grid-template-columns:1fr !important; gap:40px !important; }
  .cp-h1 { font-size:44px !important; }
}
@media (max-width:640px) {
  .cp-grid-3, .cp-grid-4, .cp-grid-2 { grid-template-columns:1fr !important; }
  .cp-pad { padding-left:22px !important; padding-right:22px !important; }
  .cp-h1 { font-size:34px !important; }
  .cp-h2 { font-size:28px !important; }
  .cp-briefing-form { flex-direction:column !important; }
}

/* Ghost-native content (posts / plain pages) fallback styling */
.gh-content { max-width:720px; margin:0 auto; padding:80px 40px; font-size:18px; line-height:1.7; color:var(--fg2); }
.gh-content h1, .gh-content h2, .gh-content h3 { color:var(--fg); font-family:var(--font-d); letter-spacing:-0.02em; }
.gh-content a { color:var(--ac); }

/* Koenig editor card widths (required by Ghost) */
.gh-content img { height:auto; }
.kg-width-wide { position:relative; width:85vw; min-width:100%; margin-left:calc(50% - 42.5vw); transform:translateX(0); }
.kg-width-full { position:relative; width:100vw; margin-left:calc(50% - 50vw); max-width:none; }
.kg-width-full img { width:100%; }
figure { margin:1.5em 0; }
figcaption { text-align:center; font-size:13px; color:var(--fg3); margin-top:8px; }
