/* /handwriting-styles page styles. Chrome aligned with live Niblume.
   This is a support-page gallery, not a second homepage (no editor workbench). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----- chrome ----- */
.skip-link {
  position: absolute; left: .75rem; top: -100px; z-index: 80;
  background: var(--color-primary-container); color: var(--color-paper-bright);
  padding: .5rem .75rem; border-radius: var(--radius-default);
}
.skip-link:focus { top: .5rem; }

.site-header {
  width: 100%;
  background: var(--sheet);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 40;
}
.site-header__inner,
.site-footer__inner,
.page-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter-mobile);
  padding-right: var(--gutter-mobile);
}
@media (min-width: 768px) {
  .site-header__inner, .site-footer__inner, .page-wrap {
    padding-left: var(--page-margin);
    padding-right: var(--page-margin);
  }
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: var(--header-h);
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.brand svg { color: var(--color-secondary); width: 20px; height: 20px; flex-shrink: 0; }
/* 16px lockup test — used on the logo specimen page; wordmark stays Newsreader */
.brand--16 { font-size: 16px; line-height: 20px; gap: .25rem; }
.brand--16 svg { width: 16px; height: 16px; }

.primary-nav { display: none; align-items: center; gap: 1.5rem; }
.primary-nav a {
  text-decoration: none;
  color: var(--color-on-variant);
  font-size: var(--fs-label);
  letter-spacing: .02em;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--color-on-surface); }
.primary-nav a[aria-current="page"],
.primary-nav a.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
  font-weight: 600;
}
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-quiet-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-caption);
  cursor: pointer;
  padding: .25rem .15rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--color-outline-variant);
  background: var(--color-surface);
  border-radius: var(--radius-default);
  color: var(--color-primary);
  cursor: pointer;
}
@media (min-width: 900px) {
  .primary-nav { display: flex; }
  .menu-toggle { display: none; }
}
.mobile-nav[hidden] { display: none; }
.mobile-nav {
  border-top: 1px solid var(--color-surface-highest);
  background: var(--color-surface);
  padding: .5rem var(--gutter-mobile) 1rem;
}
.mobile-nav a {
  display: block;
  padding: .75rem .25rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-desk-border);
}

.site-footer {
  margin-top: auto;
  background: var(--color-surface-container);
  border-top: 1px solid var(--color-surface-highest);
  padding: 2rem 0 1.5rem;
}
.site-footer__grid { display: grid; gap: 1.5rem; }
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.2fr 2fr; align-items: start; }
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
  color: var(--color-primary);
}
.footer-tagline { margin: .25rem 0 0; color: var(--ink-soft); }
.footer-meta, .footer-meta a { color: var(--ink-soft); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--color-on-variant);
  text-decoration: none;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--color-on-surface); }
.footer-links a[aria-current="page"] { color: var(--color-primary); font-weight: 600; }
.footer-meta {
  margin-top: 1.25rem;
  color: var(--color-on-variant);
  font-size: 15px;
  line-height: 22px;
}

/* ----- typography ----- */
h1, .display-md {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -.02em;
  color: var(--color-primary);
}
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  letter-spacing: -.01em;
  color: var(--color-primary);
  margin: 0 0 1rem;
}
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.3;
  color: var(--color-primary);
  margin: 0 0 .5rem;
}
.lede {
  color: var(--ink-soft);
  margin: 0;
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  max-width: 46rem;
}
.muted, .prose-muted { color: var(--color-on-variant); }
.body-sm { font-size: var(--fs-caption); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  padding: .45rem 1rem;
  border-radius: var(--radius-default);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: var(--color-primary);
}
.btn-primary {
  background: var(--color-primary-container);
  color: var(--color-paper-bright);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); color: var(--color-paper-bright); }
.btn-secondary {
  border-color: var(--color-outline-variant);
  background: var(--color-surface);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--color-secondary); }
