/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --accent-green: #0a9b3d;
  --accent-light-green: #4ade80;
  --accent-blue: #0ea5e9;
  --font-main: 'Inter', -apple-system, sans-serif;
  --border-color: rgba(255, 255, 255, 0.1);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
}

body {
  overflow-x: hidden;
  width: 100%;
}

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

/* Typography settings representing 1440px base */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  position: relative;
}

/* --- HEADER --- */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  background: linear-gradient(to bottom, rgba(13, 13, 13, 1) 0%, rgba(13, 13, 13, 0) 100%);
  padding: 30px 0;
  display: flex;
  justify-content: center;
  height: auto;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 0 40px;
  height: auto;
  min-height: 0;
  max-height: none;
}

nav a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #aeaeae;
  margin: 0 20px;
  transition: color 0.2s;
}

nav a:hover {
  color: #fff;
}

/* Logo CSS construction for sharp vector feel */
.logo-text {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 15px;
  /* space for squares */
}

.logo-text .alta {
  font-weight: 600;
}

.logo-text .brands {
  font-weight: 300;
}

.logo-squares {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
}

.sq-green {
  width: 8px;
  height: 8px;
  background-color: var(--accent-light-green);
  margin-bottom: 2px;
}

.sq-blue {
  width: 8px;
  height: 8px;
  background-color: var(--accent-blue);
  align-self: flex-end;
}

.logo {
  display: flex;
  align-items: center;
  height: auto;
  overflow: hidden;
}

#header-logo-crop {
  display: block;
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* HEADER PILL STATE (SCROLL ONLY — NO HOVER) */
#main-header {
  z-index: 9999;
}

#main-header.pill-active {
  padding: 20px 0;
  background: transparent;
}

/* Ativa o pill SOMENTE via JS (classe pill-active) */
#main-header.pill-active .header-content {
  max-width: 680px;
  padding: 12px 30px;
  border-radius: 50px;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Ajuste do “quadradinho” SOMENTE quando pill-active */
#main-header.pill-active .logo-squares {
  transform: scale(0.65);
  transform-origin: top right;
}

#main-header.pill-active .logo-text {
  font-size: 24px;
}

#main-header.pill-active .logo-squares {
  transform: scale(0.65);
  transform-origin: top right;
}

#main-header.pill-active nav a {
  font-size: 11px;
  margin: 0 12px;
}

/* --- MOBILE MENU BASE (Hidden on Desktop) --- */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10001;
  /* Above the overlay */
  width: 32px;
  height: 24px;
  position: relative;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: white;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) {
  top: 0px;
}

.mobile-menu-btn span:nth-child(2) {
  top: 11px;
}

.mobile-menu-btn span:nth-child(3) {
  top: 22px;
}

/* Open State (Cross) */
.menu-open .mobile-menu-btn span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.menu-open .mobile-menu-btn span:nth-child(2) {
  opacity: 0;
  left: -20px;
}

.menu-open .mobile-menu-btn span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-open .mobile-menu-overlay {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.mobile-link {
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  text-transform: uppercase;
}

.mobile-link:hover {
  color: var(--accent-green);
}

body.lock-scroll {
  overflow: hidden;
}

/* --- HERO SECTION --- */
#hero {
  padding-top: 180px;
  padding-bottom: 60px;
}

