/* DocuGuru — Journal Format Pages.
   Shares the @docuguru-ai/ui design system: self-hosted Roboto Variable (body)
   + Source Sans 3 Variable (headings), and the same oklch tokens as the app. */

/* Body font — Roboto Variable (matches --font-sans in @docuguru-ai/ui) */
@font-face {
  font-family: 'Roboto Variable'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/formats/assets/fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Roboto Variable'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/formats/assets/fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Heading font — Source Sans 3 Variable (matches --font-heading) */
@font-face {
  font-family: 'Source Sans 3 Variable'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url('/formats/assets/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3 Variable'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url('/formats/assets/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  /* Same tokens as @docuguru-ai/ui (oklch), plus hex fallbacks for gradients. */
  --primary: oklch(0.585 0.233 277.117);   /* indigo-600 */
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --purple: #9333ea;                        /* purple-600 (from-indigo-600 to-purple-600) */
  --ink: oklch(0.205 0 0);                  /* foreground */
  --muted: oklch(0.556 0 0);                /* muted-foreground */
  --line: oklch(0.922 0 0);                 /* border */
  --bg-soft: oklch(0.985 0 0);
  --chip-bg: #eef2ff;
  --chip-ink: #4338ca;
  --radius: 0.625rem;                       /* --radius from the ui tokens */
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --font: 'Roboto Variable',system-ui,-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;
  --font-heading: 'Source Sans 3 Variable','Roboto Variable',system-ui,-apple-system,'Segoe UI',sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: #fff; line-height: 1.65; font-size: 16px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1,h2,h3 { font-family: var(--font-heading); line-height: 1.15; color: var(--ink); letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 800; margin: 0 0 .6rem; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; height: 62px; }
.brand { display: flex; align-items: center; gap: .55rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; display: block; }
.brand-word { font-family: var(--font-heading); font-weight: 900; font-size: 1.35rem; letter-spacing: -.02em;
  background: linear-gradient(135deg,var(--indigo),var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-header nav { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.site-header nav a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) {
  .site-header nav { gap: .6rem; }
  .site-header nav a.nav-link { display: none; }        /* keep only the CTA */
  .site-header nav .btn { padding: .5rem .8rem; font-size: .9rem; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-word { font-size: 1.15rem; }
}
@media (max-width: 460px) {
  .brand-word { display: none; }   /* logo mark alone — leaves room for the CTA */
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700;
  border-radius: 10px; padding: .7rem 1.15rem; font-size: 1rem; cursor: pointer;
  white-space: nowrap; border: 1px solid transparent; transition: transform .08s ease, box-shadow .2s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg,var(--indigo),var(--purple)); color: #fff;
  box-shadow: 0 6px 18px rgba(79,70,229,.28); }
.btn-ghost { background: #fff; color: var(--indigo); border-color: var(--line); }

/* Breadcrumb */
.breadcrumb { font-size: .9rem; color: var(--muted); padding: 1.1rem 0 .25rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--indigo); }
.breadcrumb .sep { margin: 0 .45rem; opacity: .6; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700;
  background: var(--chip-bg); color: var(--chip-ink); border-radius: 999px; padding: .2rem .6rem; }
.chip.gray { background: #f3f4f6; color: #4b5563; }
.chip.outline { background: #fff; border: 1px solid var(--line); color: var(--muted); }

/* Hero */
.hero { padding: 1rem 0 1.5rem; }
.hero .kicker { color: var(--purple); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.hero .lead { font-size: 1.15rem; color: #374151; max-width: 46ch; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

/* Two-col layout: content + sticky preview */
.layout-2col { display: grid; grid-template-columns: 1fr 400px; gap: 3rem; align-items: start; }
.preview-rail { position: sticky; top: 82px; }
@media (max-width: 900px) { .layout-2col { grid-template-columns: 1fr; } .preview-rail { position: static; } }

/* Preview carousel */
.preview-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); }
.preview-page { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; box-shadow: 0 4px 14px rgba(16,24,40,.06); }
.preview-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.preview-thumb { flex: 1 1 0; min-width: 0; height: auto; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.preview-caption { font-size: .82rem; color: var(--muted); margin: .7rem 0 0; text-align: center; }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 200px; color: var(--muted); font-weight: 700; background: var(--bg-soft); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.cite-note { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.bib-example { font-size: .84rem; line-height: 1.5; background: var(--bg-soft); color: #334155;
  border: 1px solid var(--line); border-left: 3px solid var(--indigo); padding: .65rem .85rem;
  border-radius: 8px; margin-top: .5rem; }

/* Video facade */
.video-facade { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg,#1e1b4b,#4c1d95); aspect-ratio: 16/9; display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: var(--shadow); }
.video-facade .label { position: absolute; left: 18px; bottom: 16px; color: #fff; font-weight: 700; }
.play { width: 74px; height: 74px; border-radius: 999px; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.play::after { content: ''; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent var(--indigo); margin-left: 5px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
@media (max-width: 720px){ .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.step .n { width: 30px; height: 30px; border-radius: 8px; background: var(--chip-bg); color: var(--chip-ink);
  font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; }

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 1rem; }
.jcard { display: flex; flex-direction: column; gap: .5rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); transition: transform .1s ease, box-shadow .2s ease; }
.jcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16,24,40,.10); text-decoration: none; }
.jcard .jtitle { font-weight: 700; color: var(--ink); }
.jcard .jmeta { font-size: .82rem; color: var(--muted); margin-top: auto; display: flex; gap: .4rem; flex-wrap: wrap; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 1rem; margin-bottom: .6rem; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: .9rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .a { padding: .8rem 0 1rem; color: #374151; }
.mini-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .92rem; }
.mini-table th, .mini-table td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.mini-table th { background: var(--bg-soft); }

/* CTA band */
.cta-band { background: linear-gradient(135deg,var(--indigo),var(--purple)); color: #fff; border-radius: 18px;
  padding: 2rem; text-align: center; margin: 2.5rem 0; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band .btn-primary { background: #fff; color: var(--indigo); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* Index / search */
.searchbar { display: flex; gap: .6rem; margin: 1rem 0 1.5rem; }
.searchbar input { flex: 1; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; font-size: 1.05rem; font-family: inherit; }
.searchbar input:focus { outline: 2px solid var(--indigo); border-color: var(--indigo); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters a { font-size: .85rem; }
.count-note { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; justify-content: center; margin: 2rem 0; }
.pagination a, .pagination span { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.pagination .disabled { color: var(--muted); opacity: .5; }

/* Sticky mobile CTA */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.95);
    border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .mobile-cta .btn { width: 100%; justify-content: center; }
  body { padding-bottom: 76px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0; color: var(--muted); font-size: .92rem; }
.site-footer a { color: var(--muted); }
.site-footer .cols { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; }

section { scroll-margin-top: 80px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
