/* =========================================================
   ALGAA — Consultoria Atuarial
   Landing page · CSS
   Design tokens seguem o brand board (não alterar cores).
   ========================================================= */

:root {
  /* Cores */
  --navy:        #0A1930;
  --navy-deep:   #142743;
  --copper:      #B8703E;
  --copper-deep: #8C5A2E;
  --ivory:       #F4F1EA;
  --graphite:    #6B7280;

  /* Derivados sutis */
  --navy-line:   rgba(244, 241, 234, 0.12);
  --ivory-line:  rgba(10, 25, 48, 0.10);
  --copper-soft: rgba(184, 112, 62, 0.14);
  /* Texto secundário sobre navy — derivado do marfim p/ garantir contraste AA */
  --muted-navy:  rgba(244, 241, 234, 0.62);

  /* Tipografia */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ivory);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  background: var(--copper);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 1.4vw, 0.75rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-navy);
  margin: 0 0 1.25rem;
}
.eyebrow--copper { color: var(--copper); }

.accent { color: var(--copper); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--copper { background: var(--copper); color: #fff; }
.btn--copper:hover { background: var(--copper-deep); }

.btn--lg { font-size: 1.05rem; padding: 1em 1.9em; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  transition: height 0.3s var(--ease);
}
.nav__logo img { width: auto; height: 40px; transition: height 0.3s var(--ease); }

.nav.is-scrolled {
  background: rgba(10, 25, 48, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-line);
}
.nav.is-scrolled .nav__inner { height: 68px; }
.nav.is-scrolled .nav__logo img { height: 34px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}
.nav__links > a:not(.btn) {
  font-size: 0.95rem;
  color: var(--ivory);
  opacity: 0.85;
  position: relative;
  padding: 0.25rem 0;
  transition: opacity 0.2s var(--ease);
}
.nav__links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--copper);
  transition: width 0.25s var(--ease);
}
.nav__links > a:not(.btn):hover { opacity: 1; }
.nav__links > a:not(.btn):hover::after { width: 100%; }
.nav__cta { padding: 0.6em 1.15em; font-size: 0.9rem; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ivory);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--navy);
  padding-block: clamp(3.5rem, 9vw, 6rem) var(--section-y);
  overflow: hidden;
}
/* Vídeo de fundo da primeira dobra */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--navy) url("../video/hero-poster.webp") center / cover no-repeat;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Tinta navy p/ manter a leitura do texto marfim (contraste AA) e o tom da marca */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,25,48,0.97) 0%, rgba(10,25,48,0.90) 50%, rgba(10,25,48,0.62) 100%),
    linear-gradient(180deg, rgba(10,25,48,0.45) 0%, rgba(10,25,48,0) 32%, rgba(10,25,48,0.60) 100%);
}
.hero__curve {
  position: absolute;
  top: 50%;
  right: -6%;
  transform: translateY(-50%);
  width: min(64%, 760px);
  max-width: none;
  pointer-events: none;
  opacity: 0.8;
  z-index: 1;
}
.hero__curve svg { width: 100%; height: auto; }

.curve-line {
  stroke: var(--copper);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.curve-baseline {
  stroke: var(--copper);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
}
.curve-dot { fill: var(--copper); }

.hero__inner { position: relative; z-index: 2; max-width: 62rem; }
.hero__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.85rem, 8.5vw, 6rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.hero__sub {
  max-width: 40rem;
  color: rgba(244, 241, 234, 0.78);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin: 0 0 2.5rem;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero__micro {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted-navy);
}

/* =========================================================
   SEÇÕES CLARAS
   ========================================================= */
.section--light {
  background: var(--ivory);
  color: var(--navy);
}
.section--light .eyebrow { color: var(--graphite); }
.section--light .eyebrow--copper { color: var(--copper-deep); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
}

/* ---------- Serviços ---------- */
.services { padding-block: var(--section-y); }
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 2.15rem;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(10, 25, 48, 0.35);
  border-color: rgba(184, 112, 62, 0.4);
}
.card:hover::before { transform: scaleX(1); }
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}
.card__icon { color: var(--copper-deep); display: inline-flex; }
.card__icon svg { width: 30px; height: 30px; }
.card__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--copper-deep); /* cobre deep: variação p/ fundo claro (brand + AA) */
}
.card__title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--navy);
}
.card__text {
  margin: 0;
  color: #3a4a63;
  font-size: 1rem;
  line-height: 1.6;
}

/* =========================================================
   DIFERENCIAL / FRASES DE IMPACTO
   ========================================================= */
.statements {
  background: var(--navy);
  padding-block: clamp(5rem, 12vw, 10rem);
}
.statements .eyebrow { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.statements__list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 7vw, 5.5rem);
}
.statement {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: 52rem;
  border-top: 1px solid var(--navy-line);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}
.statement__marker {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.35em;
  color: var(--copper);
}
.statement__icon { display: inline-flex; }
.statement__icon svg { width: 28px; height: 28px; }
.statement__idx {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--copper);
}
.statement p {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ivory);
}

/* =========================================================
   VISÃO / POSICIONAMENTO
   ========================================================= */