.hero-headline {
  text-align: center;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.headline-dash {
  font-weight: 300;
}

/* Override image handling: since we only have full page comps, we must crop them using clip-path or absolute positioning */

/* hide the img tag, we'll use background */

/* already in the image composite */

/* actually, the button is part of the image, but we need it clickable? */
/* Wait, the prompt implies "Reconstruct with MAXIMUM fidelity". If I use background cropping, text is rasterized. 
   "Use semantic, clean HTML + CSS". I should NOT just crop images for text blocks.
   I need to build the hero media block. I don't have separated assets.
   I will use the full comp as a background and overlay the exact text, or maybe crop just the left part of the image?
   Let's rebuild the green/blue right pane via CSS.
*/
.hero-media-block {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: 0px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}

.hero-image-cropped {
  width: 100%;
  height: auto;
  display: block;
  z-index: 1;
}

.hero-glass-pane {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 56px;
  transform: translateY(-50%);
  max-width: 620px;
  padding: 28px 32px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-glass-pane p {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 200;
  /* Regular */
  ;
}

/* Let's fall back to a styled approach. Since I don't have the clean photo, I will use background image of the full hero comp cropped to the image bounds for the photo part. */

/* Re-overlay the button precisely so it's semantic */
#hero-btn {
  display: flex;
  position: absolute;
  bottom: 30px;
  left: 40px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 40px;
  padding: 12px 24px;
  font-size: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: background 0.3s;
  z-index: 3;
}

#hero-btn svg {
  margin-left: 10px;
}

#hero-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border-color);
}

/* --- MANIFESTO SECTION --- */
#manifesto {
  padding: 100px 0;
  text-align: center;
}

.manifesto-text {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

/* --- APPLE QUOTE SECTION --- */
#apple-case {
  padding: 60px 0 100px;
}

.apple-graphic {
  width: 100%;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #000;
  display: flex;
}

.apple-video-bg {
  width: 100%;
  height: auto;
  display: block;
}

.apple-subtitle {
  font-size: 18px;
  color: var(--accent-green);
  margin-top: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.apple-quote {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 40px;
}

/* --- PILLARS SECTION --- */
#o-que-fazemos {
  background: #fdfdfd;
  color: #000;
  padding: 80px 0;
}

#o-que-fazemos .section-title {
  font-size: 42px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 20px;
}

.title-underline {
  width: 200px;
  height: 3px;
  background-color: var(--accent-green);
  margin: 0 auto 60px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #0a0a0a;
  gap: 2px;
  /* For the divider lines */
  border: 2px solid #0a0a0a;
}

.pillar-card-wrapper {
  perspective: 1200px;
  position: relative;
  border-right: 1px solid #222;
}

.pillar-card-wrapper:last-child {
  border-right: none;
}

.pillar-card {
  background: #0a0a0a;
  color: #fff;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease, box-shadow 0.5s ease;
  transform-style: preserve-3d;
}

.pillar-card-wrapper:hover .pillar-card {
  background-color: var(--accent-green);
  transform: rotateY(360deg);
  z-index: 10;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.pillar-number {
  font-size: 48px;
  color: var(--accent-green);
  font-weight: 500;
  margin-bottom: 15px;
  transition: color 0.5s ease;
}

.pillar-title {
  font-size: 18px;
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 20px;
  min-height: 44px;
  transition: color 0.5s ease;
}

.pillar-list,
.pillar-sublist {
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  color: #eaeaea;
  flex-grow: 1;
}

.pillar-list li,
.pillar-sublist li {
  margin-bottom: 10px;
}

.pillar-link {
  color: var(--accent-green);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  margin: 30px 0;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: color 0.5s ease;
}

.pillar-card-wrapper:hover .pillar-number,
.pillar-card-wrapper:hover .pillar-title,
.pillar-card-wrapper:hover .pillar-link {
  color: #000;
}

.pillar-link svg {
  width: 18px;
  height: 18px;
  margin-left: 8px;
}

/* --- PILLAR ACCORDION --- */
.pillar-accordion-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease, padding-top 0.4s ease;
}

.pillar-accordion-content.is-open {
  max-height: 800px;
  /* arbitrary large height for smooth transition */
  opacity: 1;
}

/* Adjust the sublist in accordion to match the card style with a divider */
.pillar-sublist-data .pillar-sublist {
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
  padding: 0;
  margin: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}

.pillar-sublist-data .pillar-sublist li {
  margin-bottom: 10px;
}

/* --- PROJECTS & FORM SECTION --- */

/* ===== PROJETOS (NOVO) ===== */
#projetos {
  background: #fff;
  color: #000;
  padding: 80px 0;
}

#projetos .section-title {
  font-size: 36px;
  font-weight: 400;
  text-align: left;
  margin-left: 80px;
  margin-bottom: 5px;
}

