/* ==========================================================================
   GYRAQ — shared design system (every page loads this first)
   Light editorial: paper white, near-black ink, one vermilion accent.
   Fraunces for headings, Manrope for everything else.
   Change a colour here and it changes on the home page, the generated
   service/product pages, the nav, the chat and the voice card.
   ========================================================================== */
:root {
  --paper: #f6f3ee;
  --surface: #fffdf9;
  --ink: #14130f;
  --dim: #5f5b52;
  --line: rgba(20, 19, 15, .14);
  --accent: #d63a16;             /* fills: buttons, the hero ring, large display type */
  --accent-text: #ba3213;        /* the accent as small text on paper: #d63a16 is 4.2:1 there, under the 4.5:1 minimum; this is 5.3:1 */
  --accent-soft: #f9ddd3;
  --accent-bright: #ff6e48;      /* the accent when it sits on ink */
  --on-ink: #f6f3ee;
  --on-ink-dim: #b9b4a9;
  --on-ink-line: rgba(246, 243, 238, .16);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.65;
  -webkit-font-smoothing: antialiased; padding-inline: 20px; overflow-x: clip; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; text-wrap: balance; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* soft crossfade between pages where the browser supports it */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }

/* ---- header (same markup on every page, see scripts/sitelib.py) ---- */
.sp-head { position: sticky; top: 0; z-index: 50; max-width: var(--wrap); margin: 0 auto; padding-block: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* full-width paper strip behind the centred header row */
/* exactly one screen wide (the header is centred, so 50% - 50vw is the screen edge). It used to extend a full viewport past each edge,
   which made every page hundreds of pixels wider than a phone screen. */
.sp-head::before { content: ''; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--paper); border-bottom: 1px solid var(--line); }
.sp-head .nv { display: flex; align-items: center; gap: 1.5rem; }
/* the logo is the wordmark "/gyraq": lowercase, heavy sans, one colour */
.sp-logo { display: inline-flex; align-items: baseline; font: 800 1.45rem/1 var(--font-body); letter-spacing: -.045em; color: var(--ink); }
.sp-logo i { font-style: normal; }

/* ---- buttons ---- */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; background: var(--accent); color: #fff; padding: 13px 24px;
  border: 1px solid var(--accent); border-radius: 999px; font-weight: 700; font-size: .875rem; letter-spacing: .01em; line-height: 1.2; cursor: pointer; transition: filter .15s, border-color .15s; }
.sp-btn:hover { filter: brightness(1.08); }
.sp-btn-sm { padding: 9px 16px; font-size: .8rem; }
.sp-btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.sp-btn-ghost:hover { border-color: var(--ink); filter: none; }
.sp-link { color: var(--accent-text); font-weight: 700; }
.sp-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- questions (home FAQ and service pages) ---- */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-weight: 400; }
details[open] summary::after { content: '\2013'; }
details p { padding: 0 0 20px; color: var(--dim); max-width: 64ch; }

/* ---- generated pages: services and products ---- */
.sp-main { max-width: 760px; margin: 0 auto; padding-block: 56px 96px; display: flex; flex-direction: column; gap: 28px; }
.sp-crumb { font-size: 13px; color: var(--dim); }
.sp-crumb a:hover { color: var(--ink); }
.sp-main h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.06; }
.sp-main h2 { font-size: 1.5rem; margin-bottom: 10px; letter-spacing: -.01em; }
.sp-lead { font-size: 1.15rem; color: var(--dim); max-width: 60ch; }
.sp-main section { padding-top: 32px; border-top: 1px solid var(--line); }
.sp-main section p, .sp-main section li { max-width: 64ch; }
.sp-main section p + p, .sp-main section p + ul { margin-top: 12px; }
.sp-main section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 1.2em; list-style: disc; }
.sp-main section li::marker { color: var(--accent); }
.sp-main p > .sp-btn-ghost { margin-left: 8px; }
/* two buttons side by side: an even gap whether or not they wrap */
.sp-main p:has(> .sp-btn) { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-main p:has(> .sp-btn) > .sp-btn-ghost { margin: 0; }

.sp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.sp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.sp-card:hover { border-color: var(--ink); }
.sp-card span { font-weight: 600; }
.sp-card-main { display: flex; flex-direction: column; gap: 6px; }
.sp-card-more { margin-top: auto; padding-top: 6px; font-size: .88rem; }
.sp-card small { color: var(--dim); font-size: 13px; line-height: 1.5; }
.sp-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.sp-notice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; max-width: 64ch; }
.sp-grouphead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sp-grouphead h2 { margin: 0; }
.sp-pcards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sp-pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sp-pcard h3 { font-size: 1.25rem; font-weight: 500; }
.sp-pcard h3 a:hover { color: var(--accent); }
.sp-pcard p { color: var(--dim); font-size: 14px; }
.sp-pcard-actions { margin-top: auto; padding-top: 6px; }
.sp-pcard-soon { background: transparent; border-style: dashed; }
.sp-badge { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--dim); }
.sp-badge-on { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }

/* ---- footer (same markup on every page) ---- */
.sp-foot { max-width: var(--wrap); margin: 0 auto; padding-block: 40px 96px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; font-size: 14px; color: var(--dim); }
.sp-foot p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sp-foot ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 20px; }
.sp-foot a:hover { color: var(--ink); }
.sp-foot-h { font: 700 .72rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-top: 10px; }

@media (max-width: 767px) {
  .sp-main p > .sp-btn-ghost { margin-left: 0; margin-top: 8px; }
}