.vision { padding-block: var(--section-y); }
.vision__inner { max-width: 60rem; }
.vision__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.25rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 18ch;
}
.vision__body {
  display: grid;
  gap: 1.4rem;
  max-width: 44rem;
}
.vision__body p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #2a3a53;
  line-height: 1.7;
}

/* =========================================================
   SOBRE (GONZALO)
   ========================================================= */
.about {
  background: var(--navy-deep);
  padding-block: var(--section-y);
}
.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about__photo {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 420px;
}
.about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--navy-line);
  border-radius: var(--radius);
}
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(0.96) contrast(1.02);
}
.about__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 0.15rem;
}
.about__role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 1.75rem;
}
.about__bio p {
  margin: 0 0 1rem;
  color: rgba(244, 241, 234, 0.8);
  font-size: 1.075rem;
  max-width: 40rem;
}
.about__note {
  font-family: var(--font-mono);
  font-size: 0.78rem !important;
  color: var(--muted-navy) !important;
}
.about__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  color: var(--ivory);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
  transition: color 0.2s var(--ease);
}
.about__linkedin svg { color: var(--copper); }
.about__linkedin:hover { color: var(--copper); }

/* =========================================================
   CONTATO
   ========================================================= */
.contact {
  background: var(--navy);
  padding-block: var(--section-y);
  border-top: 1px solid var(--navy-line);
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}
.contact__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  max-width: 14ch;
}
.contact__sub {
  color: rgba(244, 241, 234, 0.75);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 0 0 1.25rem;
}
.contact__micro {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--copper);
  margin: 0;
}
.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.channel {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 1.4rem;
  background: var(--navy-deep);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.channel:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 112, 62, 0.5);
}
.channel__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--copper-soft);
  color: var(--copper);
}
.channel__body { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.channel__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-navy);
}
.channel__value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel .arrow {
  margin-left: auto;
  color: var(--copper);
  transition: transform 0.25s var(--ease);
  flex: none;
}
.channel:hover .arrow { transform: translateX(4px); }
.channel--primary {
  background: var(--copper);
  border-color: var(--copper);
}
.channel--primary:hover { background: var(--copper-deep); border-color: var(--copper-deep); }
.channel--primary .channel__icon { background: rgba(255,255,255,0.18); color: #fff; }
.channel--primary .channel__label { color: rgba(255,255,255,0.85); }
.channel--primary .channel__value,
.channel--primary .arrow { color: #fff; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--navy);
  border-top: 1px solid var(--navy-line);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.footer__mono { height: 38px; width: auto; opacity: 0.95; }
.footer__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-navy);
  margin: 0.85rem 0 0;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}
.footer__nav a {
  font-size: 0.92rem;
  color: rgba(244, 241, 234, 0.75);
  transition: color 0.2s var(--ease);
}
.footer__nav a:hover { color: var(--copper); }
.footer__social { display: flex; gap: 0.75rem; }
.footer__social a {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  color: var(--ivory);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer__social a:hover { color: var(--copper); border-color: rgba(184,112,62,0.5); transform: translateY(-2px); }
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--muted-navy);
  margin: 0;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Stagger nas frases e cards */
.statement:nth-child(2) { transition-delay: 0.05s; }
.statement:nth-child(3) { transition-delay: 0.1s; }

/* =========================================================
   ANIMAÇÃO DA CURVA (desenho)
   ========================================================= */
.curve-line, .curve-baseline {
  stroke-dasharray: var(--len, 1400);
  stroke-dashoffset: var(--len, 1400);
}
.curve-dot { opacity: 0; }
.hero.is-drawn .curve-line { animation: draw 2s var(--ease) forwards; }
.hero.is-drawn .curve-baseline { animation: draw 1.4s var(--ease) 0.3s forwards; }
.hero.is-drawn .curve-dot { animation: dot 0.5s var(--ease) 1.6s forwards; }

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

/* =========================================================
   BREAKPOINTS
   ========================================================= */
@media (min-width: 700px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .footer__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand social"
      "nav   copy";
    row-gap: 2.5rem;
  }
  .footer__brand { grid-area: brand; }
  .footer__social { grid-area: social; justify-self: end; }
  .footer__nav { grid-area: nav; }
  .footer__copy { grid-area: copy; justify-self: end; text-align: right; }
}

@media (min-width: 900px) {
  .about__inner { grid-template-columns: 0.85fr 1.15fr; align-items: center; }
  .contact__inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 880px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 340px);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem var(--gutter);
    background: var(--navy-deep);
    border-left: 1px solid var(--navy-line);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -30px 0 60px -30px rgba(0,0,0,0.6);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links > a:not(.btn) { font-size: 1.35rem; opacity: 1; }
  .nav__cta { font-size: 1rem; padding: 0.8em 1.4em; }
  body.menu-open { overflow: hidden; }
}

/* =========================================================
   PREFERS-REDUCED-MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .curve-line, .curve-baseline { stroke-dashoffset: 0; }
  .curve-dot { opacity: 1; }
  /* Sem animação: não roda o vídeo, mantém o poster estático de fundo */
  .hero__video { display: none; }
}
