/* ==========================================================================
   DS Work — design tokens
   Ledger-and-skyline system: institutional navy, precise hairline rules,
   an abstracted Rio skyline as the one bold recurring device.
   ========================================================================== */

:root {
  --navy-900: #10173f;
  --navy-700: #222d89;
  --navy-600: #2e3a9e;
  --teal-500: #17a589;
  --teal-400: #1fc2a0;
  --paper: #f1f2f6;
  --paper-raised: #fbfbfd;
  --ink: #1b2030;
  --ink-soft: #4a5068;
  --line: #d7d9e2;
  --line-strong: #b9bcce;
  --white: #ffffff;

  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, sans-serif;

  --content-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 3px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  /* This site commits to a single lit-paper look in both system themes;
     the skyline motif and navy brand family read correctly on light only. */
}

*,
*::before,
*::after {
  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;
    scroll-behavior: auto !important;
  }
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

a {
  color: var(--navy-700);
}

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

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.kicker {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal-500);
  margin-bottom: 0.6rem;
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.btn-primary {
  background: var(--navy-700);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-600);
}

.btn-ghost {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--navy-700);
  color: var(--navy-700);
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 242, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.logo img {
  display: block;
  height: 38px;
  width: auto;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2.2rem);
}

.main-nav a {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.main-nav a:hover {
  color: var(--navy-700);
  border-bottom-color: var(--teal-500);
}

.main-nav a.btn {
  border-bottom: none;
  color: var(--white);
}

.main-nav a.btn:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  margin: 4px 0;
}

/* Hero --------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy .eyebrow-line {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.hero-copy h1 {
  margin-bottom: 1.1rem;
}

.hero-copy .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-since {
  margin-top: 2.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 30rem;
}

.hero-since strong {
  color: var(--navy-900);
}

.skyline-wrap {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

.skyline-wrap svg {
  width: 100%;
  height: auto;
}

.skyline-wrap .bld {
  fill: none;
  stroke: var(--navy-700);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.4s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.skyline-wrap .bld.accent {
  stroke: var(--teal-500);
}

.skyline-wrap .dot {
  fill: var(--teal-500);
  opacity: 0;
  animation: fadeIn 0.6s var(--ease) forwards;
  animation-delay: 1.5s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skyline-wrap .bld {
    stroke-dashoffset: 0;
    animation: none;
  }
  .skyline-wrap .dot {
    opacity: 1;
    animation: none;
  }
}

/* Sobre ----------------------------------------------------------------- */

.about .container {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about .section-head {
  margin-bottom: 0;
}

.about-body p {
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.about-founded {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--navy-900);
  font-weight: 600;
}

/* Services --------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service-card {
  padding: 2.2rem 1.9rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  border-left: 3px solid transparent;
  transition: border-left-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.service-card:hover {
  border-left-color: var(--teal-500);
  background: var(--white);
}

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.2rem;
  color: var(--navy-700);
}

.service-card h3 {
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: none;
}

/* Diferenciais ------------------------------------------------------------ */

.why {
  background: var(--navy-900);
  color: var(--paper);
}

.why .kicker {
  color: var(--teal-400);
}

.why h2,
.why .section-head p {
  color: var(--white);
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.why-list li {
  background: var(--navy-900);
  padding: 1.9rem 2rem;
}

.why-list h3 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.why-list p {
  color: rgba(241, 242, 246, 0.78);
  font-size: 0.96rem;
  max-width: 40ch;
  margin: 0;
}

/* Contact ------------------------------------------------------------- */

.contact .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.contact-block h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.contact-block a,
.contact-block address {
  font-style: normal;
  font-size: 1.05rem;
  color: var(--navy-900);
  text-decoration: none;
  display: block;
}

.contact-block a:hover {
  color: var(--teal-500);
}

.map-frame {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: var(--radius);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

form.contact-form {
  display: grid;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

/* Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--navy-900);
  color: rgba(241, 242, 246, 0.72);
  padding: 3rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-top .logo img {
  height: 32px;
  filter: brightness(0) invert(1);
}

.footer-links,
.footer-social {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-social a {
  color: rgba(241, 242, 246, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--teal-400);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
}

/* Área do Cliente page ------------------------------------------------- */

.portal {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
}

.portal .container {
  max-width: 640px;
  text-align: left;
}

.portal-card {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: clamp(2rem, 5vw, 3rem);
  border-left: 3px solid var(--teal-500);
}

.portal-card h1 {
  margin-bottom: 0.9rem;
}

.portal-card p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.portal-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-back {
  margin-top: 2.2rem;
  display: inline-block;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .skyline-wrap {
    order: -1;
    max-width: 420px;
  }

  .about .container {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .why-list {
    grid-template-columns: 1fr;
  }

  .contact .container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
  }

  nav.main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    display: none;
  }

  nav.main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav .btn {
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
  }
}
