/* ─────────────────────────────────────────────────────────────────
   CAVIC Digital — shared stylesheet
   Used by index, about, services, contact, /books/*, privacy, terms.
   ───────────────────────────────────────────────────────────────── */

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

:root {
  --ink: #0D0D0D;
  --paper: #F7F4EE;
  --warm: #E8E2D6;
  --gold: #B8976A;
  --gold-light: #D4B48C;
  --slate: #4A4A4A;
  --muted: #888;
  --rule: #D8D0C4;
  --serif: 'Cormorant Garant', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0 48px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

nav { display: flex; gap: 32px; align-items: center; }
nav a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover { color: var(--gold); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 20px;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--ink) !important; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 50%; height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(184,151,106,0.06) 100%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-desc {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 440px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold); color: var(--ink); }

.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--slate);
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.entity-card {
  border: 1px solid var(--rule);
  padding: 28px 32px;
  background: white;
  position: relative;
}
.entity-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
}

.entity-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.entity-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}

.entity-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.entity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  margin-top: 10px;
}
.entity-badge::before {
  content: '✓';
  font-size: 10px;
}

/* ── SECTION BASE ── */
section {
  padding: 100px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
  margin: 0 auto;
  max-width: 1100px;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--gold);
}

.section-h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 56px;
}

/* ── WORK / BOOKS GRID ── */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
}

.work-item {
  background: white;
  padding: 36px 32px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.work-item:hover { border-color: var(--gold); }

.work-number {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 20px;
}

.work-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 12px;
}

.work-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.work-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 4px 10px;
  color: var(--slate);
}

.work-tag.live {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── AISIBLY SECTION ── */
.aisibly-section {
  background: var(--ink);
  padding: 100px 48px;
  max-width: none;
}

.aisibly-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.aisibly-section .section-eyebrow { color: var(--gold-light); }
.aisibly-section .section-eyebrow::before { background: var(--gold-light); }

.aisibly-section .section-h2 { color: var(--paper); }

.aisibly-section .section-desc { color: rgba(247,244,238,0.65); }

.aisibly-features {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aisibly-feature {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  align-items: start;
}

.feature-num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--gold);
  margin-top: 2px;
}

.feature-text strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--paper);
  margin-bottom: 4px;
}

.feature-text span {
  font-size: 13px;
  color: rgba(247,244,238,0.55);
  line-height: 1.55;
}

/* ── ENTITY ANCHOR SECTION ── */
.anchor-section {
  background: var(--warm);
  max-width: none;
}

.anchor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 0;
}

.anchor-item {
  background: var(--paper);
  padding: 36px 32px;
  border: 1px solid var(--rule);
}

.anchor-type {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.anchor-name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}

.anchor-alias {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 20px;
}

.anchor-props {
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 12px;
  row-gap: 6px;
  font-size: 12px;
  margin: 0;
}

.anchor-props dt {
  color: var(--gold);
  font-weight: 500;
}

.anchor-props dd {
  color: var(--slate);
  margin: 0;
}

.anchor-props dd a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.anchor-props dd a:hover { color: var(--gold); }

.wikidata-note {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(184,151,106,0.08);
  border-left: 2px solid var(--gold);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── FOUNDER ── */
.founder-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.founder-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 300;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 28px;
  margin-bottom: 28px;
}

.founder-attr {
  font-size: 13px;
  color: var(--muted);
  margin-left: 31px;
}

.founder-bio {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 20px;
}

.career-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.career-list li {
  font-size: 13px;
  color: var(--slate);
  padding-left: 16px;
  position: relative;
}

.career-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* ── ARTICLE / LEGAL / CONTENT PAGES ── */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 48px 80px;
}

.article-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.article h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}

.article .lead {
  font-size: 18px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 48px;
}

.article h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.article h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article p {
  font-size: 16px;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 16px;
}

.article ul, .article ol {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}

.article ul li, .article ol li {
  font-size: 16px;
  color: var(--slate);
  line-height: 1.75;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

.article ol {
  counter-reset: olc;
}
.article ol li {
  counter-increment: olc;
}
.article ol li::before {
  content: counter(olc) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 500;
  font-size: 14px;
}

.article a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.article a:hover { color: var(--ink); }

.article em {
  font-style: italic;
  color: var(--ink);
}

.article blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  margin: 32px 0;
}

.article .contact-block {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--rule);
  background: white;
}

.article .contact-block p { margin-bottom: 4px; }

/* legacy /privacy /terms wrappers — alias .legal to .article look */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 48px 80px;
}
.legal h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 8px;
}
.legal .last-updated {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 48px;
}
.legal h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.legal p {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal ul {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}
.legal ul li {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.legal ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--gold);
}
.legal em { font-style: italic; color: var(--ink); }
.legal .contact-block {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--rule);
  background: white;
}
.legal .contact-block p { margin-bottom: 4px; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.breadcrumb li::before { content: none; }

.breadcrumb li + li::before {
  content: '·';
  color: var(--gold);
  display: inline-block;
}

.breadcrumb a {
  color: var(--slate);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--gold); }

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

/* ── BOOK PAGE ── */
.book-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 16px;
  row-gap: 8px;
  font-size: 13px;
  margin: 24px 0 32px;
}
.book-meta dt {
  color: var(--gold);
  font-weight: 500;
}
.book-meta dd {
  color: var(--slate);
  margin: 0;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 24px;
}

.contact-card {
  background: white;
  padding: 32px;
  border: 1px solid var(--rule);
}

.contact-card .label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 12px;
}

.contact-card .value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}

.contact-card .value a {
  color: var(--ink);
  text-decoration: none;
}
.contact-card .value a:hover { color: var(--gold); }

.contact-card .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item summary {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--sans);
  font-weight: 300;
  font-size: 28px;
  color: var(--gold);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-answer {
  padding: 0 0 24px;
  font-size: 15px;
  color: var(--slate);
  line-height: 1.75;
  max-width: 760px;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 60px 48px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 12px;
}

.footer-sub {
  font-size: 12px;
  color: rgba(247,244,238,0.4);
  line-height: 1.65;
}

.footer-col-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(247,244,238,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-legal {
  font-size: 11px;
  color: rgba(247,244,238,0.3);
}

.footer-reg {
  font-size: 11px;
  color: rgba(247,244,238,0.3);
  text-align: right;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.25s; }
.fade-up:nth-child(3) { animation-delay: 0.4s; }
.fade-up:nth-child(4) { animation-delay: 0.55s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  header { padding: 0 24px; }
  nav { display: none; }
  .hero { padding: 100px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { display: none; }
  section { padding: 72px 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .aisibly-inner { grid-template-columns: 1fr; gap: 48px; }
  .aisibly-section { padding: 72px 24px; }
  .anchor-grid { grid-template-columns: 1fr; }
  .anchor-section { padding: 72px 24px; }
  .founder-section { grid-template-columns: 1fr; gap: 40px; }
  .article, .legal { padding: 100px 24px 60px; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { padding: 48px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
