/* ===================================================
   VFA — Victor da Fonseca, Sociedade de Advogados
   CSS Design System — Minimalist Legal Aesthetic
   =================================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:       #0a0e1a;
  --navy-soft:  #111827;
  --navy-mid:   #1a2235;
  --gold:       #c9a84c;
  --gold-light: #e2c47a;
  --gold-dim:   #8a6e30;
  --white:      #f5f3ef;
  --off-white:  #e8e4dc;
  --grey:       #8a8f99;
  --grey-light: #b0b5bf;
  --border:     rgba(201,168,76,0.18);
  --border-dim: rgba(255,255,255,0.07);
  --ff-serif:   'Cormorant Garamond', Georgia, serif;
  --ff-sans:    'Inter', system-ui, sans-serif;
  --radius:     3px;
  --transition: 0.35s cubic-bezier(0.25,0.8,0.25,1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--navy);
  color: var(--white);
  font-family: var(--ff-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Security: prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow selection inside form fields */
input, textarea, select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

a { color: inherit; text-decoration: none; }
img {
  display: block;
  max-width: 100%;
  /* Security: prevent image dragging */
  -webkit-user-drag: none;
  pointer-events: none;
}
button { cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ---------- TYPOGRAPHY HELPERS ---------- */
.section-label {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.section-label.light { color: var(--gold-light); }

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 2.5rem;
}
.section-title em {
  font-style: italic;
  color: var(--gold-light);
}
.section-title.light { color: var(--off-white); }

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.30);
}

.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 1px solid var(--border);
  color: var(--off-white);
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-full { width: 100%; text-align: center; }

/* ================================================
   NAVIGATION
   ================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(14px);
  padding: 0.85rem 0;
  box-shadow: 0 1px 0 var(--border-dim);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.logo-mark {
  font-family: var(--ff-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
}
.logo-sub {
  font-size: 0.62rem;
  color: var(--grey-light);
  line-height: 1.45;
  letter-spacing: 0.04em;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-light);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 1px;
  background: var(--off-white);
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--navy);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77,0,0.175,1);
}
.mobile-menu.open { transform: translateX(0); }
.mob-link {
  font-family: var(--ff-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--off-white);
  transition: color var(--transition);
}
.mob-link:hover { color: var(--gold-light); }

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,14,26,0.92) 0%,
    rgba(10,14,26,0.72) 50%,
    rgba(10,14,26,0.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: 8rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
  font-family: var(--ff-serif);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.8rem;
  max-width: 780px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards 0.5s;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--grey-light);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2.8rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards 0.7s;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s ease forwards 0.9s;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.4s;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2s ease infinite;
}
.scroll-label {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
}

.br-desk { display: block; }

/* ================================================
   STATS BAND
   ================================================ */
.stats-band {
  background: var(--navy-soft);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  padding: 3.5rem 2rem;
}
.stats-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-num {
  font-family: var(--ff-serif);
  font-size: 3.2rem;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}
.stat-unit {
  font-family: var(--ff-serif);
  font-size: 2rem;
  color: var(--gold);
  margin-left: 2px;
  vertical-align: super;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 0.5rem;
}
.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border-dim);
  flex-shrink: 0;
}

/* ================================================
   SOBRE
   ================================================ */
.sobre {
  padding: 7rem 2rem;
  background: var(--navy);
}
.sobre-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}
.sobre-left {
  position: sticky;
  top: 6rem;
}
.sobre-ornament {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin-top: 2rem;
}
.sobre-text {
  font-size: 1rem;
  color: var(--grey-light);
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.sobre-text strong { color: var(--off-white); font-weight: 500; }
.sobre-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}
.badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-transform: uppercase;
}

/* ================================================
   ÁREAS DE PRÁTICA
   ================================================ */
.areas {
  background: var(--navy-soft);
  padding: 7rem 2rem;
  border-top: 1px solid var(--border-dim);
}
.areas-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px;
  background: var(--border-dim);
  border: 1px solid var(--border-dim);
}
.area-card {
  background: var(--navy-soft);
  padding: 2.8rem 2.4rem;
  position: relative;
  transition: background var(--transition);
  overflow: hidden;
}
.area-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.area-card:hover { background: var(--navy-mid); }
.area-card:hover::before { transform: scaleX(1); }

.area-icon {
  width: 44px;
  height: 44px;
  color: var(--gold);
  margin-bottom: 1.4rem;
  transition: transform var(--transition);
}
.area-card:hover .area-icon { transform: translateY(-4px); }
.area-icon svg { width: 100%; height: 100%; }

