/* ========================================================================
   F&R Microcenter — Sistema de design
   ======================================================================== */

:root {
  /* Marca */
  --green: #1e3a35;
  --green-700: #244a43;
  --burgundy: #75193e;
  --burgundy-700: #5d1431;
  --sage: #56726D;
  --cream: #FDF2DC;
  --cream-warm: #F6E5D2;
  --cream-soft: #FBF8F2;
  --off-white: #FFFBF3;
  --line: rgba(30, 58, 53, 0.14);
  --muted: rgba(30, 58, 53, 0.62);

  /* Tipografia */
  --serif: "Playfair Display", "EB Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Espaços */
  --container: 1240px;
  --container-narrow: 1080px;
  --radius: 4px;
  --radius-lg: 10px;
}

/* Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--green);
  background: var(--cream-warm);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tipografia ---------------------------------------------------------- */
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.005em; }
.sans  { font-family: var(--sans); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.08; }
h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.12; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; }

p { margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 500;
}

.eyebrow.muted { color: var(--sage); }
.italic { font-style: italic; }
.text-burgundy { color: var(--burgundy); }
.text-sage    { color: var(--sage); }
.text-green   { color: var(--green); }
.text-cream   { color: var(--cream); }

/* Botões -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--burgundy);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--burgundy-700); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--burgundy);
  border: 1px solid var(--burgundy);
}
.btn--ghost:hover { background: var(--burgundy); color: var(--cream); }
.btn--dark {
  background: var(--green);
  color: var(--cream);
}
.btn--dark:hover { background: var(--green-700); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
  text-decoration: none;
  transition: gap 0.2s ease;
}
.link-arrow:hover { gap: 14px; }
.link-arrow .arrow {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  position: relative;
}
.link-arrow .arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Container ----------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }

/* Header / nav -------------------------------------------------------- */
.site-header {
  background: #FFF6F1;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 58, 53, 0.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.site-header__logo img { width: 64px; height: 64px; }
.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--burgundy); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--burgundy);
}

/* Procedimentos dropdown -------------------------------------------- */
.nav-item--has-sub { position: relative; display: flex; align-items: center; }
.nav-item__top { display: inline-flex; align-items: center; gap: 7px; }
.nav-item__caret {
  width: 6px; height: 6px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.25s ease;
  opacity: 0.7;
}
.nav-item--has-sub:hover .nav-item__caret { transform: translateY(1px) rotate(45deg); }
.nav-sub {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 264px;
  background: #FFF6F1;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 22px 48px -24px rgba(30, 58, 53, 0.4);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 60;
}
.nav-sub::before {
  content: "";
  position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.nav-item--has-sub:hover .nav-sub,
.nav-item--has-sub:focus-within .nav-sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-sub a {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  padding: 9px 12px;
  border-radius: 3px;
  white-space: nowrap;
  color: var(--green);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-sub a::after { display: none; }
.nav-sub a:hover,
.nav-sub a[aria-current="page"] {
  color: var(--burgundy);
  background: rgba(122, 30, 42, 0.06);
}

/* Mobile nav --------------------------------------------------------- */
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #FFF6F1;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 32px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .nav-item--has-sub { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-item__caret { display: none; }
  .nav-sub {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 8px 0 0 14px;
    min-width: 0;
    border-left: 1px solid var(--line);
    margin-top: 10px;
    gap: 4px;
  }
  .nav-sub::before { display: none; }
  .nav-sub a { padding: 6px 0; white-space: normal; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent; border: none; color: var(--green);
  }
  .nav-toggle svg { width: 22px; height: 22px; }
}

/* Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--green);
  color: var(--cream);
  padding: 68px 0 24px;
  font-family: var(--sans);
}
.site-footer a { color: var(--cream); text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 60px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.site-footer h4 {
  color: var(--cream);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 18px;
  opacity: 0.75;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.site-footer__brand img { width: 72px; height: 72px; margin-bottom: 18px; }
.site-footer__brand p { font-size: 13px; opacity: 0.7; line-height: 1.55; max-width: 280px; }
.site-footer__bottom {
  max-width: var(--container);
  margin: 60px auto 0;
  padding: 22px 32px 0;
  border-top: 1px solid rgba(253, 242, 220, 0.14);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.65;
  letter-spacing: 0.04em;
}
@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
}

/* Image placeholders -------------------------------------------------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(30, 58, 53, 0.06) 0 1px,
      transparent 1px 14px
    ),
    var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ph__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  color: var(--sage);
  text-align: center;
  padding: 16px;
  letter-spacing: 0.05em;
}
.ph--warm {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(117, 25, 62, 0.06) 0 1px,
      transparent 1px 14px
    ),
    var(--cream-warm);
}
.ph--dark {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(253, 242, 220, 0.1) 0 1px,
      transparent 1px 14px
    ),
    var(--green);
}
.ph--dark .ph__label { color: rgba(253, 242, 220, 0.6); }

/* Common section helpers --------------------------------------------- */
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--cream { background: var(--cream); }
.section--cream-warm { background: var(--cream-warm); }
.section--white { background: var(--off-white); }
.section--green { background: var(--green); color: var(--cream); }
.section--green h1, .section--green h2, .section--green h3 { color: var(--cream); }

@media (max-width: 880px) {
  .section { padding: 64px 0; }
  .site-header__inner { padding: 0 20px; }
  .container, .container--narrow, .site-footer__grid, .site-footer__bottom { padding-left: 20px; padding-right: 20px; }
}

/* Forms --------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.7;
  font-weight: 500;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--green);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--burgundy);
  background: #fff;
}
.field textarea { min-height: 100px; resize: vertical; }

/* Marca F&R em títulos — fonte Alike */
.fr-mark { font-family: "Alike", "Playfair Display", Georgia, serif; font-weight: 400; }