#projetos .title-underline {
  margin: 0 0 40px 80px;
  width: calc(100% - 160px);
}

.projects-grid {
  width: 100%;
}

/* container geral do bloco de imagens */
.projects-img-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  /* mantém alinhamento com o título */
  box-sizing: border-box;
}

/* imagem topo (PagPop) */
.projects-hero {
  width: 100%;
  aspect-ratio: 1440 / 484;
  object-fit: cover;
  display: block;
}

/* grid das 6 imagens */
.projects-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

/* imagens do grid */
.project-thumb {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: scale(1);
  transition: transform 260ms ease;
}

/* ===== PROJETOS: links clicáveis + hover (zoom leve + label) ===== */
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.project-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

/* hover no CARD (não no img) */
.project-card:hover .project-thumb {
  transform: scale(1.04);
  transition: transform 260ms ease;
}

.project-card:hover .project-label {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {

  /* Mobile: não existe hover, então deixa o nome sempre visível */
  .project-label {
    opacity: 1;
    transform: none;
  }

  /* Mobile: remove o zoom do hover (touch não tem hover real) */
  .project-card:hover .project-thumb {
    transform: none;
  }
}

/* botão + Projetos */
.projects-action {
  text-align: right;
  padding: 20px 80px 40px;
}

.btn-projects {
  font-size: 24px;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn-projects svg {
  width: 24px;
  height: 24px;
  margin-left: 10px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  #projetos .section-title {
    margin-left: 40px;
  }

  #projetos .title-underline {
    margin-left: 40px;
    width: calc(100% - 80px);
  }

  .projects-img-container {
    padding: 0 40px;
  }

  .projects-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-action {
    padding: 20px 40px 40px;
  }
}

@media (max-width: 768px) {
  #projetos {
    padding: 60px 0;
  }

  #projetos .section-title {
    margin-left: 20px;
  }

  #projetos .title-underline {
    margin-left: 20px;
    width: calc(100% - 40px);
  }

  .projects-img-container {
    padding: 0 20px;
  }

  .projects-thumbs {
    grid-template-columns: 1fr;
  }

  .projects-action {
    padding: 20px 20px 40px;
    text-align: left;
  }
}

/* Form Section */
.form-section {
  background: #111114;
  padding: 100px 0;
}

.form-container {
  max-width: 1440px;
  padding: 0 80px;
  margin: 0 auto;
}

.form-title {
  text-align: center;
  color: var(--accent-green);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 40px;
}

.form-box {
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* very subtle */
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: #151518;
  position: relative;
}

/* Custom inner border matching ref design */
.form-box::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid rgba(10, 155, 61, 0.3);
  /* green tint border */
  border-radius: 6px;
  pointer-events: none;
}

.form-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 40px;
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 8px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 12px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent-green);
}

.input-group textarea {
  height: 120px;
  resize: vertical;
}

.form-footer-text {
  text-align: center;
  font-size: 14px;
  color: #aaa;
  margin: 30px 0 20px;
}

.btn-submit {
  display: block;
  width: 220px;
  margin: 0 auto;
  background: var(--accent-green);
  color: #fff;
  border: none;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #087d31;
}

.form-spam-text {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 15px;
}

/* --- FOOTER SECTION --- */
#main-footer {
  background: #111114;
  border-top: 1px solid #222;
  padding: 40px 80px 80px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: 1440px;
  margin: 0 auto;
}

.footer-left {
  font-size: 14px;
  color: #aaa;
}

.footer-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo .logo-text,
.footer-logo {
  display: flex;
  justify-content: center;
}

.footer-logo {
  font-size: 80px;
  /* huge logo */
  font-weight: 500;
  letter-spacing: -0.05em;
  position: relative;
  padding-right: 30px;
  transform: scaleY(1);
  transform-origin: bottom center;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s;
  /* for stretch animation */
}

.footer-logo .alta {
  font-weight: 600;
}

.footer-logo .brands {
  font-weight: 300;
}

.footer-logo .logo-squares {
  transform: scale(2);
  top: 5px;
  right: 5px;
}