.btn-ghost { color: var(--color-on-variant); min-height: 36px; }
.btn-ghost:hover { color: var(--color-primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn--block { width: 100%; }

.section { margin: 0; padding: var(--section-y-mobile) 0; }
@media (min-width: 768px) {
  .section { padding: var(--section-y-desktop) 0; }
}
.section + .section { border-top: 1px solid color-mix(in srgb, var(--navy) 10%, transparent); }

/* ----- breadcrumbs ----- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.crumbs li + li::before { content: "/"; color: var(--muted-2); }

/* ----- hero: support page, not a second homepage ----- */
.hero-support {
  display: block;
  margin: 1.75rem 0 2.25rem;
}
.hero-support h1 { margin: 0 0 .85rem; }
.hero-support .lede { margin: 0 0 1.15rem; }
.hero-copy { max-width: 46rem; }
.hero-aside-line {
  margin: 1rem 0 0;
  font-size: var(--fs-note);
  color: var(--muted);
  max-width: 40rem;
}

/* Freeze: 2–3 typographic previews may sit beside or below the hero copy.
   Full-width row below keeps each sheet readable (not a second homepage editor). */
.hero-desk {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  min-height: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .hero-desk {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.15rem;
  }
  .hero-desk .mini-sheet:nth-child(1) { transform: rotate(-0.7deg); }
  .hero-desk .mini-sheet:nth-child(2) { transform: rotate(0.8deg); margin-top: .4rem; }
  .hero-desk .mini-sheet:nth-child(3) { transform: rotate(-0.4deg); }
}

/* ----- typographic paper sheets ----- */
.sheet {
  position: relative;
  background-color: var(--sheet);
  box-shadow: var(--sh-sheet);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  overflow: hidden;
}
.sheet.is-lined {
  background-image:
    linear-gradient(to right, transparent calc(var(--pad-left) - 1px), var(--rule-red) 1px, transparent calc(var(--pad-left) + 1px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule-blue) var(--line));
}
.sheet.is-grid {
  background-image:
    linear-gradient(to right, rgba(73, 97, 119, .12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(73, 97, 119, .12) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: var(--sheet);
}
.sheet.is-blank {
  background-image: none;
  background-color: var(--sheet);
}

.mini-sheet {
  padding: 1rem 1.1rem 1.15rem 1.25rem;
  min-height: 200px;
}
.mini-sheet .sheet-label {
  font-family: var(--font-ui);
  font-size: .6875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .55rem;
  font-weight: 600;
}
.sheet-hand {
  color: var(--hand-ink);
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}
.sheet-caption {
  font-family: var(--font-ui);
  font-size: .6875rem;
  letter-spacing: .02em;
  color: var(--muted);
  margin: .65rem 0 0;
}

/* Internal font-family mapping. Do not print these names in the UI. */
.hand-oxford-cursive { font-family: "Caveat", cursive; font-size: 1.7rem; }
.hand-drafting-script { font-family: "Patrick Hand", cursive; font-size: 1.5rem; }
.hand-margin-flower { font-family: "Indie Flower", cursive; font-size: 1.45rem; }
.hand-window-light { font-family: "Shadows Into Light", cursive; font-size: 1.55rem; }
.hand-sketch-notes { font-family: "Architects Daughter", cursive; font-size: 1.35rem; }
.hand-grace-ink { font-family: "Covered By Your Grace", cursive; font-size: 1.6rem; }
.hand-kavya-devanagari { font-family: "Kalam", cursive; font-size: 1.45rem; }
.hand-patra-devanagari { font-family: "Dekko", cursive; font-size: 1.5rem; }
.hand-baithak-cursive { font-family: "Tillana", cursive; font-size: 1.3rem; }
.hand-sunday-notes { font-family: "Gloria Hallelujah", cursive; font-size: 1.22rem; }
.hand-studio-print { font-family: "Shantell Sans", cursive; font-size: 1.28rem; }
.hand-journal-scrawl { font-family: "Reenie Beanie", cursive; font-size: 1.85rem; }
.hand-blue-letter { font-family: "Nothing You Could Do", cursive; font-size: 1.42rem; }
.hand-campus-cursive { font-family: "Cedarville Cursive", cursive; font-size: 1.48rem; }
.hand-looseleaf-ink { font-family: "Zeyada", cursive; font-size: 1.7rem; }
.hand-morning-script { font-family: "La Belle Aurore", cursive; font-size: 1.52rem; }
.hand-copper-flourish { font-family: "Sacramento", cursive; font-size: 1.7rem; }
.hand-velvet-signature { font-family: "Allura", cursive; font-size: 1.85rem; }
.hand-marker-notes { font-family: "Rock Salt", cursive; font-size: .95rem; line-height: 1.55; letter-spacing: 0; }
.hand-studio-loop { font-family: "Dancing Script", cursive; font-size: 1.65rem; }
.hand-orchard-script { font-family: "Homemade Apple", cursive; font-size: 1.12rem; }
.hand-mela-script { font-family: "Amita", cursive; font-size: 1.38rem; }
.hand-oxford-brush { font-family: "Caveat Brush", cursive; font-size: 1.55rem; }

/* ----- gallery ----- */
.gallery-intro { margin: 0 0 1.25rem; max-width: 46rem; color: var(--ink-soft); }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2rem;
}
.filter-bar button {
  min-height: 44px;
  padding: .35rem .85rem;
  border: 1px solid var(--hairline);
  background: var(--sheet);
  color: var(--ink-soft);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  font-weight: 500;
  cursor: pointer;
}
.filter-bar button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--sheet);
}
.group-head { margin: 0 0 .6rem; }
.group-lede { margin: 0 0 1.35rem; max-width: 46rem; color: var(--ink-soft); }
.gallery-group + .gallery-group { margin-top: 3rem; }

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.style-card {
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-width: 0;
}
.style-card.is-pro {
  border-color: color-mix(in srgb, var(--copper) 45%, var(--hairline));
}
.style-card.is-highlight {
  box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--copper);
}
.style-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .6rem;
  margin: 0 0 .7rem;
}
.style-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary);
  margin: 0;
  flex: 1 1 auto;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 .45rem;
  border-radius: 2px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--chrome);
  color: var(--ink-soft);
}
.pill-pro { background: color-mix(in srgb, var(--copper) 18%, var(--sheet)); color: var(--copper); }
.pill-script { background: color-mix(in srgb, var(--navy) 8%, var(--sheet)); color: var(--navy); }

