/* ============================================================
   GIO · GUIA DO CANDIDATO · DESIGN SYSTEM WEB · D1
   Componentes — editorial, denso, sereno
   ============================================================ */

/* ===================== TIPOGRAFIA ===================== */

.display {
  font-family: var(--sans);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-tight);
  color: var(--green);
  margin: 0;
}
.display em, h1 em, h2 em, h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
}

h1, .h1 { font: 500 var(--fs-h1)/var(--lh-heading) var(--sans); letter-spacing: var(--tracking-tight); color: var(--green); margin: 0; }
h2, .h2 { font: 500 var(--fs-h2)/var(--lh-heading) var(--sans); letter-spacing: -0.018em; color: var(--green); margin: 0; }
h3, .h3 { font: 500 var(--fs-h3)/1.2 var(--sans); letter-spacing: -0.012em; color: var(--green); margin: 0; }
h4, .h4 { font: 500 var(--fs-h4)/1.3 var(--sans); color: var(--green); margin: 0; }

.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--green); max-width: 60ch; margin: 0; }
p { margin: 0 0 1em; color: var(--ink); line-height: var(--lh-body); }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--terra);
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor;
}
.eyebrow.green { color: var(--green); }
.eyebrow.muted { color: var(--muted); }

.pull-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.2; color: var(--green);
  letter-spacing: -0.015em;
  max-width: 28ch; margin: 0;
}

/* ===================== LAYOUT ===================== */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(64px, 8vw, 128px); }
.section + .section { border-top: 1px solid var(--line); }
.section.dark { background: var(--green); color: var(--paper); }
.section.dark h1, .section.dark h2, .section.dark h3, .section.dark .lede { color: var(--paper); }
.section.dark .eyebrow { color: var(--gold); }
.section.dark em { color: var(--gold); }
.section.warm { background: var(--bg); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Grid helpers */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===================== NAV ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,241,234,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.nav .logo {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; color: var(--green); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.nav .logo .mark {
  width: 32px; height: 32px; background: var(--green); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 24px; flex-wrap: nowrap; }
.nav-links a { white-space: nowrap; }
.nav-links a {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--green); }
.nav-links a[aria-current="page"] {
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 1px; background: var(--terra);
}

/* ===================== BUTTONS ===================== */
.btn {
  --btn-bg: var(--green);
  --btn-fg: var(--paper);
  --btn-bd: var(--green);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  text-decoration: none; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  border-radius: 0;
}
.btn:hover { --btn-bg: var(--green-deep); --btn-bd: var(--green-deep); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  --btn-bg: transparent;
  --btn-fg: var(--green);
  --btn-bd: var(--green);
}
.btn.ghost:hover { --btn-bg: var(--green); --btn-fg: var(--paper); }

.btn.terra {
  --btn-bg: var(--terra);
  --btn-bd: var(--terra);
}
.btn.terra:hover { --btn-bg: #964717; --btn-bd: #964717; }

.btn.gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--green);
  --btn-bd: var(--gold);
}
.btn.gold:hover { --btn-bg: #d8bd14; --btn-bd: #d8bd14; }

.btn.text {
  --btn-bg: transparent;
  --btn-fg: var(--green);
  --btn-bd: transparent;
  padding: 8px 0;
  border-bottom: 1px solid currentColor;
}
.btn.text:hover { --btn-fg: var(--terra); transform: none; }

.btn.lg { padding: 18px 32px; font-size: 15px; }
.btn.sm { padding: 10px 16px; font-size: 13px; }

/* ===================== INPUTS ===================== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.input, .textarea, .select {
  appearance: none;
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--green);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .7; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field.error .input { border-color: var(--terra); }
.field .help { font-size: 13px; color: var(--muted); }
.field .help.error-msg { color: var(--terra); }

/* checkbox */
.check {
  display: inline-flex; align-items: flex-start; gap: 12px;
  cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .indicator {
  width: 18px; height: 18px;
  border: 1.5px solid var(--green);
  background: var(--paper);
  flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.check .indicator::after {
  content: ""; width: 10px; height: 10px;
  background: var(--green); transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.check input:checked + .indicator::after { transform: scale(1); }

/* ===================== CARDS ===================== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--green); }
.card.linked { cursor: pointer; text-decoration: none; }
.card.linked:hover { transform: translateY(-2px); }

.card .ord {
  font-family: var(--serif); font-style: italic;
  font-size: 14px; color: var(--terra);
  letter-spacing: 0.02em;
}
.card .title {
  font-family: var(--sans); font-weight: 500;
  font-size: 24px; line-height: 1.15; color: var(--green);
  letter-spacing: -0.012em;
}
.card .body { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.card .meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terra);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

/* product card variant */
.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 40px 32px 32px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
  position: relative;
}
.product-card:hover { border-color: var(--green); background: #fbf9f4; }
.product-card .step {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terra);
}
.product-card .name {
  font-family: var(--sans); font-weight: 500;
  font-size: 32px; line-height: 1; color: var(--green);
  letter-spacing: -0.02em;
}
.product-card .name em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--terra);
}
.product-card .desc { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }
.product-card .footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green);
}

