/* ============================================================
   Gerador de Avatares & Cards — Marinas por SP
   Marina Helou (4044) & Marina Bragante (40444)
   ============================================================ */

/* ===========================================================
   DESIGN TOKENS — Identidade Oficial Marinas por SP
   =========================================================== */
:root {
  --verde-escuro: #506324;
  --verde-dark: #3A491A;
  --verde-amarelado: #CACB60;
  --verde-dourado-claro: #D4D576;
  --laranja: #F28919;
  --laranja-hover: #D9750E;
  --bege-fundo: #FEF6D5;
  --creme-card: #F8F1CD;
  --creme-border: #E4DCB0;
  --branco: #FFFFFF;
  --cinza-texto: #2C3518;
  --preto: #11140A;

  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bege-fundo);
  color: var(--cinza-texto);
  overflow-x: hidden;
  line-height: 1.5;
}

img, svg {
  vertical-align: middle;
}

/* ---------- Header Fixo ---------- */
.dc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(254, 246, 213, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(80, 99, 36, 0.15);
  padding: 10px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(80, 99, 36, 0.06);
}

.dc-header.is-scrolled {
  background-color: rgba(80, 99, 36, 0.98);
  border-bottom: 2px solid var(--laranja);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dc-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dc-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.dc-header__logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dc-header__logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

.dc-header.is-scrolled .dc-header__logo {
  filter: brightness(0) invert(1);
  height: 32px;
}

.dc-header__divider {
  width: 1.5px;
  height: 24px;
  background-color: rgba(80, 99, 36, 0.3);
}

.dc-header.is-scrolled .dc-header__divider {
  background-color: rgba(254, 246, 213, 0.4);
}

/* Navegação Desktop */
.dc-header__nav-desktop {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dc-header__link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--verde-escuro);
  transition: color 0.2s ease;
}

.dc-header.is-scrolled .dc-header__link {
  color: var(--bege-fundo);
}

.dc-header__link:hover {
  color: var(--laranja);
}

.dc-header.is-scrolled .dc-header__link:hover {
  color: var(--verde-amarelado);
}

.dc-header__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--laranja);
  color: var(--branco) !important;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--verde-escuro);
  box-shadow: 0 4px 12px rgba(242, 137, 25, 0.25);
  transition: all 0.25s ease;
}

.dc-header__cta-btn:hover {
  background-color: var(--laranja-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(242, 137, 25, 0.35);
}

/* Hambúrguer (Mobile) */
.dc-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  z-index: 1002;
}

.dc-header__toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--verde-escuro);
  border-radius: 2px;
  margin: 3px 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, background-color 0.25s ease;
}

.dc-header.is-scrolled .dc-header__toggle span {
  background-color: var(--bege-fundo);
}

.dc-header.is-open .dc-header__toggle span {
  background-color: var(--bege-fundo) !important;
}

.dc-header.is-open .dc-header__toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.dc-header.is-open .dc-header__toggle span:nth-child(2) {
  opacity: 0;
}

.dc-header.is-open .dc-header__toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Overlay Mobile */
.dc-header__mobile-menu {
  position: fixed;
  inset: 0;
  background: radial-gradient(135% 120% at 100% 0%, #647b2e 0%, var(--verde-escuro) 60%, var(--verde-dark) 100%);
  color: var(--bege-fundo);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1001;
}

.dc-header.is-open .dc-header__mobile-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dc-header__mobile-links {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dc-header__mobile-links a {
  color: var(--bege-fundo);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.dc-header__mobile-links a:hover {
  color: var(--laranja);
}

/* ===========================================================
   HERO DIAGRAMATION — Logo Coragem em Destaque Máximo
   =========================================================== */
.hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--bege-fundo);
  padding-top: 80px;
}

/* Container do Topo com as Fotos */
.hero-stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 0;
  position: relative;
  z-index: 10;
}

/* Grid Desktop */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}

/* Coluna Esquerda: Foto Marina Helou */
.hero-col--helou {
  display: flex;
  justify-content: flex-end;
  z-index: 12;
  margin-bottom: -15px;
}

.hero-photo-wrap--helou {
  width: 100%;
  max-width: 320px;
  height: 440px;
  position: relative;
}

.hero-photo-wrap--helou img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: drop-shadow(0 16px 24px rgba(80, 99, 36, 0.25));
  display: block;
}

/* Coluna Centro: Logo Coragem Grande, Título Discreto e CTA */
.hero-col--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 10px 42px;
  z-index: 20;
}

/* Logo Coragem pra Fazer Diferente Aumentado em Grande Destaque */
.hero-coragem-top {
  height: clamp(76px, 7vw, 105px);
  width: auto;
  max-width: 440px;
  object-fit: contain;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(80, 99, 36, 0.18));
}

/* Título Discreto */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.3vw, 26px);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--verde-escuro);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.hero-headline span {
  color: var(--laranja);
  display: inline;
}

