/* ============================================================
   Facete — shared design system
   facete.070801.org / all pages
   ============================================================ */

:root{
  color-scheme: light dark;
  --bg: #f7f6f3;
  --bg-warm: #f2f0e9;
  --surface: #ffffff;
  --ink: #1a1915;
  --ink-soft: #3d3b35;
  --ink-softer: #5a574e;
  --muted: #6b6960;
  --muted-soft: #9c9a90;
  --line: #e4e1d9;
  --line-strong: #d7d3c7;
  --line-hairline: rgba(26, 25, 21, 0.07);
  --accent: #c96442;
  --accent-deep: #a8513a;
  --accent-soft: rgba(201, 100, 66, 0.09);
  --radius: 4px;
  --radius-lg: 14px;
  --maxw: 1120px;
  --maxw-prose: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text",
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Charter", "Iowan Old Style", "Source Han Serif SC",
    "Songti SC", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #13120f;
    --bg-warm: #181712;
    --surface: #1c1b17;
    --ink: #f1ede2;
    --ink-soft: #d4cfc1;
    --ink-softer: #b5b0a2;
    --muted: #8a8878;
    --muted-soft: #615f56;
    --line: #2b2924;
    --line-strong: #3a372f;
    --line-hairline: rgba(241, 237, 226, 0.07);
    --accent: #d97b5c;
    --accent-deep: #b5634a;
    --accent-soft: rgba(217, 123, 92, 0.12);
  }
}

*{ box-sizing: border-box; margin: 0; padding: 0 }
html{ scroll-behavior: smooth; text-size-adjust: 100% }
body{
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.003em;
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none }
button{ font: inherit; cursor: pointer; background: none; border: none; color: inherit }
img{ max-width: 100%; display: block }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px }
::selection{ background: var(--accent); color: #fff }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration: .01ms !important; transition-duration: .01ms !important }
  html{ scroll-behavior: auto }
}

