/* ============================================================
   Parentagram — Compiled Production Stylesheet
   Replaces Tailwind CDN runtime. All utility classes used in
   index.html, about/index.html, and privacy/index.html are
   defined here as static rules.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --cream-50:  #fdfaf5;
  --cream-100: #f9f3e8;
  --cream-200: #f2e6cc;
  --ink-900:   #1a1208;
  --ink-800:   #2c1f0e;
  --ink-700:   #3d2e18;
  --ink-500:   #6b5340;
  --ink-400:   #8c7260;
  --ink-300:   #b09a88;
  --amber-accent: #c8873a;
  --amber-light:  #e8a85c;
  --amber-muted:  #f0c990;
}

/* ── Base reset & typography ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { line-height: 1.5; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--cream-50);
  color: var(--ink-900);
  font-family: "Calibre", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseSoft {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
@keyframes spinArc {
  to { transform: rotate(360deg); }
}

/* ── Component: grain overlay ───────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── Component: spinner ─────────────────────────────────────── */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--cream-200);
  border-top-color: var(--amber-accent);
  border-radius: 50%;
  animation: spinArc 0.9s linear infinite;
}

/* ── Component: progress bar ────────────────────────────────── */
.progress-fill {
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Component: serif (logo + headings) ─────────────────────── */
.serif {
  font-family: "Playfair Display", Georgia, serif;
}

/* ── Component: question enter animation ───────────────────── */
.q-enter {
  animation: slideUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Component: preview prose ───────────────────────────────── */
.preview-prose h3 {
  font-family: "Calibre", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-800);
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.preview-prose p {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--ink-700);
  margin-bottom: 0.9rem;
}
.preview-prose .label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-accent);
  margin-bottom: 0.2rem;
}

/* ── Component: divider ornament ────────────────────────────── */
.divider-ornament {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--ink-300);
}
.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8ddd0;
}

