/* ============================================
   Dr. Samuel César — sistema de design
   ============================================ */

:root {
  /* paleta */
  --ink: #1a1613;
  --ink-2: #3a332d;
  --ink-3: #6b625a;
  --ink-4: #a39b91;
  --rule: #e7e1d6;
  --rule-2: #efe9de;
  --paper: #faf6ee;
  --paper-2: #f5eee0;
  --paper-3: #ede3cf;
  --white: #ffffff;

  --gold: #c29e5f;
  --gold-2: #b87f24;
  --gold-soft: #e7d4ad;
  --green: #2c6e16;
  --green-soft: #e1ead9;

  /* tipografia */
  --serif: "Lora", "Cormorant Garamond", Georgia, serif;
  --display: "Fraunces", "Lora", Georgia, serif;
  --sans: "Geist", "Söhne", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* escala */
  --maxw: 1240px;
  --gap: clamp(16px, 2vw, 24px);
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 144px;

  --density: 1;
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.theme-dark {
  --ink: #f4ede0;
  --ink-2: #d8cfbe;
  --ink-3: #a89e8b;
  --ink-4: #6f675a;
  --rule: #2a2620;
  --rule-2: #1f1c17;
  --paper: #14110d;
  --paper-2: #1b1813;
  --paper-3: #23201a;
  --white: #1a1713;
  --gold: #d4ae6d;
  --gold-2: #e0b877;
  --gold-soft: #3a2f1a;
  --green-soft: #1c2a18;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* tipografia utilitária */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
}
.serif {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

/* seletores */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  text-decoration: none;
  background: transparent;
  color: var(--ink);
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: #fff; }
.btn-ghost { border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-gold {
  background: var(--gold-2);
  color: #fff;
  border-color: var(--gold-2);
}
.btn-gold:hover { background: var(--ink); border-color: var(--ink); }

/* ícone chevron */
.arr { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* scroll */
html { scroll-behavior: smooth; }

/* seletable numbers */
.numeral {
  font-family: var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "ss01";
}

/* brand (nav) */
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}
@media (max-width: 560px) {
  .brand-logo { height: 32px; }
}

.hero-signature {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  margin: 20px 0 14px;
  line-height: 1.2;
}
.hero-signature-plain {
  font-style: normal;
  font-family: var(--sans);
  font-size: clamp(15px, 1.1vw, 17px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 12px;
}

.hero-registry {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: -16px 0 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
  max-width: 560px;
}

/* local de atendimento */
.local-section { background: var(--paper-2); }
.local-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 48px;
  align-items: stretch;
}
@media (max-width: 900px) { .local-grid { grid-template-columns: 1fr; } }
.local-info {
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0;
}
.local-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 16px;
}
.local-name {
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 24px;
  color: var(--ink);
}
.local-name em { font-style: italic; color: var(--gold-2); }
.local-addr {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 32px;
}
.local-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.local-map {
  background: var(--paper-3);
  aspect-ratio: 4/3;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
@media (max-width: 900px) { .local-map { aspect-ratio: 4/3; min-height: 320px; } }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-color: var(--rule); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 14px;
  font-style: italic;
}
.brand em {
  font-style: italic;
  font-weight: 400;
}
.brand .crm {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold-2);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--s6) * var(--density)) 0 var(--s6);
  min-height: 92vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 62%;
  object-fit: cover;
  object-position: 30% center;
  /* máscara: opaco à direita, transparente à esquerda */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,0,0,0.15) 18%,
    rgba(0,0,0,0.55) 34%,
    rgba(0,0,0,0.9) 55%,
    #000 72%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,0,0,0.15) 18%,
    rgba(0,0,0,0.55) 34%,
    rgba(0,0,0,0.9) 55%,
    #000 72%
  );
}
.hero-scrim {
  position: absolute;
  inset: 0;
  /* sutil — apenas aveluda a emenda do mask */
  background:
    linear-gradient(90deg,
      var(--paper) 0%,
      rgba(250, 246, 238, 0.55) 30%,
      rgba(250, 246, 238, 0.15) 44%,
      rgba(250, 246, 238, 0) 58%);
}
@media (max-width: 900px) {
  .hero-bg img {
    width: 100%;
    -webkit-mask-image: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0,0,0,0.2) 20%,
      rgba(0,0,0,0.7) 45%,
      #000 70%
    );
    mask-image: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0,0,0,0.2) 20%,
      rgba(0,0,0,0.7) 45%,
      #000 70%
    );
  }
  .hero-scrim {
    background:
      linear-gradient(180deg,
        rgba(250, 246, 238, 0.95) 0%,
        rgba(250, 246, 238, 0.7) 40%,
        rgba(250, 246, 238, 0.2) 70%,
        rgba(250, 246, 238, 0) 100%);
  }
}
.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-col {
  max-width: 620px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--gold-2);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-2);
}
.hero-lede {
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 40px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  max-width: 560px;
}
.hero-meta .kv .k {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.hero-meta .kv .v {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}

/* Hero image side */
.hero-image {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--paper-3);
  border-radius: 4px;
  overflow: hidden;
}
.hero-image .placeholder {
  position: absolute; inset: 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 12px,
      rgba(0,0,0,0.025) 12px 13px),
    linear-gradient(180deg, var(--paper-2), var(--paper-3));
}
.hero-image .placeholder span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
}
.hero-image-tag {
  position: absolute;
  left: 20px; bottom: 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink);
  max-width: 220px;
}
.hero-image-tag .t {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 28px;
  position: relative;
}
.hero-card .eyebrow { margin-bottom: 12px; }
.hero-card h4 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}
.hero-card p {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 16px;
  line-height: 1.55;
}
.hero-card a.more {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--gold-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-card a.more:hover { color: var(--ink); }

/* ============================================
   SECTION — SOBRE
   ============================================ */
section.section {
  padding: var(--s6) 0;
}
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }
.section-head .label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-head .num {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  color: var(--gold-2);
  font-style: italic;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  max-width: 22ch;
}
.section-head h2 em {
  font-style: normal;
  color: var(--gold-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.about-photo {
  aspect-ratio: 3/4;
  background: var(--paper-3);
  border-radius: 4px;
  overflow: hidden;
  position: sticky;
  top: 100px;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}
.about-text p { margin: 0 0 1.2em; }

.about-text .signoff {
  margin-top: 40px;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}

.about-credentials {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.cred {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  padding-right: 24px;
}
.cred:nth-child(odd) { border-right: 1px solid var(--rule); padding-left: 0; padding-right: 24px; }
.cred:nth-child(even) { padding-left: 24px; }
.cred .y {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--gold-2);
  margin-bottom: 6px;
}
.cred .t {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}
.cred .s {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}

/* ============================================
   SERVIÇOS
   ============================================ */
.svc-section { background: var(--paper-2); }
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
}
.svc {
  padding: 40px 36px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  transition: background .25s ease;
  cursor: pointer;
  position: relative;
}
.svc:hover { background: var(--white); }
.svc .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.svc h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 14px 0 12px;
  color: var(--ink);
  line-height: 1.1;
}
.svc h3 em { font-style: italic; color: var(--gold-2); }
.svc p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 20px;
}
.svc .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.svc .tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-3);
  background: var(--paper);
}
.svc .svc-arr {
  position: absolute;
  top: 40px; right: 36px;
  color: var(--ink-3);
  transition: color .2s ease, transform .2s ease;
}
.svc:hover .svc-arr {
  color: var(--gold-2);
  transform: translate(2px, -2px);
}