.hero-lead {
  font-size: 14px;
  line-height: 1.45;
  color: var(--cinza-texto);
  max-width: 360px;
  margin: 0 auto 20px;
  font-weight: 500;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--laranja);
  color: var(--branco);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 13px 30px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(242, 137, 25, 0.35);
  border: 2px solid var(--verde-escuro);
  transition: all 0.25s ease;
}

.hero-btn:hover {
  background-color: var(--laranja-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(242, 137, 25, 0.45);
  color: var(--branco);
}

/* Coluna Direita: Foto Marina Bragante */
.hero-col--bragante {
  display: flex;
  justify-content: flex-start;
  z-index: 12;
  margin-bottom: -15px;
}

.hero-photo-wrap--bragante {
  width: 100%;
  max-width: 330px;
  height: 440px;
  position: relative;
}

.hero-photo-wrap--bragante img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: drop-shadow(0 16px 24px rgba(80, 99, 36, 0.25));
  display: block;
}

/* Faixa Verde com Logos Oficiais (Sem logo central) */
.hero-wave-band {
  position: relative;
  width: 100%;
  background-color: var(--verde-escuro);
  color: var(--bege-fundo);
  padding: 30px 20px 24px;
  z-index: 15;
  margin-top: -30px;
  border-bottom: 4px solid var(--laranja);
}

.hero-wave-svg {
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  width: 100%;
  height: 25px;
  pointer-events: none;
}

.hero-logos-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
}

.hero-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Marina Helou Logo */
.hero-logo-box--helou img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Marina Bragante Logo */
.hero-logo-box--bragante img {
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* Mobile Hero */
@media (max-width: 900px) {
  .hero-wrapper {
    padding-top: 72px;
  }
  
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  
  .hero-col--center {
    order: 1;
    padding: 10px 10px 18px;
  }
  
  .hero-coragem-top {
    height: 64px;
    max-width: 300px;
    margin-bottom: 12px;
  }
  
  .hero-headline {
    font-size: 21px;
  }
  
  .hero-lead {
    font-size: 13px;
    margin-bottom: 16px;
  }
  
  .hero-btn {
    font-size: 14px;
    padding: 12px 24px;
  }

  .hero-mobile-photos {
    order: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: -15px;
    z-index: 12;
  }
  
  .hero-col--helou, .hero-col--bragante {
    margin-bottom: 0;
  }
  
  .hero-photo-wrap--helou {
    max-width: 170px;
    height: 250px;
  }
  
  .hero-photo-wrap--bragante {
    max-width: 180px;
    height: 250px;
  }

  .hero-wave-band {
    margin-top: -15px;
    padding: 22px 16px 18px;
  }
  
  .hero-logos-container {
    flex-direction: row;
    justify-content: space-around;
    gap: 16px;
  }
  
  .hero-logo-box--helou img {
    height: 44px;
  }

  .hero-logo-box--bragante img {
    height: 56px;
  }
}

/* ---------- Grade de Modelos ---------- */
.modelos {
  background-color: var(--verde-escuro);
  padding: 60px 16px;
  border-bottom: 4px solid var(--laranja);
}

.modelos__titulo,
.editor__titulo {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 28px;
  padding: 12px 32px 10px;
  background-color: var(--bege-fundo);
  color: var(--verde-escuro);
  border-radius: 999px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 2px solid var(--laranja);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.modelos .row + .modelos__titulo {
  margin-top: 50px;
}

.modelos a {
  display: block;
  overflow: hidden;
  background-color: var(--bege-fundo);
  border-radius: 16px;
  padding: 10px;
  border: 2px solid var(--creme-border);
  transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 250ms ease, border-color 0.2s ease;
  text-decoration: none;
}

.modelos a:hover,
.modelos a:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  border-color: var(--laranja);
}

.modelos a:focus-visible {
  outline: 3px solid var(--laranja);
  outline-offset: 4px;
}

.modelos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background-color: var(--creme-card);
}

.modelos__card-caption {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--verde-escuro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===========================================================
   Seções de Editor
   =========================================================== */
.editor {
  width: 100%;
  padding: 64px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  scroll-margin-top: 80px;
  border-bottom: 2px solid rgba(80, 99, 36, 0.1);
}

.editor--verde {
  background-color: var(--verde-escuro);
  color: var(--bege-fundo);
}

.editor--bege {
  background-color: var(--bege-fundo);
  color: var(--verde-escuro);
}

.editor--creme {
  background-color: var(--creme-card);
  color: var(--verde-escuro);
}

.editor--oliva {
  background-color: #3f4e1d;
  color: var(--bege-fundo);
}

.editor__titulo {
  margin: 0;
  padding: 8px 24px 7px;
  font-size: 20px;
}

/* Container do Frame / Canvas */
.frame {
  line-height: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(80, 99, 36, 0.3);
  background-color: var(--creme-card);
  max-width: 100%;
}

canvas.preview {
  display: block;
  touch-action: none;
  width: 320px;
  max-width: min(85vw, 360px);
  height: auto;
}

/* Formato Story (9:16) */
.editor[data-aspect="story"] canvas.preview {
  width: 280px;
  max-width: min(80vw, 300px);
}

canvas.highres {
  display: none;
}

.editor input[type="file"] {
  display: none;
}

.frame-hint {
  font-size: 12px;
  color: rgba(80, 99, 36, 0.8);
  font-weight: 600;
  margin-top: -6px;
}

.editor--verde .frame-hint,
.editor--oliva .frame-hint {
  color: rgba(254, 246, 213, 0.8);
}

/* ===========================================================
   Botões & Controles
   =========================================================== */
.upload-btn,
.save,
.share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 14px 30px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
}