.area-name {
  font-family: var(--ff-serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--off-white);
  margin-bottom: 1rem;
}
.area-desc {
  font-size: 0.88rem;
  color: var(--grey);
  line-height: 1.8;
}
.area-line {
  width: 30px;
  height: 1px;
  background: var(--gold-dim);
  margin-top: 1.8rem;
  transition: width var(--transition);
}
.area-card:hover .area-line { width: 60px; background: var(--gold); }

/* ================================================
   EQUIPA
   ================================================ */
.equipa {
  padding: 7rem 2rem;
  background: var(--navy);
}
.equipa-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.equipa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.membro-card {
  background: var(--navy-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  gap: 1.8rem;
  align-items: flex-start;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.membro-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.membro-avatar {
  flex-shrink: 0;
  position: relative;
  width: 64px;
  height: 64px;
}
.avatar-initials {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold-light);
  position: relative;
  z-index: 1;
}
.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color var(--transition);
}
.membro-card:hover .avatar-ring { border-color: var(--gold); }

.membro-nome {
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--off-white);
  margin-bottom: 0.2rem;
}
.membro-cargo {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.membro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tag {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border-dim);
  border-radius: 50px;
  color: var(--grey);
  text-transform: uppercase;
}
.membro-bio {
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.75;
}

/* ================================================
   QUOTE SECTION
   ================================================ */
.quote-section {
  background: var(--navy-soft);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  padding: 6rem 2rem;
  text-align: center;
}
.quote-inner {
  max-width: 720px;
  margin: 0 auto;
}
.quote-text {
  font-family: var(--ff-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--off-white);
  line-height: 1.4;
  margin-bottom: 1.2rem;
}
.quote-translation {
  display: block;
  font-size: 1rem;
  color: var(--gold-light);
  font-style: normal;
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
}
.quote-attr {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ================================================
   CONTACTO
   ================================================ */
.contacto {
  padding: 7rem 2rem;
  background: var(--navy);
}
.contacto-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.contacto-sub {
  font-size: 1rem;
  color: var(--grey-light);
  max-width: 550px;
  line-height: 1.8;
  margin-bottom: 4rem;
}
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

/* Info blocks */
.contacto-infos { display: flex; flex-direction: column; gap: 2rem; }
.info-block {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}
.info-icon {
  width: 36px;
  height: 36px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}
.info-icon svg { width: 18px; height: 18px; }
.info-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.3rem;
}
.info-value {
  font-size: 0.95rem;
  color: var(--off-white);
  line-height: 1.6;
}
.info-link { transition: color var(--transition); }
.info-link:hover { color: var(--gold-light); }

/* Form */
.contacto-form { display: flex; flex-direction: column; gap: 1.4rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.form-input {
  background: var(--navy-soft);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--off-white);
  font-family: var(--ff-sans);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 0.9rem 1.1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.10);
}
.form-input::placeholder { color: var(--grey); }
.form-input option { background: var(--navy-soft); color: var(--off-white); }
.form-textarea { resize: vertical; min-height: 130px; }

.form-success {
  display: none;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--gold-light);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(201,168,76,0.06);
}
.form-success svg { width: 22px; height: 22px; flex-shrink: 0; }
.form-success.visible { display: flex; }

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--navy-soft);
  border-top: 1px solid var(--border-dim);
  padding-top: 5rem;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3.5rem;
}
.footer-brand .logo-mark { font-size: 2rem; display: block; margin-bottom: 0.8rem; }
.footer-tagline {
  font-size: 0.82rem;
  color: var(--grey-light);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.footer-copy { font-size: 0.7rem; color: var(--grey); }

.footer-link-title {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer-link {
  display: block;
  font-size: 0.85rem;
  color: var(--grey-light);
  margin-bottom: 0.6rem;
  transition: color var(--transition);
  line-height: 1.5;
}
.footer-link:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid var(--border-dim);
  padding: 1.4rem 2rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  max-width: 1240px;
  margin: 0 auto;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 0.8; }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.6); opacity: 0.4; }
}

/* Scroll-revealed elements */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
  .sobre-grid     { grid-template-columns: 1fr; gap: 2.5rem; }
  .sobre-left     { position: static; }
  .contacto-grid  { grid-template-columns: 1fr; gap: 3rem; }
  .footer-inner   { grid-template-columns: 1fr 1fr; }
  .br-desk        { display: none; }
}

@media (max-width: 640px) {
  .nav-links      { display: none; }
  .hamburger      { display: flex; }
  .hero-content   { padding-top: 7rem; }
  .hero-cta-row   { flex-direction: column; align-items: flex-start; }
  .stat-divider   { display: none; }
  .stats-inner    { gap: 1rem; }
  .stat-item      { min-width: 140px; }
  .footer-inner   { grid-template-columns: 1fr; gap: 2.5rem; }
  .membro-card    { flex-direction: column; }
  .equipa-grid    { grid-template-columns: 1fr; }
}
