/* ============================================================================
   Quietpost landing version — shared stylesheet (hand-written, no Tailwind).
   The page itself is authored with inline styles (ported from the
   docs/quietpost/ prototype); this file holds only what inline styles cannot
   express: the fixed pastel palette + accent fallback, element resets,
   keyframes, :hover states, and the responsive collapse for the layout grids.
   Per-domain accent overrides are emitted server-side by {% quietpost_accent_vars %}.
   ========================================================================== */

/* Accent fallback (prototype soft coral). Overridden in <head> per-domain by
   {% quietpost_accent_vars %} so a custom brand color re-tints the whole page. */
:root {
  --accent: 255 125 92;
  --accent-deep: 199 98 72;
  --accent-soft: 255 239 235;
  color-scheme: light;

  /* Fixed quietpost palette (decorative secondaries stay constant per brand;
     --coral aliases the per-domain accent so the coral bits re-tint too). */
  --ink: #2E2A28;
  --cream: #FFF8F0;
  --sky: #5FAEE8;
  --mint: #74CBA6;
  --butter: #FFD37A;
  --muted: #857B73;
  --coral: rgb(var(--accent));
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: #FFF8F0;
  color: #2E2A28;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: clip; }
::selection { background: rgb(var(--accent) / 0.18); }

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }

a { -webkit-tap-highlight-color: transparent; }

/* Alpine pre-init guard: anything marked x-cloak stays hidden until Alpine
   boots and removes the attribute (the mobile close icon / chatbox panel would
   otherwise flash on load). Every landing theme carries this rule. */
[x-cloak] { display: none !important; }

/* Skip-to-content link (a11y) — visually hidden until focused. */
.qp-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #2E2A28; color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.qp-skip:focus { left: 0; }

/* Keyboard focus ring for the sea of inline-styled links/buttons (a11y). */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgb(var(--accent) / 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Keyframe ported from the prototype's inline <style>. */
@keyframes calm-float {
  0%   { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%  { transform: translateY(-16px) rotate(var(--r, 0deg)); }
  100% { transform: translateY(0) rotate(var(--r, 0deg)); }
}

/* Hover polish (the prototype expressed these as its framework's `style-hover`
   attribute, which is not real CSS — reimplemented here as classes). */
.qp-cta { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.qp-cta:hover { transform: translateY(-2px); }
.qp-btn-dark { transition: background 0.3s ease; }
.qp-btn-dark:hover { background: rgb(var(--accent)); }
.qp-fcard { transition: transform 0.35s ease, box-shadow 0.35s ease; }
.qp-fcard:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 32px 54px -30px rgba(46, 42, 40, 0.65);
}
.qp-revcard { transition: transform 0.35s ease; }

/* ---- Nav desktop/mobile switch (no Tailwind, plain media query) ---- */
.qp-desktop { display: flex; }
.qp-mobile-toggle { display: none; }
@media (max-width: 860px) {
  .qp-desktop { display: none !important; }
  .qp-mobile-toggle { display: block; }
}
@media (min-width: 861px) {
  .qp-mobile-menu { display: none !important; }
}

/* ---- Layout grids: responsive collapse ---- */
@media (max-width: 1023px) {
  .qp-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 820px) {
  #qp-build { grid-template-columns: 1fr !important; gap: 34px !important; }
  #qp-buildart {
    position: relative !important;
    top: 0 !important;
    height: min(46vh, 380px) !important;
  }
}
@media (max-width: 720px) {
  .qp-footgrid { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
}
@media (max-width: 640px) {
  .qp-grid3 { grid-template-columns: 1fr !important; }
}
@media (max-width: 460px) {
  .qp-footgrid { grid-template-columns: 1fr !important; }
}

/* Respect reduced-motion for the CSS-only decorative float (the GSAP scroll
   motion is an explicit owner decision and honours it separately — see
   quietpost.js). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
