/* =========================================================
   HR Eletrónico — stylesheet
   Design tokens: graphite / off-white / soft grey / muted blue
   Automatic light/dark via prefers-color-scheme.
   ========================================================= */

:root {
  /* Light theme (default) */
  --bg: #FAFAF8;
  --surface: #F1F2EF;
  --surface-2: #E9EAE6;
  --text: #1F2328;
  --text-muted: #5B6169;
  --border: #DEE1DC;
  --accent: #2B5C8A;
  --accent-strong: #204a72;
  --accent-contrast: #FFFFFF;
  --focus: #2B5C8A;
  --shadow: 0 1px 2px rgba(20, 22, 24, 0.06);

  --font-heading: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 6px;
  --max-width: 1080px;
  --content-width: 640px;
  --header-height: 60px;
  --bar-height: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181B;
    --surface: #1C2023;
    --surface-2: #23282C;
    --text: #E8EAEA;
    --text-muted: #9AA1A6;
    --border: #2B3034;
    --accent: #6EA0D0;
    --accent-strong: #8AB4E0;
    --accent-contrast: #0F1214;
    --focus: #6EA0D0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Top accent stripe ---------- */
.top-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 60%, var(--accent-strong) 100%);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0; color: var(--text); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 16px -10px rgba(0, 0, 0, 0.3);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.95rem, 4.2vw, 1.25rem);
  color: var(--text);
}
.brand .brand-mark {
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-call {
  display: none;
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: 24px 20px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 20px; }

@media (min-width: 860px) {
  .main-nav { display: block; }
  .header-call { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* ---------- Section rhythm ---------- */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: var(--header-height);
}
.hero { scroll-margin-top: var(--header-height); }
.section:last-of-type { border-bottom: none; }
.section-head {
  max-width: var(--content-width);
  margin: 0 0 28px 0;
}
.section-line {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
}
.section-head p {
  margin-top: 10px;
  color: var(--text-muted);
  max-width: 52ch;
}

/* ---------- Hero ---------- */
.hero {
  --hero-bg: #14181B;
  --hero-text: #F4F5F3;
  --hero-text-muted: #B7BEC3;
  --hero-line: rgba(244, 245, 243, 0.10);
  position: relative;
  padding: 52px 0 60px;
  background-color: var(--hero-bg);
  background-image:
    repeating-linear-gradient(115deg, var(--hero-line) 0, var(--hero-line) 1px, transparent 1px, transparent 96px),
    repeating-linear-gradient(25deg, var(--hero-line) 0, var(--hero-line) 1px, transparent 1px, transparent 96px);
  color: var(--hero-text);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 85% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--hero-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  width: fit-content;
}
.hero-location svg { width: 14px; height: 14px; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  max-width: 16ch;
  color: var(--hero-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin-top: 16px;
  color: var(--hero-text-muted);
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-chips {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.hero-chips li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--hero-text-muted);
}
.hero-chips svg { width: 15px; height: 15px; color: var(--accent-strong); flex: none; }
.hero .btn-primary {
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.hero .btn-primary:hover { transform: translateY(-1px); }
.hero .btn-secondary {
  color: var(--hero-text);
  border-color: rgba(244, 245, 243, 0.25);
}
.hero .btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }
.hero-media {
  color: var(--accent-strong);
  background: rgba(244, 245, 243, 0.06);
  border: 1px solid rgba(244, 245, 243, 0.14);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 0 0 1px rgba(244,245,243,0.02), 0 20px 40px -24px color-mix(in srgb, var(--accent) 60%, transparent);
}
.hero-media svg { width: 100%; height: auto; max-width: 380px; margin: 0 auto; display: block; }

@media (min-width: 860px) {
  .hero .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .hero-text { flex: 1 1 55%; }
  .hero-media { flex: 1 1 38%; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -14px rgba(20, 22, 24, 0.35);
}
.service-card .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  margin-bottom: 12px;
}
.service-card .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-bottom: 0;
}
.service-card h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
}
.service-card p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 860px) {
  .services-grid-3 { max-width: 900px; }
}

/* ---------- About ---------- */
.about-content {
  max-width: var(--content-width);
  color: var(--text-muted);
  font-size: 1.02rem;
}
.about-content p + p { margin-top: 14px; }
.about-points {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.about-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text);
}
.about-points svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---------- Contact + Location ---------- */
.contact-grid {
  display: grid;
  gap: 24px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-item .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
}
.contact-item .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  flex: none;
}
.contact-item .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: none;
  margin-bottom: 2px;
}
.contact-item .value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
}
.contact-item a.value {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.contact-item a.value:hover { color: var(--accent); border-color: var(--accent); }

.contact-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 520px) {
  .contact-actions { flex-direction: row; flex-wrap: wrap; }
  .contact-actions .btn { flex: 1 1 auto; }
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 11;
  background: var(--surface-2);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

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

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0 96px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-footer strong { color: var(--text); font-family: var(--font-heading); font-size: 1.05rem; }
.footer-copy { margin-top: 14px; }

@media (min-width: 860px) {
  .site-footer { padding-bottom: 40px; }
}

/* ---------- Mobile fixed action bar ---------- */
.mobile-action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: var(--bar-height);
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.mobile-action-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.mobile-action-bar a:first-child {
  color: var(--accent-contrast);
  background: var(--accent);
}
.mobile-action-bar svg { width: 18px; height: 18px; }

@media (min-width: 860px) {
  .mobile-action-bar { display: none; }
}

/* body padding so fixed bar never covers content on mobile */
@media (max-width: 859px) {
  body { padding-bottom: var(--bar-height); }
}

/* ---------- Fade-in on load (single, restrained) ---------- */
.hero-text > * {
  animation: rise .5s ease both;
}
.hero-text > *:nth-child(2) { animation-delay: .05s; }
.hero-text > *:nth-child(3) { animation-delay: .1s; }
.hero-text > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-text > * { animation: none; }
}
