/* ==========================================================================
   PD Contabilidade — Design system
   Type: Fraunces (display serif, headings) + IBM Plex Sans (body/UI)
   Palette pulled from the brand mark's blue-grey gradient:
     --ink        #1B2430  near-black navy, body text
     --deep       #223A52  deep blue, panels / dark sections
     --accent     #3D73B3  brand blue, links / actions
     --accent-2   #5C86AE  lighter blue, secondary accents
     --slate      #5B6472  muted text
     --paper      #EEF1F4  page background (cool, not cream)
     --paper-2    #FFFFFF  card / surface background
     --line       #D7DDE3  hairline borders
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #1B2430;
  --deep: #223A52;
  --accent: #3D73B3;
  --accent-2: #5C86AE;
  --slate: #5B6472;
  --paper: #EEF1F4;
  --paper-2: #FFFFFF;
  --line: #D7DDE3;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1120px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--deep);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--accent); }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0 0 0.6em;
}

.lede {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--deep);
  color: #fff;
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  background: transparent;
  border-color: var(--deep);
  color: var(--deep);
}
.btn-secondary:hover { background: var(--deep); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238, 241, 244, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand svg, .brand img { height: 38px; width: auto; }
.brand-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--deep);
  letter-spacing: 0.01em;
}
.brand-word small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--slate);
  margin-top: 1px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.1rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 0.3em 0;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--deep); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-actions .btn { padding: 0.6em 1.2em; font-size: 0.92rem; }
.btn-hours { display: inline-flex; align-items: center; gap: 0.5em; }
.btn-hours svg { width: 16px; height: 16px; }

.lang-switch { display: flex; gap: 0.35rem; }
.lang-btn {
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.4em 0.55em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  cursor: pointer;
  opacity: 0.5;
  filter: grayscale(65%);
  transition: opacity 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}
.lang-btn:hover { opacity: 0.85; }
.lang-btn.is-active { opacity: 1; filter: none; border-color: var(--accent); }

@media (max-width: 640px) { .btn-hours span { display: none; } }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--deep);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--paper-2);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border-top: 1px solid var(--line);
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 1rem 1.5rem; }
  .main-nav a { display: block; padding: 0.9em 0; border-bottom: 1px solid var(--line); }
  .header-actions .btn-secondary:not(.btn-hours) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% -20% 28%;
  background: radial-gradient(ellipse at 68% 42%, rgba(61, 115, 179, 0.16) 0%, rgba(61, 115, 179, 0.06) 46%, rgba(61, 115, 179, 0) 76%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; width: 100%; }
.hero-copy { max-width: 46ch; }
.eyebrow-rule { display: inline-block; width: 30px; height: 2px; background: var(--accent); margin-right: 0.7em; vertical-align: middle; }
.hero h1 { margin-bottom: 0.45em; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-figure { position: relative; display: flex; justify-content: center; }
.hero-figure .mark { position: relative; z-index: 1; width: min(270px, 64%); filter: drop-shadow(0 20px 38px rgba(34, 58, 82, 0.3)); }

@media (max-width: 860px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; margin-bottom: 0.5rem; }
  .hero-figure .mark { width: 150px; }
}

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-head { max-width: 60ch; margin-bottom: 2.6rem; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Services (editorial list, not uniform cards) ---------- */
.services-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
}
.services-intro { position: sticky; top: 100px; align-self: start; }
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.service-row h3 { color: var(--ink); margin-bottom: 0.3em; }
.service-row p { margin: 0; color: var(--slate); }

@media (max-width: 860px) {
  .services-layout { grid-template-columns: 1fr; }
  .services-intro { position: static; }
  .service-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Sobre (texto + fotografia) ---------- */
.sobre-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.sobre-photo {
  position: relative;
}
.sobre-photo img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
}
.sobre-photo::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -14px;
  width: 72px;
  height: 72px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}
@media (max-width: 860px) {
  .sobre-layout { grid-template-columns: 1fr; }
  .sobre-photo img { height: 240px; }
}

/* ---------- Photo band ---------- */
.photo-band { padding: 0; }
.photo-band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.photo-cell { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cell figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.2rem 1.1rem;
  background: linear-gradient(0deg, rgba(20, 30, 42, 0.78) 0%, rgba(20, 30, 42, 0) 100%);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
}
@media (max-width: 760px) {
  .photo-band-grid { grid-template-columns: 1fr; }
  .photo-cell { aspect-ratio: 16 / 10; }
}

/* ---------- Why us ---------- */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reason {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.8rem;
}
.reason h3 { margin-bottom: 0.4em; }
.reason p { color: var(--slate); margin: 0; }
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; } }

/* ---------- Panel (dark) ---------- */
.panel-dark {
  background: var(--deep);
  color: #E7ECF2;
}
.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark .lede { color: #B9C6D4; }
.panel-dark a { color: #BFD6EE; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; margin: 1.6rem 0; }
.contact-info dt { font-weight: 500; color: var(--deep); }
.contact-info dd { margin: 0; color: var(--slate); }
.map-frame { border: 1px solid var(--line); width: 100%; height: 230px; margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.2rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field-label { display: block; }
label { font-size: 0.9rem; font-weight: 500; color: var(--deep); }
.req { color: var(--accent); font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 130px; }
input:focus, textarea:focus { border-color: var(--accent); }
.hint { font-size: 0.82rem; color: var(--slate); margin-top: 0.2rem; }

.file-drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.file-drop.has-file { border-style: solid; border-color: var(--accent); }
.file-drop-label { display: flex; flex-direction: column; gap: 0.2rem; }
.file-drop-name { font-size: 0.9rem; color: var(--slate); }
.file-drop input[type="file"] { max-width: 220px; font-size: 0.85rem; }

.consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--slate); }
.consent input { margin-top: 0.25rem; }

.form-status {
  display: none;
  padding: 0.9em 1.1em;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.form-status.is-visible { display: block; }
.form-status.ok { background: #E4F1E7; color: #24593A; border: 1px solid #B9DEC3; }
.form-status.err { background: #FBE7E5; color: #7A2A22; border: 1px solid #F2C2BC; }

.honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Careers hero strip ---------- */
.careers-hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); }
.value-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.value-list div { border-top: 2px solid var(--accent); padding-top: 0.8rem; }
.value-list h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.value-list p { color: var(--slate); margin: 0; font-size: 0.95rem; }
@media (max-width: 760px) { .value-list { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C7CEDA; padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-family: var(--sans); font-size: 0.95rem; margin-bottom: 0.8em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5em; }
.footer-grid a { color: #C7CEDA; text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer-brand svg { height: 28px; width: auto; }
.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid #333E4C;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #8894A3;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Selo da Ordem dos Contabilistas Certificados ---------- */
.occ-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.1rem;
  color: #A9B5C4;
  text-decoration: none;
  font-size: 0.83rem;
  line-height: 1.3;
  max-width: 30ch;
}
.occ-badge img { flex-shrink: 0; opacity: 0.92; transition: opacity 0.15s ease; }
.occ-badge:hover { color: #fff; }
.occ-badge:hover img { opacity: 1; }

/* ---------- Simple page (privacy) ---------- */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose { max-width: 72ch; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--deep);
  color: #fff;
  padding: 0.8em 1.2em;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