.style-card .sheet {
  min-height: 168px;
  padding: .9rem .85rem 1rem 1rem;
  flex: 1 1 auto;
}
.style-card .sheet-hand { min-height: 4.2rem; }
.style-card .sheet-hand + .sheet-hand { margin-top: .35rem; }
.style-card__note {
  margin: .65rem 0 0;
  font-size: var(--fs-note);
  color: var(--muted);
}
.style-card__licence {
  margin: .55rem 0 0;
  font-size: .75rem;
  color: var(--muted-2);
}
.style-card__actions { margin-top: .85rem; }
.style-card__hint {
  margin: .4rem 0 0;
  font-size: var(--fs-note);
  color: var(--muted);
}

/* ----- paper / ink compare ----- */
.compare-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .compare-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.compare-card { margin: 0; }
.compare-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 .55rem;
}
.compare-card .sheet {
  min-height: 200px;
  padding: 1.1rem 1rem 1.25rem 1.25rem;
}
.ink-row { margin-top: 2.25rem; }
.ink-swatches {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .ink-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ink-blue { color: var(--hand-ink-blue); }
.ink-black { color: var(--hand-ink-black); }
.ink-navy { color: var(--hand-ink-navy); }

/* ----- licensed / plans / faq ----- */
.prose-block { max-width: 46rem; }
.prose-block p { margin: 0 0 1rem; color: var(--ink-soft); }
.plan-box {
  background: var(--sheet);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.6rem;
  max-width: 46rem;
}
.plan-box p { margin: 0 0 1rem; color: var(--ink-soft); }
.plan-box .btn-row { margin-top: 1.1rem; }

.faq-list { display: grid; gap: 1rem; }
.faq-item {
  background: var(--sheet);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
}
.faq-item h3 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 600; margin: 0 0 .45rem; }
.faq-item p { margin: 0; color: var(--ink-soft); }
.faq-more { margin: 1.25rem 0 0; }

.cta-close {
  background: var(--sheet);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}
.cta-close h2 { margin: 0 0 .75rem; }
.cta-close p { margin: 0 0 1.1rem; color: var(--ink-soft); max-width: 40rem; }

/* ----- states ----- */
.banner {
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
}
.banner-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.banner-error p { margin: 0 0 .75rem; }
.empty-state, .loading-grid { display: none; }

.skeleton-card {
  min-height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, var(--chrome) 0%, var(--sheet) 50%, var(--chrome) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.loading-caption {
  margin: 0 0 1rem;
  color: var(--muted);
}

html[data-state="loading"] .card-grid,
html[data-state="loading"] .filter-bar,
html[data-state="loading"] .gallery-group,
html[data-state="empty"] .card-grid,
html[data-state="empty"] .gallery-group,
html[data-state="empty"] .filter-bar { display: none; }
html[data-state="error"] .sheet-hand { display: none; }
html[data-state="error"] .sheet-caption { display: none; }
html[data-state="error"] .sheet::before {
  content: "Typographic preview unavailable.";
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  color: var(--muted);
  padding: .25rem 0 1rem;
}
html[data-state="loading"] .loading-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  html[data-state="loading"] .loading-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  html[data-state="loading"] .loading-grid { grid-template-columns: repeat(3, 1fr); }
}
html[data-state="error"] .error-banner { display: block; }
html[data-state="empty"] .empty-state { display: block; }
.error-banner { display: none; }

/* Optional filter: hide non-matching cards */
html[data-filter="free"] .style-card[data-tier="Pro"] { display: none; }
html[data-filter="pro"] .style-card[data-tier="Free"] { display: none; }
html[data-filter="hindi"] .style-card[data-script="Latin"] { display: none; }
html[data-filter="hindi"] .gallery-group:not(#hindi-looks) { display: none; }
html[data-filter="free"] .gallery-group,
html[data-filter="pro"] .gallery-group { /* keep section headings; empty groups hidden via JS if needed */ }

/* Design-only review bar. Hidden in screenshots (?shot=1). Not production UI. */
.design-review {
  position: sticky;
  bottom: 0;
  z-index: 50;
  background: var(--navy-deep);
  color: var(--sheet);
  padding: .55rem .85rem;
  font-size: .8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  align-items: center;
}
.design-review a, .design-review button {
  color: var(--sheet);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--sheet) 35%, transparent);
  border-radius: 4px;
  padding: .25rem .5rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  min-height: 32px;
}
html[data-shot="1"] .design-review { display: none; }

@media (max-width: 719px) {
  .btn { min-height: 44px; }
  .style-card .sheet { min-height: 152px; }
  .hero-desk { min-height: 0; }
}



/* P2 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton-card { animation: none; }
}