.footer-by {
  font-size: 28px;
  font-weight: 300;
  color: #fff;
  margin-top: -10px;
  letter-spacing: -0.02em;
}

.footer-right {
  width: 120px;
}

.altagroup-logo-cropped {
  width: 100%;
  /* We don't have the clean logo, but we can do our best with background crop or assume user will slice later */
}


/* Responsive Layout Adjustments */
@media (max-width: 1024px) {

  /* Hide Desktop Nav */
  .nav-left,
  .nav-right {
    display: none !important;
  }

  /* Show Hamburger */
  .mobile-menu-btn {
    display: block;
  }

  /* Reset Header shape if Pill */
  #main-header.pill-active .header-content,
  #main-header .header-content {
    justify-content: space-between;
    padding: 15px 30px !important;
  }

  /* Center the Logo gracefully on mobile left while button goes right */
  .logo {
    margin-right: auto;
  }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillar-card {
    border-bottom: 1px solid #222;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
  }

  .footer-right,
  .footer-left {
    text-align: center;
    width: 100%;
  }

  .form-container {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  #main-header.pill-active .header-content,
  #main-header .header-content {
    width: 85% !important;
    margin: 15px auto !important;
    padding: 12px 20px !important;
  }

  .hero-media-block {
    margin-top: 0px !important;
  }
  
  #manifesto {
    padding: 30px 0 !important;
  }

  #apple-case {
    padding: 40px 0 50px !important;
  }

  .apple-quote {
    margin-top: 20px !important;
  }

  #hero {
    padding: 150px 0 20px !important;
  }

  .hero-headline {
    margin-bottom: 0px !important;
  }

  .hero-media-block {
    margin-top: 0px !important;
  }

  #o-que-fazemos {
    padding-bottom: 40px !important;
  }

  #projetos {
    padding: 40px 0 !important;
  }

  .form-section {
    padding: 30px 0 !important;
  }

  #main-footer {
    padding: 40px 20px 40px !important;
  }

  .footer-center-logo {
    max-width: 250px !important;
  }

  .footer-right {
    display: none !important;
  }

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

  .pillar-card {
    border-right: none;
  }

  .hero-glass-pane {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    margin: 0 auto;
    margin-top: 40px;
  }

  .hero-glass-pane p {
    font-size: 23px;
    letter-spacing: -0.01em;
    padding: 0 5px;
  }

  .manifesto-text {
    font-size: 24px;
    text-align: left;
  }

  #hero-btn {
    bottom: 20px;
    left: 20px;
    background: var(--accent-green);
    color: #000;
    border: none;
    font-weight: 600;
    padding: 16px 28px;
  }

  #hero-btn svg {
    stroke: #000;
  }

  .title-underline {
    width: 60px;
    height: 4px;
    margin: 10px auto 40px;
  }
}

/* Footer logos (images) */
.footer-center-logo {
  display: block;
  max-width: 320px;
  /* ajuste fino se quiser */
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: fill;
  /* changed from contain so it physically stretches visually */
  transform: scaleY(1);
}

.footer-right-logo {
  display: block;
  width: 110px;
  /* ajuste fino se quiser */
  height: auto;
  object-fit: contain;
}

/* Garantia extra: impede “crop/zoom” herdado */
.footer-right img,
.footer-center img:not(.footer-center-logo) {
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
}

/* Footer center logo: basic style, transform manipulated directly via scroll in script.js */
#main-footer .footer-center-logo {
  display: inline-block;
  transform: scaleY(1);
  transform-origin: bottom center;
  /* Very smooth transition so the snap-back to scaleY(1) is pleasant but fast enough to react to scroll */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* garante que o footer tenha "área" real e receba hover */
#main-footer {
  position: relative;
  z-index: 2;
  pointer-events: auto;

  width: 100%;
  display: block;

  /* ISSO é o que faz o hover funcionar no "footer inteiro" */
  padding: 80px 0;
  /* ajuste se quiser mais/menos área */
}

#main-footer .footer-container {
  width: 100%;
}