/* =============================================================
   HARFSEN RESEARCH — style.css
   Baseado no design Figma. Mobile-first.
   ============================================================= */

/* ─── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --dark:         #002540;
  --near-black:   #21272a;
  --coral:        #ca7a60;
  --gray-dark:    #3a464f;
  --gray-mid:     #758997;
  --gray-light:   #dce6ee;
  --lavender-bg:  #f4f5ff;
  --carousel-bg:  #003e6b;
  --card-border:  #e8e8e8;
  --footer-bg:    #000000;
  --copy-bg:      #001829;
  --footer-text:  #f4f5ff;
  --white:        #ffffff;
  --section-pad-x: 20px;
  --section-pad-y: 64px;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--near-black);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.3; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn--coral {
  background: var(--coral);
  color: var(--white);
}
.btn--white {
  background: var(--white);
  color: var(--coral);
}

/* ─── FADE-IN ANIMATION ─────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   HEADER
   ============================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow 0.25s ease;
}
.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo */
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo__img { height: 30px; width: auto; object-fit: contain; }

/* Nav */
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 40px; }
.nav__link {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--coral); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 6px;
}
.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--near-black);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.is-open .hamburger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open .hamburger__line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open .hamburger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav.is-open {
  display: block;
  position: fixed;
  top: 80px; left: 0; right: 0;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 24px var(--section-pad-x);
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav.is-open .nav__list { flex-direction: column; align-items: flex-start; gap: 0; }
.nav.is-open .nav__link { display: block; padding: 14px 0; width: 100%; font-size: 17px; border-bottom: 1px solid #f0f0f0; }

/* =============================================================
   HERO + CARDS
   ============================================================= */
.hero {
  background: var(--white);
  padding-top: 80px; /* header height */
}

.hero__content {
  padding-top: 56px;
  margin-bottom: 32px;
}

.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 5.875rem);
  font-weight: 300;
  color: var(--near-black);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.hero__accent { color: var(--coral); }

/* Meta row */
.hero__meta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.hero__subtitle {
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  color: var(--gray-dark);
  line-height: 1.6;
  max-width: 700px;
}

/* Divider */
.hero__divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin-bottom: 0;
}

/* ─── SERVICE CARDS STRIP ─────────────────────────────────── */
.cards-strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: 90px;
}

/* Base card */
.svc-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 28px;
  min-height: 260px;
  border-top: 2px solid var(--card-border);
  border-bottom: 2px solid var(--card-border);
  border-left: none;
  border-right: none;
  transition: background 0.2s ease;
  position: relative;
}
.svc-card + .svc-card { border-top: none; }
.svc-card:hover { background: #fafafa; }

/* First card: also has left border (rounded left on desktop) */
.svc-card--first { border-left: 2px solid var(--card-border); }
/* Last card: also has right border (rounded right on desktop) */
.svc-card--last  { border-right: 2px solid var(--card-border); }

/* Featured card */
.svc-card--featured {
  background: linear-gradient(253deg, #000000 8%, #003e6b 83%);
  border: none;
}
.svc-card--featured:hover { filter: brightness(1.08); background: linear-gradient(253deg, #000000 8%, #003e6b 83%); }

/* Card icon */
.svc-card__icon { margin-bottom: auto; }

/* Card body */
.svc-card__body { display: flex; flex-direction: column; gap: 24px; margin-top: 20px; }

.svc-card__title {
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  font-weight: 600;
  color: var(--near-black);
  line-height: 1.3;
}
.svc-card--featured .svc-card__title { color: var(--white); }

.svc-card__desc {
  font-size: clamp(0.875rem, 1.25vw, 1.125rem);
  color: var(--gray-dark);
  line-height: 1.5;
}
.svc-card--featured .svc-card__desc { color: #d3d3d3; }

/* Featured card link */
.svc-card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--white);
  margin-top: 28px;
  align-self: flex-end;
  transition: gap 0.2s ease;
}
.svc-card__link:hover { gap: 16px; }

/* =============================================================
   UMA NOVA FORMA
   ============================================================= */
.nova-forma {
  background: var(--lavender-bg);
  padding: var(--section-pad-y) 0;
}
.nova-forma__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}
.nova-forma__title {
  font-size: clamp(1.6rem, 3.3vw, 3rem);
  font-weight: 300;
  color: var(--near-black);
  letter-spacing: -0.05em;
}
.nova-forma__desc {
  font-size: clamp(0.9rem, 1.25vw, 1.125rem);
  color: var(--gray-dark);
  line-height: 1.6;
}
.nova-forma__desc strong { font-weight: 600; color: var(--near-black); }
.nova-forma__image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  max-height: 420px;
}
.nova-forma__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================================
   8 ETAPAS — CARROSSEL
   ============================================================= */
.etapas {
  background: var(--carousel-bg);
  padding: var(--section-pad-y) 0;
  overflow: hidden;
}

/* Header */
.etapas__header { margin-bottom: 40px; }

.etapas__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d9d9d9;
  box-shadow: 0 0 18px 0 #ffbda8;
  margin-bottom: 24px;
  width: fit-content;
}

