/* ==========================================================================
   Funerária Rio de Janeiro 24h
   base.css  |  Reset, tokens de design, tipografia e utilitários
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

address {
  font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Cores institucionais: sobriedade, respeito e legibilidade alta */
  --c-ink: #14181f;
  --c-ink-soft: #3d4654;
  --c-ink-mute: #667085;
  --c-line: #e2e6ec;
  --c-line-soft: #eef1f5;
  --c-surface: #ffffff;
  --c-surface-alt: #f6f8fa;
  --c-surface-deep: #101722;
  --c-surface-deep-2: #182231;

  /* Marca */
  --c-brand: #1d3557;
  --c-brand-light: #2b4d7d;
  --c-accent: #b08d3f;
  --c-accent-soft: #f2ead7;

  /* Ação (WhatsApp é o CTA primário) */
  --c-whats: #128c4a;
  --c-whats-dark: #0f7440;
  --c-call: #1d3557;
  --c-call-dark: #16294380;

  --c-focus: #2b6cb0;

  /* Tipografia */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.45rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2.125rem, 1.6rem + 2.6vw, 3.25rem);

  /* Espaçamento */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5rem;

  --section-y: clamp(3rem, 2rem + 4vw, 5.5rem);

  /* Formas */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 23, 34, 0.06),
    0 1px 3px rgba(16, 23, 34, 0.08);
  --shadow: 0 4px 16px rgba(16, 23, 34, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 23, 34, 0.14);

  --wrap: 1140px;
  --wrap-narrow: 780px;

  /* Altura da barra fixa de ação no mobile */
  --actionbar-h: 74px;
}

/* --------------------------------------------------------------------------
   3. Elementos base
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-ink-soft);
  background-color: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--c-ink);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--sp-4);
}

strong {
  color: var(--c-ink);
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--c-accent-soft);
  color: var(--c-ink);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}

/* Compensa o cabeçalho fixo quando o navegador salta para uma âncora */
section[id],
[id] {
  scroll-margin-top: 88px;
}

.section--alt {
  background-color: var(--c-surface-alt);
}

.section--deep {
  background-color: var(--c-surface-deep);
  color: #c3ccd9;
}

.section--deep h2,
.section--deep h3 {
  color: #ffffff;
}

.section__head {
  max-width: 680px;
  margin-bottom: var(--sp-7);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}

.section--deep .eyebrow {
  color: #d9bf82;
}

.lead {
  font-size: var(--fs-md);
  color: var(--c-ink-soft);
  margin-top: var(--sp-4);
}

/* --------------------------------------------------------------------------
   5. Botões
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: background-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.btn--whats {
  background-color: var(--c-whats);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.btn--whats:hover {
  background-color: var(--c-whats-dark);
}

.btn--call {
  background-color: var(--c-brand);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.btn--call:hover {
  background-color: var(--c-brand-light);
}

.btn--ghost {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.btn--outline {
  background-color: var(--c-surface);
  color: var(--c-brand);
  border: 2px solid var(--c-line);
}

.btn--outline:hover {
  border-color: var(--c-brand);
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* --------------------------------------------------------------------------
   6. Utilitários
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 999;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-brand);
  color: #ffffff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
