/* ============================================
   João Casanova — Site Portfólio
   Paleta: azul-marinho + laranja escuro
============================================ */

:root {
  --navy-900: #071531;
  --navy-800: #0a1e3f;
  --navy-700: #0f2a52;
  --navy-600: #173a6e;
  --orange-600: #c9601c;
  --orange-500: #e07b34;
  --orange-400: #ff8a3d;
  --white: #ffffff;
  --gray-50: #f6f7f9;
  --gray-100: #eef0f3;
  --gray-400: #9aa3af;
  --gray-600: #5b6472;
  --gray-800: #232a33;

  --font-heading: 'Poppins', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 16px;
  --shadow-soft: 0 10px 30px rgba(10, 30, 63, 0.08);
  --shadow-strong: 0 20px 50px rgba(10, 30, 63, 0.18);

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Fundo tecnológico animado fixo, atrás de todo o site */
#bgCanvasGlobal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.site-header,
.hero,
.section,
.site-footer {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy-800);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

p { margin: 0 0 1em; color: var(--gray-600); }

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

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

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

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 21, 49, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.logo span { color: var(--orange-400); }

.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  border-bottom-color: var(--orange-400);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at top right, rgba(23, 58, 110, 0.55) 0%, rgba(10, 30, 63, 0.35) 45%, rgba(7, 21, 49, 0.15) 100%);
  overflow: hidden;
  padding-top: 72px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 80px;
}

.eyebrow {
  color: var(--orange-400);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.hero-headline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  text-align: left;
}

.hero-name {
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
}

.hero-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  font-weight: 600;
  text-align: left;
}

.hero-formula-item {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-plus {
  color: var(--orange-400);
  font-weight: 700;
}

.hero-tagline {
  color: var(--orange-400);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
}

.hero-sub {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--orange-600);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(201, 96, 28, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201, 96, 28, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}

.btn-ghost:hover { border-color: var(--white); transform: translateY(-2px); }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.photo-frame {
  width: 260px;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  background: var(--navy-800);
}

.photo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.robot-wrap {
  position: absolute;
  bottom: -10px;
  right: -10px;
  cursor: pointer;
  display: block;
}

.robot-mascot {
  display: block;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.35));
  animation: robot-float 4s ease-in-out infinite;
}

@keyframes robot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.robot-antenna-light {
  animation: antenna-glow 1.8s ease-in-out infinite;
  transform-origin: 75px 14px;
}

@keyframes antenna-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.robot-pupil {
  animation: robot-blink 4.5s infinite;
  transform-origin: center;
}

@keyframes robot-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.15); }
}

.robot-arm-left { animation: arm-idle 3.2s ease-in-out infinite; transform-origin: 22px 118px; }
.robot-arm-wave { animation: arm-wave-hello 6s ease-in-out infinite; transform-origin: 128px 118px; }

@keyframes arm-idle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}

@keyframes arm-wave-hello {
  0%, 62%, 100% { transform: rotate(0deg); }
  67% { transform: rotate(-28deg); }
  72% { transform: rotate(-6deg); }
  77% { transform: rotate(-28deg); }
  82% { transform: rotate(-6deg); }
  87% { transform: rotate(-20deg); }
}

/* Balão de fala do assistente virtual */
.robot-bubble {
  position: absolute;
  bottom: 165px;
  right: 10px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.robot-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 28px;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: rotate(45deg);
}

.robot-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 1.3rem;
  animation: bounce 2s infinite;
  z-index: 2;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ===== PLACEHOLDER BOXES ===== */
.placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  padding: 20px;
}

.placeholder-icon { font-size: 2rem; }
.placeholder-text { font-size: 0.85rem; line-height: 1.4; }
.placeholder-text small { opacity: 0.75; }

.section .placeholder-box {
  background: var(--gray-50);
  border-color: #d7dce3;
  color: var(--gray-400);
}

.placeholder-box.small {
  min-height: 110px;
  padding: 14px;
}

/* ===== SECTIONS ===== */
.section {
  padding: 96px 0;
  background: rgba(246, 247, 249, 0.94);
  text-align: left;
}

.section-alt { background: rgba(238, 240, 243, 0.94); }

.section .container,
.section h1, .section h2, .section h3,
.section p, .section ul, .section ol, .section li {
  text-align: left;
}

.section-tag {
  color: var(--orange-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.section-tag.light { color: var(--orange-400); }

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 28px;
}

.section-title.light { color: var(--white); }

.section-lead {
  max-width: 640px;
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.section-lead.light { color: rgba(255,255,255,0.78); }

/* ===== BANNER TECNOLÓGICO ===== */
.tech-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-900);
}

.tech-banner canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.tech-banner-inner {
  position: relative;
  z-index: 1;
  text-align: left;
}

.tech-banner .section-tag,
.tech-banner .section-title,
.tech-banner .section-lead {
  margin-bottom: 12px;
}

.tech-banner .section-lead { margin-bottom: 0; }

/* ===== SOBRE ===== */
.sobre-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.sobre-text-justify p {
  text-align: justify;
  text-justify: inter-word;
}

.sobre-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.sobre-tags li {
  background: var(--navy-800);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== TIMELINE ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #dde2ea;
}

.timeline-item {
  position: relative;
  padding-left: 42px;
  padding-bottom: 36px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--orange-600);
}

.timeline-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.timeline-content h3 { margin-bottom: 6px; font-size: 1.1rem; }
.timeline-content p { margin: 0; }

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  gap: 24px;
}

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

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-100);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); }

.card-icon { font-size: 1.8rem; display: block; margin-bottom: 12px; }

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

.project-card .placeholder-box.small { margin-bottom: 16px; width: 100%; }

.card-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--orange-600);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== PHOTO GRID ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.photo-grid-item {
  min-height: 110px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  display: block;
}

/* ===== EMPRESAS / REFERÊNCIAS — selos circulares ===== */
.circle-badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 8px;
}

.circle-badge {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  box-shadow: var(--shadow-strong);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.circle-badge:hover {
  transform: translateY(-4px);
}

.circle-badge p {
  margin: 0;
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.circle-badge-navy {
  background: radial-gradient(circle at 30% 25%, var(--navy-600), var(--navy-900));
}

.circle-badge-orange {
  background: radial-gradient(circle at 30% 25%, var(--orange-500), var(--orange-600));
}

/* ===== ÍCONES SOCIAIS (cores do site) ===== */
.social-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

.social-icon.mark-navy {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-900));
}

.social-icon.mark-orange {
  background: linear-gradient(135deg, var(--orange-600), var(--orange-400));
}

.social-icon-letters {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  font-style: italic;
}

/* ===== CONTATO ===== */
.section-contact {
  background: linear-gradient(160deg, rgba(7, 21, 49, 0.55) 0%, rgba(15, 42, 82, 0.4) 100%);
  overflow: hidden;
}

.section-contact .container { position: relative; z-index: 2; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-form label {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 14px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange-400);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.4); }

.contact-form .btn { margin-top: 22px; align-self: flex-start; }

.form-status {
  color: var(--orange-400);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  background: rgba(255,255,255,0.1);
  transform: translateX(4px);
}

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(7, 21, 49, 0.92);
  padding: 24px 0;
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  margin: 0;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 20px; }
  .hero-visual { order: -1; min-height: 260px; }
  .sobre-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .three-cols { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open { max-height: 400px; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .main-nav li { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-nav a { display: block; padding: 14px 0; }

  .menu-toggle { display: flex; }

  .three-cols { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .tech-banner { min-height: 240px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .circle-badge { width: 170px; height: 170px; padding: 18px; }
  .circle-badge p { font-size: 0.82rem; }
}
