/* ==========================================================================
   PromptMySite — shared design system
   Warm-paper editorial canvas, single electric-blue accent, monospace
   micro-labels, hairline structure, sharp corners, print-grain texture.
   Replaces the per-page inline styles (2026-07 redesign).
   ========================================================================== */

:root {
  /* Canvas — cool drafting-film / blueprint porcelain */
  --paper: #eef0f3;
  --paper-2: #e4e7ec;
  --paper-raise: #f7f8fa;
  --ink: #14161c;
  --ink-soft: #4c5361;
  --ink-mute: #7e8595;
  --hair: #ccd2dc;
  --hair-strong: #adb5c3;

  /* Accent — one blue, no gradients */
  --blue: #1f3aff;
  --blue-deep: #1226c4;
  --blue-ghost: rgba(31, 58, 255, 0.07);
  --ok: #1d9e4f;

  /* Structure — blue offset print, blueprint grid */
  --edge: 1px solid var(--hair);
  --edge-strong: 1px solid var(--hair-strong);
  --shadow-riso: 6px 6px 0 rgba(31, 58, 255, 0.2);
  --shadow-riso-sm: 4px 4px 0 rgba(31, 58, 255, 0.2);
  --grid-line: rgba(31, 58, 255, 0.06);

  /* Type */
  --font-display: "Bricolage Grotesque", "Archivo", Georgia, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", Consolas, monospace;

  /* Rhythm */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-pad: clamp(64px, 9vw, 120px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Fixed graph-paper grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
}

/* Print-grain overlay above everything (very faint) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

::selection { background: var(--blue); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}

a { color: var(--blue-deep); }

/* Old gradient-text spans → flat accent (keeps legacy markup working) */
.gradient {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: initial !important;
  color: var(--blue);
}

/* ── Mono micro-label system ── */
.mono-label,
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}
.mono-label::before,
.section-label::before {
  content: ">\00a0";
  color: var(--blue);
}
.caret {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: var(--blue);
  margin-left: 8px;
  vertical-align: -1px;
  animation: caret-blink 1.1s steps(2, start) infinite;
}
@keyframes caret-blink {
  to { visibility: hidden; }
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  border-bottom: var(--edge);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; color: #fff; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.nav a:hover { color: var(--blue-deep); }
.nav-cta {
  padding: 9px 18px;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  transition: background 0.15s, color 0.15s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: var(--edge-strong);
  color: var(--ink);
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-bottom: var(--edge);
  padding: 8px 0;
  position: sticky;
  top: 63px;
  z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 12px var(--gutter);
}
.mobile-nav a:hover { color: var(--blue-deep); background: var(--paper-2); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--blue);
  border-color: var(--blue-deep);
  color: #fff;
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-riso-sm);
  background: var(--blue-deep);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ── Sections ── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
  border-top: var(--edge);
  position: relative;
}
.section-label { margin-bottom: 14px; text-align: center; }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
}
.section-subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 auto 52px;
  max-width: 620px;
}

/* ── Cards / grids (shared vocabulary) ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border: var(--edge);
}
.feature-card {
  background: var(--paper-raise);
  padding: 30px 26px;
  transition: background 0.2s;
}
.feature-card:hover { background: #fff; }
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-ghost);
  border: 1px solid rgba(31, 58, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--blue-deep); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.65; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.video-card {
  background: var(--paper-raise);
  border: var(--edge-strong);
  transition: transform 0.2s, box-shadow 0.2s;
}
.video-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-riso); }
.video-card video { width: 100%; display: block; background: #000; }
.video-card-info { padding: 20px 24px; border-top: var(--edge); }
.video-card-platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue-deep);
  margin-bottom: 8px;
}
.video-card-platform svg { width: 16px; height: 16px; }
.video-card h3 { font-size: 16px; margin-bottom: 6px; }
.video-card p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }

.platform-grid {
  display: flex;
  justify-content: center;
  gap: 1px;
  flex-wrap: wrap;
  background: var(--hair);
  border: var(--edge);
  max-width: 760px;
  margin: 0 auto;
}
.platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 28px;
  background: var(--paper-raise);
  min-width: 148px;
  flex: 1;
  transition: background 0.2s;
}
.platform-item:hover { background: #fff; }
.platform-item:hover svg { color: var(--blue-deep); }
.platform-item svg { width: 32px; height: 32px; color: var(--ink-soft); transition: color 0.2s; }
.platform-item span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ── CTA ── */
.cta-section { text-align: center; max-width: 620px; margin: 0 auto; }
.cta-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.cta-section p { color: var(--ink-soft); margin-bottom: 28px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 56px var(--gutter) 48px;
  border-top: var(--edge);
  margin-top: var(--section-pad);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-decoration: none;
}
.footer-links a:hover { color: var(--blue-deep); }
.footer p { color: var(--ink-mute); font-size: 13px; }
.footer a { color: var(--blue-deep); text-decoration: none; }

/* ── Ticker strip ── */
.ticker {
  overflow: hidden;
  border-top: var(--edge);
  border-bottom: var(--edge);
  background: var(--paper-2);
  padding: 10px 0;
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  animation: ticker-scroll 46s linear infinite;
}
.ticker span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  padding: 0 18px;
}
.ticker b {
  color: var(--blue-deep);
  font-weight: 600;
  padding: 0 4px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Forms (shared) ── */
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--paper-raise);
  border: var(--edge-strong);
  border-radius: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355503f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.form-select:focus { outline: none; border-color: var(--blue); }
.form-select option { background: var(--paper-raise); color: var(--ink); }

/* ── Utilities ── */
.hl { color: var(--blue); }
.rule { border: none; border-top: var(--edge); }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}
.live-dot.pulsing { animation: pms-pulse 2s ease-in-out infinite; }
@keyframes pms-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .platform-item { min-width: 110px; padding: 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .live-dot.pulsing { animation: none; }
  .caret { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
