/* Offizin website. A light, airy pastel blue palette with deep navy text. */

@font-face {
  font-family: "Offizin Display";
  src: url("fonts/CormorantGaramond-500-italic.woff") format("woff");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #f4f8fc;
  --bg-deep: #e6f0fa;
  --paper: #ffffff;
  --ink: #1c2b3a;
  --ink-soft: #3e5164;
  --muted: #5e6e7e;
  --line: #d3e2f1;
  --accent: #a7c7e7;
  --accent-hover: #93b9df;
  --accent-strong: #6fa3d6;
  --accent-deep: #2e5f8f;
  --focus: #4a86c5;
  --display: "Offizin Display", "Cormorant Garamond", Garamond, Georgia, serif;
  --ui: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--ui); }
img, svg { max-width: 100%; }
a { color: var(--accent-deep); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); background: rgba(244, 248, 252, 0.92); position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.2) blur(6px); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand span { font: italic 500 28px/1 var(--display); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: 15px; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-strong); }
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Type */
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
.display { font: italic 500 clamp(40px, 7vw, 72px)/1.02 var(--display); letter-spacing: -0.01em; }
h1.page-title { font: italic 500 clamp(36px, 6vw, 56px)/1.05 var(--display); margin-top: 40px; }
h2 { font: italic 500 clamp(28px, 4vw, 38px)/1.1 var(--display); margin-top: 56px; }
h3 { font-size: 18px; font-weight: 650; margin-top: 28px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); max-width: 46em; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--bg-deep); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; background: var(--paper); padding: 0 5px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 15px var(--ui); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent-strong); color: var(--ink); }
.btn-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); border-color: var(--accent-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }

/* Hero */
.hero { padding: 56px 0 24px; display: grid; gap: 32px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.hero-art { position: relative; min-height: 320px; }
.hero-art .sheet-stack { position: relative; height: 360px; }
.hero-art .sheet-stack > div { position: absolute; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent-strong); border-radius: 8px; background: var(--paper); margin: 8px 0 0; max-width: 46em; }

/* Cards and grids */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0 0 8px; }
.feature-icon { width: 36px; height: 36px; margin-bottom: 10px; }
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.tile:hover { border-color: var(--accent-strong); color: var(--ink); box-shadow: 0 4px 14px rgba(28, 43, 58, 0.08); }
.tile-art { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--bg-deep); border-radius: 6px; overflow: hidden; }
.tile b { font-size: 15px; }
.tile span { font-size: 13px; color: var(--muted); }
.two-col { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Guides */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps > li { counter-increment: step; position: relative; padding: 2px 0 14px 46px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--ink); font: 600 14px/30px var(--ui); text-align: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; border-bottom: 1px solid var(--line); }
.tabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 10px 14px; font: 600 15px var(--ui); color: var(--ink-soft); cursor: pointer; border-radius: 8px 8px 0 0; }
.tabs button[aria-selected="true"] { background: var(--paper); border-color: var(--line); color: var(--ink); margin-bottom: -1px; }
.tab-panel { background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; padding: 20px 22px 8px; }
.tab-panel[hidden] { display: none; }
.callout { padding: 12px 14px; background: var(--bg-deep); border-radius: 8px; margin: 12px 0; font-size: 15px; }
.callout strong { display: block; margin-bottom: 2px; }
.table-wrap { overflow-x: auto; }
table.plain { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--paper); }
table.plain th, table.plain td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
table.plain th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.codebox { position: relative; margin: 10px 0 18px; }
.codebox pre { margin: 0; padding: 14px; background: #1c2b3a; color: #eaf2fa; border-radius: 8px; overflow-x: auto; max-height: 260px; font-size: 13px; line-height: 1.5; }
.codebox .btn { position: absolute; top: 8px; right: 8px; min-height: 34px; padding: 6px 12px; font-size: 13px; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.file-row code { background: none; padding: 0; font-weight: 600; }
.file-row .grow { flex: 1 1 200px; min-width: 0; }
details.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
details.faq p { margin: 8px 0 0; }

/* Ribbon illustration */
.ribbon { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; padding: 10px 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.ribbon .rtab { width: 100%; font-size: 13px; font-weight: 700; color: var(--accent-deep); border-bottom: 2px solid var(--accent-strong); padding-bottom: 4px; margin-bottom: 6px; width: max-content; }
.ribbon .rbtn { display: flex; flex-direction: column; align-items: center; width: 84px; font-size: 12px; text-align: center; color: var(--ink-soft); }
.ribbon .rbtn img { width: 32px; height: 32px; margin-bottom: 4px; }

/* Demo page */
.demo-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.demo-body .site-head { position: static; }
.demo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.demo-canvas { display: flex; flex-direction: column; min-height: 0; background: #dde8f3; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.demo-bar label { display: inline-flex; align-items: center; gap: 6px; }
.demo-bar select { font: 14px var(--ui); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); }
.demo-bar .btn { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.demo-bar .spacer { flex: 1; }
.demo-pages { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
.demo-panel { min-height: 0; border-left: 1px solid var(--line); }
.demo-empty { max-width: 420px; margin: 80px auto; text-align: center; color: var(--ink-soft); }
.demo-empty .display { font-size: 40px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-art { min-height: 0; }
  .hero-art .sheet-stack { height: 300px; }
  .demo-body { height: auto; overflow: visible; }
  .demo { grid-template-columns: 1fr; }
  .demo-pages { max-height: 70vh; padding: 16px; }
  .demo-panel { border-left: 0; border-top: 1px solid var(--line); height: 640px; }
}

@media print {
  .site-head, .site-foot, .demo-bar, .demo-panel { display: none; }
}
