:root {
  --bg-page: #F6F5F9;
  --text-dark: #0D0D15;
  --text-body: #35353C;
  --text-muted: #979797;
  --accent-blue: #2212DB;
  --accent-green: #35C54F;
  --text-on-accent: #F6F5F9;
  --font-main: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Proportional desktop unit: equals 1px at 1920x1080 and scales fluidly on laptop/smaller screens */
  --u: clamp(0.62px, min(0.0520833vw, 0.0925926dvh), 1.04px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background-color: var(--bg-page);
  color: var(--text-dark);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Pre-animation shield to avoid flash before GSAP initializes */
.has-gsap .brand-avatar,
.has-gsap .brand-mark,
.has-gsap .hero-title-part,
.has-gsap .hero-subtitle,
.has-gsap .cta-btn,
.has-gsap .social-link,
.has-gsap .site-footer {
  opacity: 0;
  visibility: hidden;
}

/* ===== Liquid Glass Fullscreen Intro Overlay ===== */
body.is-intro-active {
  overflow: hidden;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-page);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.intro-fallback-logo {
  width: min(140px, 34vw);
  height: min(140px, 34vw);
  object-fit: contain;
}

/* ===== Page Shell (Desktop 1920x1080 proportional) ===== */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px calc(32 * var(--u));
}

/* Vertical rhythm matching the reference composition across all desktop viewports */
.spacer-top {
  flex: 1.45 0 calc(36 * var(--u));
}

.spacer-middle {
  flex: 1 0 calc(44 * var(--u));
}

/* ===== Hero Section ===== */
.hero {
  width: 100%;
  max-width: calc(1120 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(60 * var(--u));
}

.hero-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Avatar + Brand Mark Lockup (252 x 131.44) */
.brand-lockup {
  position: relative;
  width: calc(252 * var(--u));
  height: calc(131.44 * var(--u));
  flex-shrink: 0;
}

.brand-mark {
  position: absolute;
  left: 47.8413%;
  top: 0;
  width: 52.1587%;
  height: 100%;
  z-index: 1;
  user-select: none;
}

.brand-avatar {
  position: absolute;
  left: -3.3755%;
  top: -6.4716%;
  width: 58.9098%;
  height: 112.9432%;
  max-width: none;
  z-index: 2;
  user-select: none;
}

/* Title */
.hero-title {
  width: 100%;
  margin-top: calc(52 * var(--u));
  font-weight: 700;
  font-size: calc(85.85 * var(--u));
  line-height: 1.12;
  text-align: center;
  color: var(--text-dark);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.hero-title-part {
  display: inline-block;
  will-change: transform, opacity, filter;
}

.hero-title-accent {
  color: var(--accent-blue);
}

/* Subtitle */
.hero-subtitle {
  width: 100%;
  max-width: calc(747 * var(--u));
  margin-top: calc(32 * var(--u));
  font-weight: 400;
  font-size: calc(40 * var(--u));
  line-height: 1.28;
  text-align: center;
  color: var(--text-body);
}

/* ===== CTA Buttons ===== */
.cta-group {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: calc(20 * var(--u));
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  will-change: transform, opacity;
}

.cta-btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
}

.cta-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: calc(24 * var(--u));
  line-height: 1.2;
  color: var(--text-on-accent);
  white-space: nowrap;
  will-change: box-shadow;
}

.cta-icon {
  flex-shrink: 0;
  will-change: transform;
}

/* Orçamento Button */
.cta-btn--orcamento .cta-pill {
  width: calc(361 * var(--u));
  height: calc(70 * var(--u));
  padding: calc(20 * var(--u)) calc(40 * var(--u));
  background-color: var(--accent-green);
  border-radius: 999px;
}

.cta-btn--orcamento .cta-icon {
  width: calc(70 * var(--u));
  height: calc(70 * var(--u));
}

/* Página de Links Button */
.cta-btn--links .cta-pill {
  width: calc(363 * var(--u));
  height: calc(74 * var(--u));
  padding: calc(12 * var(--u)) calc(20 * var(--u));
  background-color: var(--accent-blue);
  border-radius: 999px;
}

.cta-btn--links .cta-icon {
  width: calc(74 * var(--u));
  height: calc(74 * var(--u));
}

/* ===== Bottom Section: Social + Footer ===== */
.bottom-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(46 * var(--u));
}

