/* Chisel Industries — Portfolio Onboarding Site
 * Brand palette: Ink #171717, Orange #FF5C00, Cream #EFE6D4, Beige #FAF6EF, Sky #BADDF0
 * Typography: DM Sans (body) + DM Serif Display (headings)
 */

:root {
  --ink: #171717;
  --orange: #FF5C00;
  --cream: #EFE6D4;
  --beige: #FAF6EF;
  --sky: #BADDF0;
  --muted: #6B6B6B;
  --border: #E5DDD0;
  --card: #FFFFFF;
  --req: #C0392B;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--beige); color: var(--ink); }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Site header / nav */
.site-header {
  background: var(--ink);
  color: #fff;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 3px solid var(--orange);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'DM Serif Display', serif; font-size: 18px; color: #fff; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 18px; height: 18px; }
.brand-co { font-size: 12px; color: rgba(255,255,255,0.6); margin-left: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-nav a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; transition: color 0.15s; }
.site-nav a:hover { color: var(--orange); }
.site-nav a.active { color: #fff; }

/* Hero / page header */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 56px 0 64px;
  border-bottom: 4px solid var(--orange);
}
.hero .container { max-width: 880px; }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.hero h1 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 48px; line-height: 1.1; margin-bottom: 16px; }
.hero p { font-size: 17px; color: rgba(255,255,255,0.75); max-width: 600px; line-height: 1.6; }

/* Sections */
.section { padding: 48px 0; }
.section-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.section-eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 32px; margin-bottom: 12px; line-height: 1.2; }
.section h3 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 22px; margin-bottom: 8px; }
.section .lede { font-size: 17px; color: var(--muted); max-width: 620px; margin-bottom: 28px; }
.section p { margin-bottom: 12px; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.card-grid { display: grid; gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .card-grid.two, .card-grid.three { grid-template-columns: 1fr; }
}

/* Contact cards (team) */
.contact-card { display: flex; gap: 18px; align-items: flex-start; padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.contact-photo { width: 64px; height: 64px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--ink); flex-shrink: 0; overflow: hidden; }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.contact-info { flex: 1; }
.contact-name { font-weight: 500; font-size: 16px; margin-bottom: 2px; }
.contact-role { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.contact-email { font-size: 13px; }
.contact-email a { color: var(--orange); text-decoration: none; }
.contact-email a:hover { text-decoration: underline; }
.contact-meta { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.contact-meta strong { color: var(--ink); font-weight: 500; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; border: none; font-family: inherit; transition: background 0.15s, transform 0.05s; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #E64F00; }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #2a2a2a; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--ink); background: var(--cream); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Form sequence (home page) */
.form-list { display: grid; gap: 14px; }
.form-link {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.05s, box-shadow 0.15s;
}
.form-link:hover { border-color: var(--orange); box-shadow: 0 2px 8px rgba(255,92,0,0.08); }
.form-link-left { display: flex; gap: 18px; align-items: center; }
.form-num { width: 36px; height: 36px; border-radius: 8px; background: var(--cream); color: var(--ink); display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 18px; flex-shrink: 0; }
.form-link h3 { margin-bottom: 2px; font-size: 17px; font-family: 'DM Sans', sans-serif; font-weight: 500; }
.form-link p { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 0; }
.form-due { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; background: var(--cream); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.form-due.urgent { background: var(--orange); color: #fff; }

/* Timeline */
.timeline { display: grid; gap: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 22px; top: 16px; bottom: 16px; width: 2px; background: var(--border); }
.timeline-item { display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 14px 0; }
.timeline-marker { width: 46px; display: flex; justify-content: center; align-items: flex-start; padding-top: 4px; position: relative; z-index: 1; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 3px solid var(--beige); box-shadow: 0 0 0 1px var(--orange); }
.timeline-content { padding-bottom: 4px; }
.timeline-when { font-size: 13px; font-weight: 500; color: var(--orange); margin-bottom: 4px; letter-spacing: 0.02em; }
.timeline-content h3 { font-size: 17px; font-family: 'DM Sans', sans-serif; font-weight: 500; margin-bottom: 6px; }
.timeline-content p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }

/* Callouts */
.callout { padding: 18px 22px; border-radius: 12px; margin: 20px 0; font-size: 15px; line-height: 1.55; }
.callout strong { font-weight: 500; }
.callout-info { background: var(--sky); color: var(--ink); border-left: 4px solid #4A8AB8; }
.callout-warn { background: #FFF1E5; color: var(--ink); border-left: 4px solid var(--orange); }
.callout-do-not { background: #FFE8E0; color: var(--ink); border-left: 4px solid var(--req); }
.callout-do-not strong { color: var(--req); }
.callout-tip { background: var(--cream); color: var(--ink); border-left: 4px solid var(--ink); }

/* FAQ */
.faq-item { padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item h3 { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* Don't do list */
.dont-list { display: grid; gap: 12px; }
.dont-item { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--req); border-radius: 8px; padding: 16px 20px; }
.dont-item strong { color: var(--req); font-weight: 500; display: block; margin-bottom: 4px; }
.dont-item p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Shared service cards */
.service-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; }
.service-name { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 4px; }
.service-cat { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.service-card p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 14px; flex: 1; }
.service-meta { font-size: 13px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); }
.service-meta strong { color: var(--ink); font-weight: 500; }

/* Welcome / Employee Guide specific */
.welcome-quote { padding: 28px; background: var(--cream); border-radius: 12px; font-family: 'DM Serif Display', serif; font-size: 19px; line-height: 1.5; color: var(--ink); margin: 28px 0; position: relative; }
.welcome-quote::before { content: '\201C'; position: absolute; left: 14px; top: -4px; font-size: 56px; color: var(--orange); line-height: 1; }
.welcome-quote { padding-left: 56px; }
.welcome-quote .attribution { font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--muted); margin-top: 12px; font-style: normal; }

/* Tables (compact, used in guide) */
.compact-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.compact-table th { background: var(--cream); padding: 12px 18px; text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.compact-table td { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.5; vertical-align: top; }
.compact-table td strong { font-weight: 500; }

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 12px 0; padding-left: 32px; position: relative; font-size: 15px; line-height: 1.55; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: none; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 16px; width: 18px; height: 18px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); }
.checklist li strong { font-weight: 500; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 40px 0; margin-top: 80px; font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--orange); text-decoration: none; }

/* Verify badge (used on forms with pre-filled values that need confirmation) */
.verify-badge { display: inline-block; padding: 2px 8px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 500; border-radius: 4px; margin-left: 8px; letter-spacing: 0.02em; }

/* Pre-fill notice banner on form pages */
.prefill-notice { background: var(--sky); padding: 14px 22px; font-size: 14px; color: var(--ink); border-radius: 10px; margin: 20px auto; max-width: 720px; line-height: 1.5; }
.prefill-notice strong { font-weight: 500; }

/* Page intro under hero */
.page-intro { padding: 40px 0 24px; }
.page-intro .lede { font-size: 18px; color: var(--muted); max-width: 640px; }

/* Utility */
.text-orange { color: var(--orange); }
.text-muted { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Page loader — hides body content with a centered spinner until the */
/* engine has fetched data + applied placeholders. The body opens     */
/* with [data-loading] set in the HTML; the engine removes it on      */
/* render complete. Pseudo-elements paint as soon as the body tag is  */
/* parsed, so the user never sees raw {{placeholders}} or banners.    */
/* ------------------------------------------------------------------ */
body[data-loading] > * { visibility: hidden; }
body[data-loading]::before {
  content: '';
  position: fixed;
  inset: 0;
  /* Dark band at top mirrors the page chrome (site-header + hero ≈ 315px,
     form-header ≈ 290px), so when chrome paints it lands on a matching
     dark background and the user does not perceive a bright flash. */
  background: linear-gradient(to bottom, var(--ink) 0, var(--ink) 420px, var(--beige) 430px);
  z-index: 9998;
}
body[data-loading]::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: page-loader-spin 0.8s linear infinite;
  z-index: 9999;
}
@keyframes page-loader-spin { to { transform: rotate(360deg); } }

/* Demo banner — only visible when running against the example slug. */
.demo-banner { display: none; }
html[data-slug="example"] .demo-banner { display: block; }