.upload-btn svg,
.save svg,
.share svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Botão Upload (Secundário) */
.upload-btn {
  background-color: var(--bege-fundo);
  color: var(--verde-escuro);
  border-color: var(--verde-escuro);
  box-shadow: 0 4px 12px rgba(80, 99, 36, 0.15);
  font-size: 16px;
  padding: 12px 24px;
}

.upload-btn:hover,
.upload-btn:focus-visible {
  background-color: var(--verde-escuro);
  border-color: var(--verde-escuro);
  color: var(--bege-fundo);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(80, 99, 36, 0.25);
}

.editor--verde .upload-btn,
.editor--oliva .upload-btn {
  background-color: var(--bege-fundo);
  color: var(--verde-escuro);
  border-color: var(--bege-fundo);
}

.editor--verde .upload-btn:hover,
.editor--oliva .upload-btn:hover {
  background-color: var(--laranja);
  border-color: var(--laranja);
  color: var(--branco);
}

/* Botão Salvar / Enviar (Primário) */
.save,
.share {
  background-color: var(--laranja);
  color: var(--branco);
  border-color: var(--laranja);
  box-shadow: 0 8px 20px rgba(242, 137, 25, 0.35);
}

.save:hover,
.share:hover,
.save:focus-visible,
.share:focus-visible {
  background-color: var(--laranja-hover);
  border-color: var(--laranja-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(242, 137, 25, 0.45);
}

.save:active,
.share:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(242, 137, 25, 0.3);
}

/* Barra de Controles (Setas + Zoom) */
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  background-color: var(--creme-card);
  color: var(--verde-escuro);
  border: 2px solid var(--creme-border);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.controls button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.controls button:hover,
.controls button:focus-visible {
  background-color: var(--laranja);
  border-color: var(--laranja);
  color: var(--branco);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(242, 137, 25, 0.3);
}

.controls button:active {
  transform: translateY(1px);
}

.is-hidden {
  display: none !important;
}

/* ---------- Avisos ---------- */
.aviso-file {
  position: relative;
  z-index: 1001;
  padding: 14px 20px;
  background-color: var(--laranja);
  color: var(--branco);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

/* ---------- Botão Voltar ao Topo ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background-color: var(--verde-escuro);
  color: var(--bege-fundo);
  border: 2px solid var(--laranja);
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 6px 18px rgba(80, 99, 36, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--laranja);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(242, 137, 25, 0.4);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ===========================================================
   Footer Oficial
   =========================================================== */
.dc-footer {
  background-color: var(--verde-escuro);
  color: var(--bege-fundo);
  padding: 50px 20px 36px;
  border-top: 4px solid var(--laranja);
}

.dc-footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.dc-footer__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.dc-footer__logo-img {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.dc-footer__desc {
  max-width: 540px;
  text-align: center;
  font-size: 14px;
  color: #efe8cb;
  margin: 0;
}

.dc-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.dc-footer__link {
  color: var(--bege-fundo);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.dc-footer__link:hover {
  color: var(--laranja);
  text-decoration: underline;
}

.dc-footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.dc-footer__social-item {
  color: var(--bege-fundo);
  background-color: rgba(254, 246, 213, 0.1);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 1px solid rgba(254, 246, 213, 0.2);
}

.dc-footer__social-item:hover {
  background-color: var(--laranja);
  color: var(--branco);
  transform: translateY(-2px);
  border-color: var(--laranja);
}

.dc-footer__social-item svg {
  width: 20px;
  height: 20px;
}

.dc-footer__bottom {
  max-width: 1140px;
  margin: 16px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(254, 246, 213, 0.15);
  text-align: center;
}

.dc-footer__copy {
  margin: 0;
  color: #dcd4b6;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- Responsivo Geral ---------- */
@media (min-width: 768px) {
  .editor__titulo {
    font-size: 24px;
  }
  canvas.preview {
    width: 340px;
    max-width: 340px;
  }
}

@media (max-width: 991px) {
  .dc-header__nav-desktop {
    display: none;
  }
  .dc-header__toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .modelos {
    padding: 40px 16px;
  }
  .editor {
    padding: 40px 16px;
  }
  .upload-btn, .save, .share {
    font-size: 16px;
    padding: 12px 24px;
    width: 100%;
    max-width: 320px;
  }
}