/* Social Links Row */
.social-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: calc(33.74 * var(--u));
  min-height: calc(59.04 * var(--u));
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: calc(16.87 * var(--u));
  color: var(--text-body);
  will-change: transform, opacity;
}

.social-link + .social-link {
  border-left: 1px solid var(--text-muted);
  padding-left: calc(14 * var(--u));
}

.social-link:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.social-label {
  font-weight: 700;
  font-size: max(14px, calc(20.55 * var(--u)));
  line-height: 1.2;
  white-space: nowrap;
  display: inline-block;
  will-change: transform;
}

.social-icon {
  width: calc(57 * var(--u));
  height: calc(35 * var(--u));
  flex-shrink: 0;
  will-change: transform;
}

/* Footer Legal */
.site-footer {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px calc(21 * var(--u));
  font-weight: 400;
  font-size: max(12px, calc(16 * var(--u)));
  line-height: 1.2;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Mobile Layout (440 x 956 proportional) ===== */
@media (max-width: 768px) {
  :root {
    /* Equals 1px at 440x956 and adapts cleanly to smaller phones like 375x812 or 360x740 */
    --um: clamp(0.78px, min(0.2272727vw, 0.1046025dvh), 1.02px);
  }

  .page {
    padding: 0 16px calc(26 * var(--um));
  }

  .spacer-top {
    flex: 1.15 0 calc(32 * var(--um));
  }

  .spacer-middle {
    flex: 1 0 calc(36 * var(--um));
  }

  /* Hero */
  .hero {
    max-width: min(calc(360 * var(--um)), 100%);
    gap: calc(38 * var(--um));
  }

  .hero-content {
    max-width: calc(345 * var(--um));
    gap: 0;
  }

  /* Brand Lockup (189.74 x 98.96) */
  .brand-lockup {
    width: calc(189.74 * var(--um));
    height: calc(98.96 * var(--um));
  }

  /* Title */
  .hero-title {
    max-width: calc(345 * var(--um));
    margin-top: calc(36 * var(--um));
    font-size: calc(48.17 * var(--um));
    line-height: 1.15;
    letter-spacing: -0.015em;
    white-space: normal;
  }

  /* Subtitle */
  .hero-subtitle {
    max-width: calc(335 * var(--um));
    margin-top: calc(22 * var(--um));
    font-size: calc(20 * var(--um));
    line-height: 1.28;
  }

  /* CTA Column */
  .cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: calc(15.06 * var(--um));
  }

  .cta-btn {
    width: 100%;
  }

  .cta-pill {
    flex: 1 1 auto;
    font-size: calc(18.07 * var(--um));
  }

  .cta-btn--orcamento .cta-pill {
    width: auto;
    height: calc(52.71 * var(--um));
    padding: calc(14 * var(--um)) calc(24 * var(--um));
    border-radius: 999px;
  }

  .cta-btn--orcamento .cta-icon {
    width: calc(52.71 * var(--um));
    height: calc(52.71 * var(--um));
  }

  .cta-btn--links .cta-pill {
    width: auto;
    height: calc(55.72 * var(--um));
    padding: calc(9 * var(--um)) calc(15 * var(--um));
    border-radius: 999px;
  }

  .cta-btn--links .cta-icon {
    width: calc(55.72 * var(--um));
    height: calc(55.72 * var(--um));
  }

  /* Bottom Section */
  .bottom-section {
    gap: calc(64 * var(--um));
  }

  /* Social Links Column (symmetrical hairlines matching mobile reference) */
  .social-nav {
    width: calc(237 * var(--um));
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .social-link {
    justify-content: space-between;
    padding: calc(15 * var(--um)) 0;
    gap: 12px;
  }

  .social-link:first-child {
    padding-top: calc(6 * var(--um));
  }

  .social-link:last-child {
    padding-bottom: calc(6 * var(--um));
  }

  .social-link + .social-link {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--text-muted);
  }

  .social-label {
    font-size: calc(15.48 * var(--um));
  }

  .social-icon {
    width: calc(42.92 * var(--um));
    height: calc(26.35 * var(--um));
  }

  /* Footer Legal */
  .site-footer {
    gap: 6px calc(15.81 * var(--um));
    font-size: max(11px, calc(12.05 * var(--um)));
  }
}