/* ===================== TAG / BADGE ===================== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 8px;
  background: var(--bg); color: var(--green);
  border: 1px solid var(--line);
}
.tag.gold { background: var(--gold); color: var(--green); border-color: var(--gold); }
.tag.terra { background: #f3e2d6; color: var(--terra); border-color: var(--terra); }
.tag.green { background: var(--green); color: var(--paper); border-color: var(--green); }
.tag.outline { background: transparent; }

/* ===================== EDITORIAL ===================== */
.box {
  background: var(--bg);
  border-left: 3px solid var(--green);
  padding: 20px 28px;
}
.box.gold { border-left-color: var(--gold); background: #f7f0d4; }
.box.terra { border-left-color: var(--terra); background: #f3e2d6; }
.box h4 { margin-top: 0; }
.box p:last-child { margin-bottom: 0; }

table.editorial {
  width: 100%; border-collapse: collapse;
}
table.editorial th, table.editorial td {
  text-align: left; padding: 14px 16px;
  font-size: 14px; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
table.editorial th {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terra); font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
}

/* ===================== FAQ accordion ===================== */
.faq details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px;
  font-size: 18px; font-weight: 500; color: var(--green);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--serif); font-style: italic;
  font-size: 28px; color: var(--terra); line-height: 1;
  transition: transform var(--dur-base);
}
.faq details[open] summary::after { content: "—"; font-size: 22px; }
.faq details > p { margin-top: 12px; color: var(--muted); }

/* ===================== HERO PATTERN ===================== */
.hero {
  background: var(--green); color: var(--paper);
  position: relative; overflow: hidden;
  padding-block: clamp(72px, 12vh, 160px);
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: var(--paper); }
.hero h1 em { color: var(--gold); }
.hero .lede { color: rgba(244,241,234,.85); }

/* decorative hero geometry — herdada do ebook */
.hero-geom {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-geom .circle, .hero-geom .square, .hero-geom .vline {
  position: absolute;
}
.hero-geom .circle {
  border: 1px solid rgba(231,202,27,.35);
  border-radius: 50%;
}
.hero-geom .vline {
  width: 1px; background: rgba(231,202,27,.5);
}
.hero-geom .square { background: var(--gold); }

/* ===================== FOOTER ===================== */
.footer {
  background: var(--green-deep); color: var(--paper);
  padding-block: var(--s-9) var(--s-6);
}
.footer .grid { gap: 48px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 880px) {
  .footer .grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 16px;
}
.footer .logo {
  font-family: var(--serif); font-style: italic;
  font-size: 28px; color: var(--paper);
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a {
  text-decoration: none; color: rgba(244,241,234,.7);
  font-size: 14px;
  transition: color var(--dur-fast);
}
.footer a:hover { color: var(--gold); }
.footer .legal {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid rgba(244,241,234,.15);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(244,241,234,.5);
}

/* ===================== ICON SET (line, 24px) ===================== */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 32px; height: 32px; }

/* ===================== UTILITIES ===================== */
.flex { display: flex; }
.col { flex-direction: column; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); } .gap-7 { gap: var(--s-7); }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.text-muted { color: var(--muted); }
.text-terra { color: var(--terra); }
.center { text-align: center; }
.max-w-prose { max-width: 60ch; }

/* photo placeholder */
.photo-ph {
  background: var(--green-deep);
  color: rgba(244,241,234,.6);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.photo-ph::before, .photo-ph::after {
  content: ""; position: absolute;
}
.photo-ph::before {
  inset: 12px; border: 1px solid rgba(231,202,27,.35);
}
.photo-ph::after {
  width: 8px; height: 8px; background: var(--gold);
  top: 20px; left: 20px;
}
.photo-ph .label { position: relative; z-index: 1; max-width: 24ch; }
.photo-ph.warm { background: var(--terra); color: rgba(244,241,234,.85); }
.photo-ph.paper { background: var(--bg); color: var(--muted); }
.photo-ph.paper::before { border-color: var(--line-strong); }
.photo-ph.paper::after { background: var(--terra); }