/* ── Component: teaser blur ─────────────────────────────────── */
.teaser-blur {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Component: buttons ─────────────────────────────────────── */
.btn-primary {
  background: var(--amber-accent);
  color: var(--cream-50);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary:hover {
  background: #b37530;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 135, 58, 0.28);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid var(--amber-accent);
  color: var(--amber-accent);
  background: transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-outline:hover {
  background: var(--amber-accent);
  color: var(--cream-50);
  transform: translateY(-2px);
}

/* ── Component: answer buttons ──────────────────────────────── */
.ans-btn {
  border: 1.5px solid #e8ddd0;
  background: #fff;
  color: var(--ink-800);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ans-btn:hover {
  border-color: var(--amber-accent);
  background: #fdf7ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 135, 58, 0.14);
}
.ans-btn:active { transform: scale(0.97); }

/* ── App root fade ───────────────────────────────────────────── */
#app-root > * {
  animation: fadeIn 0.5s ease forwards;
}

/* ── Static-page prose (about / privacy) ───────────────────── */
.page-prose h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.page-prose h3 {
  font-family: "Calibre", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-800);
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}
.page-prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-700);
  margin-bottom: 1rem;
}
.page-prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.page-prose ul li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-700);
  margin-bottom: 0.35rem;
}
.page-prose a {
  color: var(--amber-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-prose a:hover { color: #b37530; }
.page-prose .last-updated {
  font-size: 0.8rem;
  color: var(--ink-300);
  margin-bottom: 2rem;
}

/* ============================================================
   UTILITY CLASSES
   Every Tailwind class used across all pages is defined here.
   ============================================================ */

/* Layout */
.relative  { position: relative; }
.fixed     { position: fixed; }
.inset-0   { inset: 0; }
.z-10      { z-index: 10; }

.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.inline-block  { display: inline-block; }
.block         { display: block; }
.hidden        { display: none; }
.grid          { display: grid; }

.flex-1        { flex: 1 1 0%; }
.flex-col      { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Spacing — gap */
.gap-2   { gap: 0.5rem; }
.gap-2\.5{ gap: 0.625rem; }
.gap-4   { gap: 1rem; }
.gap-5   { gap: 1.25rem; }
.gap-8   { gap: 2rem; }

/* Spacing — margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-3    { margin-top: 0.75rem; }
.mt-6    { margin-top: 1.5rem; }
.mt-16   { margin-top: 4rem; }
.mb-1    { margin-bottom: 0.25rem; }
.mb-3    { margin-bottom: 0.75rem; }
.mb-4    { margin-bottom: 1rem; }
.mb-6    { margin-bottom: 1.5rem; }
.mb-8    { margin-bottom: 2rem; }
.mb-10   { margin-bottom: 2.5rem; }
.mb-12   { margin-bottom: 3rem; }
.mb-16   { margin-bottom: 4rem; }

/* Spacing — padding */
.p-4    { padding: 1rem; }
.p-6    { padding: 1.5rem; }
.pb-8   { padding-bottom: 2rem; }
.px-6   { padding-left: 1.5rem;  padding-right: 1.5rem; }
.px-8   { padding-left: 2rem;    padding-right: 2rem; }
.px-10  { padding-left: 2.5rem;  padding-right: 2.5rem; }
.py-3   { padding-top: 0.75rem;  padding-bottom: 0.75rem; }
.py-4   { padding-top: 1rem;     padding-bottom: 1rem; }
.py-5   { padding-top: 1.25rem;  padding-bottom: 1.25rem; }
.py-10  { padding-top: 2.5rem;   padding-bottom: 2.5rem; }
.py-12  { padding-top: 3rem;     padding-bottom: 3rem; }

/* Sizing */
.w-full { width: 100%; }
.w-3    { width: 0.75rem; }
.w-8    { width: 2rem; }
.w-16   { width: 4rem; }
.h-1    { height: 0.25rem; }
.h-3    { height: 0.75rem; }
.h-8    { height: 2rem; }
.h-16   { height: 4rem; }
.min-h-screen { min-height: 100vh; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-md  { max-width: 28rem; }

/* Typography */
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }

.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

.italic { font-style: italic; }

.leading-\[1\.15\] { line-height: 1.15; }
.leading-snug      { line-height: 1.375; }
.leading-tight     { line-height: 1.25; }
.leading-relaxed   { line-height: 1.625; }

.tracking-tight    { letter-spacing: -0.025em; }
.tracking-wide     { letter-spacing: 0.025em; }
.tracking-\[0\.2em\]  { letter-spacing: 0.2em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }

.uppercase { text-transform: uppercase; }

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

/* Colors — text */
.text-ink-300     { color: var(--ink-300); }
.text-ink-400     { color: var(--ink-400); }
.text-ink-500     { color: var(--ink-500); }
.text-ink-700     { color: var(--ink-700); }
.text-ink-900     { color: var(--ink-900); }
.text-amber-accent{ color: var(--amber-accent); }
.text-red-400     { color: #f87171; }

/* Colors — background */
.bg-amber-accent       { background-color: var(--amber-accent); }
.bg-cream-200          { background-color: var(--cream-200); }
.bg-white\/60          { background-color: rgba(255,255,255,0.6); }
.bg-white\/70          { background-color: rgba(255,255,255,0.7); }
.bg-amber-muted\/10    { background-color: rgba(240,201,144,0.1); }
.bg-amber-muted\/30    { background-color: rgba(240,201,144,0.3); }

/* Colors — border */
.border               { border-width: 1px; border-style: solid; }
.border-cream-200     { border-color: var(--cream-200); }
.border-amber-muted\/60 { border-color: rgba(240,201,144,0.6); }

/* Borders — radius */
.rounded-xl   { border-radius: 0.75rem; }
.rounded-2xl  { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Effects */
.shadow-sm       { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.backdrop-blur-sm{ backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.opacity-70      { opacity: 0.7; }

/* Space-y utility */
.space-y-2 > * + * { margin-top: 0.5rem; }

/* Transitions */
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* Animations */
.animate-fade-in    { animation: fadeIn 0.5s ease forwards; }
.animate-slide-up   { animation: slideUp 0.45s cubic-bezier(0.22,1,0.36,1) forwards; }
.animate-pulse-soft { animation: pulseSoft 2.5s ease-in-out infinite; }

/* Hover states (must come after base) */
.hover\:text-ink-700:hover { color: var(--ink-700); }

/* ── Responsive breakpoints ─────────────────────────────────── */
@media (min-width: 640px) {   /* sm */
  .sm\:flex-row  { flex-direction: row; }
  .sm\:w-44      { width: 11rem; }
  .sm\:w-auto    { width: auto; }
}

@media (min-width: 768px) {   /* md */
  .md\:flex      { display: flex; }
  .md\:hidden    { display: none; }
  .md\:p-8       { padding: 2rem; }
  .md\:px-12     { padding-left: 3rem;  padding-right: 3rem; }
  .md\:py-16     { padding-top: 4rem;   padding-bottom: 4rem; }
  .md\:py-20     { padding-top: 5rem;   padding-bottom: 5rem; }
  .md\:text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }
  .md\:text-5xl  { font-size: 3rem;     line-height: 1; }
  .md\:text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
}

@media (min-width: 1024px) {  /* lg */
  .lg\:text-6xl  { font-size: 3.75rem; line-height: 1; }
}

/* Initially hide md:flex elements on small screens */
@media (max-width: 767px) {
  .md\:flex  { display: none; }
  .md\:hidden{ display: flex; }
  .md\:p-8   { padding: 1.5rem; }  /* fallback — overridden above 768px */
}