.etapas__title {
  font-size: clamp(1.6rem, 3.3vw, 3rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.05em;
  max-width: 700px;
}

/* Nav */
.etapas__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.etapas__btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.etapas__btn:hover { opacity: 0.7; }
.etapas__counter {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  min-width: 56px;
  line-height: 1.4;
}

/* Carousel wrapper */
.etapas__wrapper {
  overflow: hidden;
  cursor: grab;
  user-select: none;
}
.etapas__wrapper:active { cursor: grabbing; }

.etapas__track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Individual step card */
.etapa-card {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 24px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  /* width set dynamically by JS */
  width: calc(100% - 0px);
}

.etapa-card__num {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-mid);
  line-height: 1.6;
}

.etapa-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: auto;
}

.etapa-card__title {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.4;
}
.etapa-card__text {
  font-size: 16px;
  color: var(--gray-light);
  line-height: 1.5;
}

/* Dots */
.etapas__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.etapas__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease, height 0.2s ease;
  flex-shrink: 0;
}
.etapas__dot.is-active {
  background: var(--coral);
  width: 10px;
  height: 10px;
}

/* =============================================================
   CTA
   ============================================================= */
.cta {
  background: linear-gradient(to bottom,
    rgba(0,37,64,0.99) 7%,
    rgba(202,122,96,0.99) 95%);
  padding: var(--section-pad-y) 0;
}
.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}
.cta__text {
  font-size: clamp(1.6rem, 5vw, 4.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

/* =============================================================
   SOBRE
   ============================================================= */
.sobre {
  background: var(--white);
  padding: var(--section-pad-y) 0;
}
.sobre__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}
.sobre__title {
  font-size: clamp(1.6rem, 3.3vw, 3rem);
  font-weight: 300;
  color: var(--near-black);
  letter-spacing: -0.05em;
}
.sobre__desc {
  font-size: clamp(0.9rem, 1.25vw, 1.125rem);
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 12px;
}
.sobre__desc strong { font-weight: 600; color: var(--near-black); }

/* Image card */
.sobre__card {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  min-height: 360px;
}
.sobre__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  min-height: 360px;
  display: block;
}
.sobre__card-overlay {
  position: absolute;
  inset: 0;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}
.sobre__profile-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 320px;
  font-size: 16px;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.45;
  letter-spacing: -0.03em;
  opacity: 0.92;
}
.sobre__caption {
  font-size: clamp(1.4rem, 3vw, 3rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.05em;
  line-height: 1.3;
  max-width: 560px;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--footer-bg);
  padding: 80px 0 72px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.footer__tagline {
  font-size: clamp(1.8rem, 5vw, 4.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -0.05em;
  max-width: 660px;
}
.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--footer-text);
  line-height: 1.6;
}
.footer__link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  color: var(--footer-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
  word-break: break-all;
}
.footer__link:hover { opacity: 0.75; }

/* ─── COPYRIGHT BAR ────────────────────────────────────────── */
.copyright {
  background: var(--copy-bg);
  padding: 18px 0;
}
.copyright__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.copyright__text,
.copyright__dev {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--footer-text);
  line-height: 1.2;
}
.copyright__dev span {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =============================================================
   MODAL
   ============================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s ease;
}
.modal-overlay.is-open .modal {
  transform: scale(1) translateY(0);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5A6478;
  transition: background 0.2s;
}
.modal__close:hover { background: #f0f0f0; }

.modal__icon {
  width: 56px;
  height: 56px;
  background: #EFF4FA;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__title {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--carousel-bg);
  line-height: 1.3;
}

.modal__body {
  font-size: 15px;
  color: #5A6478;
  line-height: 1.7;
}

.modal__email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F2F4F7;
  border-radius: 8px;
  padding: 14px 18px;
  gap: 12px;
  margin-top: 4px;
}
.modal__email-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--carousel-bg);
  word-break: break-all;
  line-height: 1.4;
}
.modal__copy-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s;
}
.modal__copy-btn:hover { background: rgba(0,0,0,0.06); }

