/* ============================================================
   Farol site, shared layout + components
   Depends on design-tokens.css (load that first).
   Used by: index.html, sobre.html, arquivo.html, privacidade.html,
            termos.html, and the newsletter renderer.
   ============================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { -webkit-text-size-adjust: 100% }
body {
  background: var(--paper-warm);
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit }

/* ============================================================
   Sheet, the paper column every page lives inside.
   ============================================================ */
.sheet {
  max-width: var(--col-narrow);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow-sheet);
  min-height: 100vh;
}
.sheet--wide { max-width: var(--col-wide) }

/* ============================================================
   Header band, dark masthead with amber rule.
   ============================================================ */
.site-header {
  background: var(--dark-bg);
  padding: 28px var(--pad-sheet) 24px;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg, transparent, transparent 139px,
    rgba(255,255,255,.015) 139px, rgba(255,255,255,.015) 140px
  );
  pointer-events: none;
}
.site-masthead {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 42px;
  letter-spacing: -1.8px;
  color: #f8f5f0;
  line-height: 1;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-masthead-dot { color: var(--accent) }
/* Logo image variant. Uses farol-wordmark-light.png, white + lighthouse, on dark */
.site-masthead-img {
  height: 44px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.site-header-sub {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-top: 12px;
  position: relative;
  z-index: 1;
}
.site-header-rule {
  height: 2px;
  background: linear-gradient(
    90deg, transparent 0%,
    rgba(212,144,23,.55) 18%,
    #d49017 50%,
    rgba(212,144,23,.55) 82%,
    transparent 100%
  );
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--dark-bg);
  padding: 36px var(--pad-sheet);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer-text {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: rgba(255,255,255,.3);
  letter-spacing: 1px;
  line-height: 1.8;
}
.site-footer-text a {
  color: rgba(212,144,23,.6);
  text-decoration: none;
  margin: 0 6px;
}
.site-footer-text a:hover { color: var(--accent) }

/* ============================================================
   Page content wrapper (default padding for internal pages)
   ============================================================ */
.page-content {
  padding: 44px var(--pad-sheet);
}

/* ============================================================
   Type recipes, extend the design-tokens.css primitives
   ============================================================ */
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-display-2);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--ls-display);
  margin-bottom: 10px;
  color: var(--ink);
}
.page-subtitle {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 36px;
}

/* Section used across sobre, privacidade, termos */
.sec { margin-bottom: 32px }
.sec-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.sec p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 12px;
}
.sec h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -.2px;
}
.sec ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
}
.sec ul li {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  padding-left: 22px;
  margin-bottom: 8px;
  position: relative;
}
.sec ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* Inline text link */
.sec a, .page-content a:not(.cta):not(.site-masthead) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,144,23,.3);
  padding-bottom: 1px;
  transition: border-color .15s;
}
.sec a:hover, .page-content a:hover:not(.cta):not(.site-masthead) {
  border-bottom-color: var(--accent);
}

/* ============================================================
   Certainty grid (on /sobre)
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.cert-card {
  padding: 15px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
.cert-name {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.cert-name::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.cert-name--confirmed { color: var(--verified) }
.cert-name--likely    { color: var(--likely) }
.cert-name--unverified{ color: var(--warn) }
.cert-name--disputed  { color: var(--disputed) }
.cert-desc {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================================
   CTA button
   ============================================================ */
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--dark-bg);
  padding: 16px 36px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.cta:hover { background: var(--accent-hot); transform: translateY(-1px) }
.cta--big { padding: 18px 44px; font-size: 12px }

/* Secondary text link CTA */
.cta-secondary {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,144,23,.3);
  padding-bottom: 2px;
}
.cta-secondary:hover { border-bottom-color: var(--accent) }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 600px) {
  .site-header { padding: 20px var(--pad-sheet-sm) 16px }
  .site-masthead { font-size: 32px; letter-spacing: -1.4px }
  .site-masthead-img { height: 32px }
  .site-footer   { padding: 28px var(--pad-sheet-sm) }
  .page-content  { padding: 32px var(--pad-sheet-sm) }
  .cert-grid     { grid-template-columns: 1fr }
  .page-title    { font-size: 26px }
  .page-subtitle { font-size: 15px }
}
