/*
Theme Name: Marchelli Law
Theme URI: https://marchelli.law
Author: Marchelli — Corporate & Business Law
Author URI: https://marchelli.law
Description: Tema personalizzato per lo studio legale Marchelli — Corporate & Business Law, Milano.
Version: 1.0.0
License: Proprietario — tutti i diritti riservati
Text Domain: marchelli-law
Tags: one-page, bilingual, law-firm, minimalist
*/

/* ============================================================
   GOOGLE FONTS — caricate via functions.php (wp_enqueue_style)
   ============================================================ */

/* ============================================================
   VARIABILI COLORE
   ============================================================ */
:root {
  --ink:    #0e0e0e;
  --paper:  #f5f2ec;
  --accent: #8b6b3d;
  --muted:  #7a7a72;
  --rule:   #d4cfc6;
  --white:  #ffffff;
}

/* ============================================================
   RESET E BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Founders Grotesk', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}

.nav-logo-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

.nav-logo-descriptor {
  font-family: 'Founders Grotesk', sans-serif;
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
}

.nav-logo-hex {
  flex-shrink: 0;
  margin-right: 2px;
}

.nav-logo-divider {
  width: 1px;
  height: 32px;
  background: var(--rule);
  align-self: center;
}

.nav-links {
  display: flex;
  gap: 48px;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.lang-toggle {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.lang-toggle span { color: var(--accent); }

/* ============================================================
   SEZIONI
   ============================================================ */
section {
  min-height: 100vh;
  padding: 140px 64px 80px;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

/* ============================================================
   HOME
   ============================================================ */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 900px;
}

.home-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.home-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.home-headline em {
  font-style: italic;
  color: var(--accent);
}

.home-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.home-cta {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
  transition: color 0.2s, border-color 0.2s;
}

.home-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PRACTICE AREAS
   ============================================================ */
#practice { background: var(--ink); color: var(--paper); }

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 0;
}

.practice-item {
  padding: 48px 40px;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s;
}

.practice-item:hover { background: rgba(255,255,255,0.03); }

.practice-item:nth-child(3n) { border-right: none; }

.practice-num {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}

.practice-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 16px;
  line-height: 1.2;
}

.practice-desc {
  font-size: 13px;
  color: rgba(245,242,236,0.5);
  line-height: 1.8;
}

/* ============================================================
   PROFILO
   ============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 96px;
  align-items: start;
}

.profile-photo-wrap {
  position: sticky;
  top: 120px;
}

.profile-photo-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(15%) contrast(1.05);
}

.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 8px;
}

.profile-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
}

.profile-body p {
  font-size: 15px;
  line-height: 1.9;
  color: #3a3a36;
  margin-bottom: 24px;
}

.profile-credentials {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}

.credential-row {
  display: flex;
  gap: 32px;
  margin-bottom: 20px;
  font-size: 13px;
}

.credential-label {
  width: 140px;
  flex-shrink: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  padding-top: 2px;
}

.credential-value { color: var(--ink); line-height: 1.6; }

/* ============================================================
   METODO DI LAVORO (COUNSEL)
   ============================================================ */
#counsel { background: var(--paper); }

.counsel-intro {
  max-width: 680px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 80px;
}

.counsel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.counsel-item {
  padding: 40px;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--rule);
}

.counsel-item-num {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.counsel-item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
}

.counsel-item-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

/* ============================================================
   CONTATTI
   ============================================================ */
#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.contact-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 32px;
}

.contact-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 48px;
  max-width: 420px;
}

.contact-detail {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  font-size: 13px;
}

.contact-detail-label {
  width: 80px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 2px;
}

.contact-detail-value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.contact-detail-value a:hover { border-color: var(--accent); }

.contact-map {
  aspect-ratio: 1;
  background: #e8e4de;
  position: relative;
  overflow: hidden;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(80%) contrast(1.1);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 32px 64px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--ink); }

.footer-links { display: flex; gap: 32px; }

/* ============================================================
   MODALI LEGALI
   ============================================================ */
.legal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,14,14,0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.legal-modal.open { display: flex; }

.legal-modal-inner {
  background: var(--white);
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 56px;
  position: relative;
}

.legal-modal-close {
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.legal-modal-close:hover { color: var(--ink); }

.legal-modal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 8px;
}

.legal-modal .legal-date {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.legal-modal .legal-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.legal-modal h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  margin: 28px 0 10px;
}

.legal-modal p {
  font-size: 13px;
  color: #4a4a44;
  line-height: 1.85;
  margin-bottom: 14px;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  background: var(--ink);
  color: var(--paper);
  padding: 20px 64px;
}

.cookie-banner.show { display: block; }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cookie-banner p {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(245,242,236,0.7);
}

.cookie-banner a { color: var(--paper); }

.cookie-banner-actions { display: flex; gap: 16px; flex-shrink: 0; }

.cookie-btn-accept {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.cookie-btn-accept:hover { opacity: 0.85; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  nav { padding: 24px 40px; }
  section { padding: 120px 40px 64px; }
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .practice-item:nth-child(3n) { border-right: 1px solid rgba(255,255,255,0.08); }
  .practice-item:nth-child(2n) { border-right: none; }
  .profile-layout { grid-template-columns: 1fr; gap: 48px; }
  .profile-photo-wrap { position: static; max-width: 360px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  footer { padding: 28px 40px; }
  .cookie-banner { padding: 20px 40px; }
}

@media (max-width: 768px) {
  nav {
    padding: 20px 24px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .nav-links { gap: 24px; }
  section { padding: 100px 24px 48px; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice-item { border-right: none !important; }
  .counsel-grid { grid-template-columns: 1fr; }
  footer {
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .cookie-banner { padding: 16px 24px; }
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .legal-modal { padding: 16px; }
  .legal-modal-inner { padding: 32px 24px; }
}