/* ============================================
   PILARES (3 col)
   ============================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar .glyph {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  font-family: var(--display);
  font-style: italic;
  color: var(--gold-2);
  font-size: 18px;
  margin-bottom: 20px;
}
.pillar h4 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}
.pillar p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* ============================================
   ARTIGOS / BLOG preview
   ============================================ */
.articles {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 900px) {
  .articles { grid-template-columns: 1fr; }
}
.article {
  background: var(--paper);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: background .2s ease;
  cursor: pointer;
}
.article:hover { background: var(--white); }
.article .cat {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 16px;
}
.article h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
}
.article.feature h3 { font-size: 36px; }
.article p {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.article .meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}
.article .meta .read {
  color: var(--gold-2);
}

/* ============================================
   CONTATO
   ============================================ */
.contact-section {
  background: var(--ink);
  color: var(--paper);
}
.contact-section .section-head .num { color: var(--gold); }
.contact-section .section-head h2 { color: var(--paper); }
.contact-section .section-head h2 em { color: var(--gold); }
.contact-section .eyebrow { color: var(--gold); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.contact-block .lbl {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  margin-bottom: 10px;
}
.contact-block .val {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--paper);
  line-height: 1.35;
}
.contact-block .val em { font-style: italic; color: var(--gold); }
.contact-block .sub {
  font-family: var(--serif);
  font-size: 15px;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  margin-top: 6px;
}

/* form */
.form {
  background: color-mix(in srgb, var(--paper) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 15%, transparent);
  padding: 36px;
}
.form .row { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.form .row.full { grid-template-columns: 1fr; }
@media (max-width: 540px) { .form .row { grid-template-columns: 1fr; } }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}
.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 25%, transparent);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  padding: 10px 0;
  outline: none;
  transition: border-color .2s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 100px; }
.field select { appearance: none; background-image: none; }

.form button {
  margin-top: 12px;
  background: var(--gold);
  color: var(--ink);
  border: 0;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
}
.form button:hover { background: var(--paper); }

/* ============================================
   FOOTER
   ============================================ */