.modal__copy-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--near-black);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal__copy-tooltip.is-visible { opacity: 1; }

.modal__footer-note {
  font-size: 13px;
  color: #8890AB;
  text-align: center;
  margin-top: 4px;
}

/* =============================================================
   MOBILE — headings max-width: 768px
   ============================================================= */
@media (max-width: 768px) {
  h1, .hero__title { font-size: 3rem; }
  h2, .nova-forma__title, .etapas__title, .sobre__title, .cta__text, .footer__tagline { font-size: 2.5rem; }
  h3, .svc-card__title, .etapa-card__title, .footer__col-title { font-size: 1.5rem; }
}

/* =============================================================
   TABLET — 768px+
   ============================================================= */
@media (min-width: 768px) {
  :root {
    --section-pad-x: 40px;
    --section-pad-y: 80px;
  }

  /* Header */
  .hamburger { display: none; }
  .nav { display: flex !important; }

  /* Hero */
  .hero__meta {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }
  .hero__meta .btn { flex-shrink: 0; }

  /* Service cards: 2×2 grid on tablet */
  .cards-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: unset;
  }
  .svc-card {
    border: 2px solid var(--card-border);
  }
  .svc-card + .svc-card { border-top: 2px solid var(--card-border); }
  /* Remove right border on 2nd col */
  .svc-card:nth-child(even) { border-right: 2px solid var(--card-border); }
  .svc-card--featured { border: none; }

  /* Uma nova forma */
  .nova-forma__header {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }
  .nova-forma__title-col { flex: 0 0 54%; }
  .nova-forma__desc-col  { flex: 0 0 42%; }

  /* Carousel: 2 cards */
  .etapa-card { width: calc((100% - 16px) / 2); }

  /* Sobre header */
  .sobre__header {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }
  .sobre__title-col, .sobre__desc-col { flex: 1; }

  /* Footer */
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer__tagline { max-width: 55%; }
  .footer__contacts { flex-direction: column; gap: 32px; }

  /* Copyright */
  .copyright__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Modal */
  .modal-overlay { padding: 40px; }
}

/* =============================================================
   DESKTOP — 1024px+
   ============================================================= */
@media (min-width: 1024px) {
  :root {
    --section-pad-x: 80px;
    --section-pad-y: 100px;
  }

  /* Hero */
  .hero { padding-top: 100px; }

  /* Service cards: 4-across flex row, centered — featured projects both directions */
  .cards-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    grid-template-columns: unset;
    padding-bottom: 10%;
  }

  /* Reset grid overrides */
  .svc-card {
    flex: 319;
    height: 340px;
    min-height: unset;
    border: none;
    border-top: 2px solid var(--card-border);
    border-bottom: 2px solid var(--card-border);
    border-left: none;
    border-right: none;
  }
  .svc-card + .svc-card { border-top: 2px solid var(--card-border); }

  .svc-card--first {
    border-left: 2px solid var(--card-border);
    border-radius: 12px 0 0 12px;
  }
  .svc-card--last {
    border-right: 2px solid var(--card-border);
    border-radius: 0 12px 12px 0;
  }

  /* Right-border separators between cards (except featured) */
  .svc-card:not(.svc-card--featured):not(.svc-card--last) {
    border-right: 2px solid var(--card-border);
  }

  /* Featured card: taller, gradient, projects above AND below regular cards */
  .svc-card--featured {
    flex: 356;
    height: 440px;
    border-radius: 12px;
    border: none;
    padding: 48px 40px;
    justify-content: space-between;
    margin-top: -50px;
    margin-bottom: -50px;
  }
  .svc-card--featured .svc-card__body { margin-top: 0; }

  /* Carousel: 3 cards */
  .etapa-card { width: calc((100% - 32px) / 3); }

  /* Uma nova forma image */
  .nova-forma__image { max-height: 404px; }

  /* Sobre card */
  .sobre__card { min-height: 500px; }
  .sobre__card-img { min-height: 500px; }
  .sobre__card-overlay { padding: 64px; }

  /* CTA padding */
  .cta { padding: 120px 0; }
}