/* -------------------------------------------------- Nav */
.nav{
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.nav-inner{
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 28px;
  display: flex; align-items: center; gap: 36px;
}
.brand{
  display: flex; align-items: baseline; gap: 8px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-en{
  font-family: var(--font-serif);
  font-weight: 500; font-style: italic;
  color: var(--muted); font-size: 15px;
}
.nav-links{
  display: flex; gap: 28px; margin-left: auto;
  font-size: 14px; color: var(--ink-soft);
  align-items: center;
}
.nav-links a{ transition: color .15s }
.nav-links a:not(.nav-cta):hover{ color: var(--accent) }
.nav-links a[aria-current="page"]{ color: var(--ink); font-weight: 500 }
.nav-cta{
  padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
.nav-cta:hover{ background: var(--ink); color: var(--bg); border-color: var(--ink) }

@media (max-width: 720px){
  .nav-inner{ padding: 16px 20px; gap: 16px }
  .nav-links a:not(.nav-cta){ display: none }
  .nav-links{ gap: 12px }
}

/* -------------------------------------------------- Section chrome */
.section{ border-top: 1px solid var(--line); position: relative }
.section-inner{ max-width: var(--maxw); margin: 0 auto; padding: 96px 28px }
.section-inner.narrow{ max-width: var(--maxw-prose) }
.section-label{
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 28px;
}
.section-label::before{
  content: ""; width: 24px; height: 1px; background: var(--muted);
}
.section-title{
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.12;
  font-weight: 500; letter-spacing: -0.022em;
  max-width: 22ch;
  margin-bottom: 22px;
}
.section-title em{
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
}
.section-lede{
  font-size: clamp(16px, 1.25vw, 18px);
  color: var(--ink-soft);
  max-width: 58ch; line-height: 1.65;
}

/* -------------------------------------------------- Buttons */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: transform .1s ease, background .15s, border-color .15s, color .15s;
  line-height: 1;
}
.btn:active{ transform: scale(.98) }
.btn-primary{ background: var(--ink); color: var(--bg) }
.btn-primary:hover{ background: var(--accent); color: #fff }
.btn-ghost{ color: var(--ink); border: 1px solid var(--line-strong) }
.btn-ghost:hover{ border-color: var(--ink) }
.btn svg{ width: 18px; height: 18px; flex-shrink: 0 }

/* -------------------------------------------------- Trust strip */
.trust{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-warm);
  padding: 18px 28px;
}
.trust-inner{
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 28px 44px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.trust-item{ display: inline-flex; align-items: center; gap: 8px }
.trust-item::before{
  content: ""; width: 5px; height: 5px; background: var(--accent);
  border-radius: 50%; flex-shrink: 0;
}

/* -------------------------------------------------- FAQ (details/summary) */
.q-list{
  margin-top: 44px;
  border-top: 1px solid var(--line);
}
.q-item{ border-bottom: 1px solid var(--line) }
.q-item > summary{
  list-style: none; cursor: pointer;
  padding: 22px 28px 22px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-size: 17px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color .15s;
}
.q-item > summary:hover{ color: var(--accent) }
.q-item > summary::-webkit-details-marker{ display: none }
.q-item > summary::after{
  content: "";
  width: 10px; height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform .2s ease, margin-top .2s ease;
  flex-shrink: 0;
}
.q-item[open] > summary::after{
  transform: rotate(-135deg);
  margin-top: 4px;
}
.q-item-a{
  padding: 0 28px 24px 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 68ch;
}

/* -------------------------------------------------- Footer */
footer{
  border-top: 1px solid var(--line);
  background: var(--bg-warm);
  padding: 56px 28px 40px;
  font-size: 13px; color: var(--muted);
  margin-top: auto;
}
.footer-inner{
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 36px 44px; align-items: start;
}
@media (max-width: 720px){
  .footer-inner{ grid-template-columns: repeat(2, 1fr) }
}
.footer-brand{ display: flex; flex-direction: column; gap: 12px }
.footer-brand strong{
  font-size: 16px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em;
}
.footer-brand span{
  font-family: var(--font-serif); font-style: italic;
  color: var(--muted); font-size: 14px;
  max-width: 36ch; line-height: 1.55;
}
.footer-col{ display: flex; flex-direction: column; gap: 10px }
.footer-col-title{
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 4px;
}
.footer-col a{ color: var(--ink-soft); transition: color .15s }
.footer-col a:hover{ color: var(--accent) }
.footer-base{
  max-width: var(--maxw); margin: 48px auto 0;
  padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: 12px; color: var(--muted-soft);
}
.footer-base span{ font-family: var(--font-mono); letter-spacing: 0.05em }

/* -------------------------------------------------- Prose (long-form) */
.prose{
  max-width: var(--maxw-prose);
  margin: 0 auto;
  padding: 72px 28px 104px;
}
.prose-eyebrow{
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.prose-eyebrow::before{
  content: ""; width: 24px; height: 1px; background: var(--muted);
}
.prose h1{
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 14px;
  max-width: 18ch;
}
.prose h1 em{
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent);
}
.prose .meta{
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--muted); letter-spacing: 0.04em;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.prose h2{
  font-family: var(--font-serif);
  font-weight: 500; font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 48px 0 14px;
  color: var(--ink);
  position: relative;
  padding-left: 18px;
}
.prose h2::before{
  content: "";
  position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.prose h2 em{ font-style: italic; color: var(--accent) }
.prose h3{
  font-size: 17px; font-weight: 600;
  margin: 28px 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.prose p{
  font-size: 16px; color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 14px;
  max-width: 68ch;
}
.prose p strong{ color: var(--ink); font-weight: 600 }
.prose ul, .prose ol{
  margin: 0 0 18px 20px;
  color: var(--ink-soft);
}
.prose li{
  font-size: 16px; line-height: 1.7;
  margin: 6px 0;
  padding-left: 8px;
}
.prose li strong{ color: var(--ink); font-weight: 600 }
.prose a{
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color .15s;
}
.prose a:hover{ border-bottom-color: var(--accent) }
.prose code{
  background: var(--bg-warm);
  border: 1px solid var(--line);
  padding: 1.5px 6px; border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--ink);
}
.prose hr{
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}
.prose-divider{
  text-align: center;
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 14px;
  opacity: .6;
  margin: 48px 0;
  letter-spacing: 0.5em;
}

/* -------------------------------------------------- Card grid (topics/scenarios) */
.card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.tile{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .2s;
  color: inherit;
}
.tile:hover{
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.tile-tag{
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.tile h3{
  font-family: var(--font-serif);
  font-weight: 500; font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.tile h3 em{ font-style: italic; color: var(--accent); font-weight: 500 }
.tile p{
  font-size: 14px; color: var(--ink-soft);
  line-height: 1.65;
}
.tile-action{
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* -------------------------------------------------- Contact card */
.contact-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 56px;
  position: relative; overflow: hidden;
}
.contact-card::before{
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.contact-card h2{
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em; color: var(--ink);
}
.contact-card h2 em{ font-style: italic; color: var(--accent) }
.contact-card p{
  font-size: 14.5px; color: var(--ink-soft);
  line-height: 1.65;
}
.contact-methods{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.contact-method{
  background: var(--bg-warm);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.contact-method-label{
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.contact-method-value{
  font-size: 14px; color: var(--ink);
  font-weight: 500;
}
.contact-method-value a{
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

/* -------------------------------------------------- Helpers */
.sr-only{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}
.divider-ornament{
  text-align: center;
  font-family: var(--font-serif);
  color: var(--accent);
  opacity: .55;
  font-size: 16px;
  margin: 40px 0;
  letter-spacing: 0.8em;
}

/* -------------------------------------------------- Print */
@media print{
  .nav, .site-footer, .btn, .hero-cta{ display: none }
  body{ background: white; color: black }
  .section{ border-top: 1px solid #ccc }
  a{ color: inherit; border-bottom: none }
}