footer.foot {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 60%, transparent);
  padding: 48px 0 32px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 10%, transparent);
}
.foot .foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--sans);
  font-size: 12px;
}
.foot .brand { color: var(--paper); }

/* ============================================
   TWEAKS PANEL
   ============================================ */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  max-height: 80vh;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.2);
  z-index: 80;
  display: none;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 13px;
}
.tweaks.open { display: flex; }
.tweaks .th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--display);
  font-size: 16px;
}
.tweaks .tc { padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.tweaks label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: block;
}
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .swatch {
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 2px solid var(--rule);
  cursor: pointer;
}
.tweaks .swatch.on { border-color: var(--ink); }
.tweaks .seg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.tweaks .seg button {
  background: transparent;
  border: 0;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
  font-family: inherit;
}
.tweaks .seg button.on { background: var(--ink); color: var(--paper); }
.tweaks input[type=range] { width: 100%; }
.tweaks-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 70;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.15);
}
.tweaks-fab.show { display: flex; }

/* ============================================
   BLOG ARTICLE PAGE
   ============================================ */
.art-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.breadcrumb {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--ink); }
.art-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 24px;
  color: var(--ink);
  max-width: 20ch;
}
.art-hero h1 em { font-style: italic; color: var(--gold-2); }
.art-hero .dek {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 58ch;
  margin: 0;
}
.art-hero .meta {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
}
.art-hero .meta .k {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.art-hero .meta .v { color: var(--ink); font-family: var(--serif); font-size: 14px; }

.art-body {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 48px;
  padding: 72px 0;
  align-items: start;
}
@media (max-width: 1000px) { .art-body { grid-template-columns: 1fr; } }
.art-toc {
  position: sticky;
  top: 100px;
  font-family: var(--sans);
  font-size: 13px;
}
.art-toc .lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.art-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.art-toc li {
  counter-increment: toc;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  gap: 10px;
  line-height: 1.35;
}
.art-toc li:before { content: counter(toc, decimal-leading-zero); color: var(--gold-2); font-family: var(--display); font-style: italic; }
.art-toc li.on { color: var(--ink); }

.art-prose {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 64ch;
}
.art-prose h2 {
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 56px 0 20px;
}
.art-prose h2 em { font-style: italic; color: var(--gold-2); }
.art-prose h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 36px 0 12px;
}
.art-prose p { margin: 0 0 1.2em; }
.art-prose ul, .art-prose ol { padding-left: 20px; margin: 0 0 1.4em; }
.art-prose li { margin: 6px 0; }
.art-prose blockquote {
  margin: 32px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--gold-2);
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}
.art-prose .fig {
  margin: 36px 0;
  background: var(--paper-3);
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.art-prose .fig .placeholder {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(0,0,0,0.03) 12px 13px),
    linear-gradient(180deg, var(--paper-2), var(--paper-3));
}
.art-prose .fig .cap {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
}
.art-prose .callout {
  margin: 32px 0;
  padding: 24px;
  background: var(--paper-2);
  border-left: 2px solid var(--gold-2);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-2);
}
.art-prose .callout strong {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.art-side {
  position: sticky;
  top: 100px;
  font-family: var(--sans);
  font-size: 12px;
}
.art-side .box {
  background: var(--paper-2);
  padding: 20px;
  margin-bottom: 16px;
}
.art-side .box .lbl {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}
.art-side .box h5 {
  font-family: var(--display); font-size: 18px; font-weight: 400; margin: 0 0 8px; color: var(--ink); line-height: 1.2;
}
.art-side .box p { margin: 0 0 12px; font-family: var(--serif); color: var(--ink-2); line-height: 1.5; }

/* Article index (in blog home) — reused on article list  */
.art-list {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.art-row {
  display: grid;
  grid-template-columns: 80px 1.3fr 2fr 1fr 24px;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  cursor: pointer;
  transition: padding .2s ease;
}
.art-row:hover { padding-left: 8px; }
.art-row .n {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-2);
}
.art-row .cat {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.art-row .t {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
.art-row .d {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.art-row .arr { color: var(--ink-3); }
.art-row:hover .arr { color: var(--gold-2); }
@media (max-width: 800px) {
  .art-row { grid-template-columns: 1fr; gap: 6px; }
  .art-row .n, .art-row .arr, .art-row .d { display: none; }
}

/* tag strip */
.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}
.tag-strip .t {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s ease;
}
.tag-strip .t.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag-strip .t:hover { border-color: var(--ink); }

/* small helpers */
.center { text-align: center; }
.flex { display: flex; }
.gap-s { gap: 8px; }
.mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 24px; }
.screen-reader { position: absolute; left: -9999px; }

/* density */
body[data-density="compact"] { --s5: 48px; --s6: 72px; --s7: 108px; }
body[data-density="airy"] { --s5: 80px; --s6: 128px; --s7: 180px; }
