/* ==========================================================================
   School Gradebook — marketing site shared styles
   Works alongside the Tailwind CDN (brand/accent config lives inline per page).
   ========================================================================== */

:root {
  --paper: #fbfaf7;
  --ink: #1b1d24;
  --brand: #2554d4;
  --brand-soft: #eef4ff;
  --accent: #f59e0b;
  --hair: #e9e6df;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  background-color: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Warm paper grain — a fixed, non-interactive overlay so flat sections have tooth. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

/* Focus ring — keyboard users only, brand-tinted. */
:focus-visible {
  outline: 3px solid rgba(37, 84, 212, .5);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 .75rem 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Display headline balance */
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* Tinted, layered card shadow (brand-hued, not flat black) */
.shadow-soft   { box-shadow: 0 1px 2px rgba(28,51,107,.06), 0 12px 28px -12px rgba(28,51,107,.18); }
.shadow-lift   { box-shadow: 0 2px 6px rgba(28,51,107,.08), 0 30px 60px -24px rgba(28,51,107,.28); }
.shadow-accent { box-shadow: 0 20px 44px -18px rgba(245,158,11,.45); }

/* Section entrance — staggered float-up, GPU friendly */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Browser chrome frame for product mockups */
.chrome {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--hair);
  overflow: hidden;
}
.chrome__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f4f2ec;
  border-bottom: 1px solid var(--hair);
}
.chrome__dot { width: 11px; height: 11px; border-radius: 50%; }

/* Hairline grid used behind hero */
.gridlines {
  background-image:
    linear-gradient(to right, rgba(28,51,107,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,51,107,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
}

/* Nav scrolled state */
.nav-scrolled { background: rgba(251,250,247,.82); backdrop-filter: blur(12px); border-bottom-color: var(--hair) !important; }

/* Long-form documentation prose */
.prose-doc { color: #33353d; line-height: 1.7; }
.prose-doc h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 2.2rem 0 .75rem; color: var(--ink); }
.prose-doc h3 { font-size: 1.15rem; font-weight: 700; margin: 1.6rem 0 .5rem; color: var(--ink); }
.prose-doc p { margin: .75rem 0; max-width: 68ch; }
.prose-doc ul, .prose-doc ol { margin: .75rem 0 .75rem 1.1rem; max-width: 68ch; }
.prose-doc li { margin: .35rem 0; padding-left: .25rem; }
.prose-doc ul > li { list-style: none; position: relative; }
.prose-doc ul > li::before { content: ""; position: absolute; left: -1rem; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.prose-doc ol { list-style: decimal; }
.prose-doc strong { color: var(--ink); font-weight: 700; }
.prose-doc code { background: var(--brand-soft); color: var(--brand); padding: .1em .4em; border-radius: 5px; font-size: .9em; font-weight: 600; }
.prose-doc a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Callout box inside docs */
.callout { border-left: 4px solid var(--accent); background: #fffaf0; padding: 1rem 1.1rem; border-radius: 0 12px 12px 0; margin: 1.25rem 0; font-size: .95rem; color: #6b5011; }
.callout strong { color: #6b5011; }

/* FAQ disclosure */
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-q { width: 100%; text-align: left; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.35rem 0; font-weight: 700; font-size: 1.075rem; color: var(--ink); cursor: pointer; }
.faq-q .chev { flex: none; transition: transform .3s ease; color: var(--brand); margin-top: 2px; }
.faq-item[open] .faq-q .chev { transform: rotate(45deg); }
.faq-a { padding: 0 0 1.4rem; color: #4a4c55; line-height: 1.7; max-width: 70ch; }
.faq-q::-webkit-details-marker { display: none; }

/* Search result highlight */
mark { background: #fde9b7; color: inherit; border-radius: 3px; padding: 0 2px; }

/* Utility: hide scrollbar on chip rows */
.no-bar::-webkit-scrollbar { display: none; }
.no-bar { -ms-overflow-style: none; scrollbar-width: none; }
