/* ============================================================
   STUDIO LEGALE AVV. ANTONIO SIA — Foglio di stile principale
   Palette: navy profondo + oro antico + crema/avorio
   ============================================================ */

:root {
    /* Palette forense classica */
    --c-navy:        #0f2845;
    --c-navy-deep:   #081a30;
    --c-navy-soft:   #1a3a5c;
    --c-gold:        #b08d57;
    --c-gold-light:  #c9a874;
    --c-cream:       #faf7f2;
    --c-cream-deep:  #f1ece1;
    --c-ink:         #1f2937;
    --c-ink-soft:    #4b5563;
    --c-ink-light:   #6b7280;
    --c-line:        #e5e0d4;
    --c-white:       #ffffff;

    /* Tipografia */
    --f-serif: 'Cormorant Garamond', 'Garamond', Georgia, 'Times New Roman', serif;
    --f-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --container-max: 1200px;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-ink);
    background: var(--c-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-navy); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-gold); }
ul { padding: 0; margin: 0; list-style: none; }

h1, h2, h3, h4, h5 {
    font-family: var(--f-serif);
    font-weight: 600;
    color: var(--c-navy);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p  { margin: 0 0 1rem 0; }

/* Anchor offset per header sticky */
section[id] { scroll-margin-top: 90px; }

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

/* ============== BOTTONI ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 2rem;
    font-family: var(--f-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn-primary {
    background: var(--c-navy);
    color: var(--c-white);
    border-color: var(--c-navy);
}
.btn-primary:hover {
    background: var(--c-gold);
    border-color: var(--c-gold);
    color: var(--c-white);
}
.btn-outline {
    background: transparent;
    color: var(--c-navy);
    border-color: var(--c-navy);
}
.btn-outline:hover {
    background: var(--c-navy);
    color: var(--c-white);
}
.btn-ghost {
    background: rgba(255,255,255,0.08);
    color: var(--c-white);
    border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.18);
    border-color: var(--c-gold);
    color: var(--c-white);
}

/* ============== HEADER ============== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 1px 8px rgba(15, 40, 69, 0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: var(--c-navy);
    color: var(--c-gold);
    font-family: var(--f-serif);
    font-weight: 700;
    font-size: 1.35rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--f-serif); font-weight: 600; font-size: 1.15rem; color: var(--c-navy); }
.brand-sub  { font-size: 0.78rem; color: var(--c-ink-light); letter-spacing: 0.05em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
    color: var(--c-ink);
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
}
.main-nav a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--c-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.main-nav a:not(.btn):hover { color: var(--c-navy); }
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--c-navy);
    transition: all 0.3s ease;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--c-white);
    border-top: 1px solid var(--c-line);
    padding: 1rem 1.5rem;
}
.mobile-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--c-line);
    color: var(--c-ink);
    font-weight: 500;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav.is-open { display: flex; }

/* ============== HERO ============== */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: var(--c-white);
    background: linear-gradient(135deg, var(--c-navy-deep) 0%, var(--c-navy) 60%, var(--c-navy-soft) 100%);
    overflow: hidden;
    padding: 6rem 0;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(176, 141, 87, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(176, 141, 87, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0, transparent 60px, rgba(176, 141, 87, 0.03) 60px, rgba(176, 141, 87, 0.03) 61px);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero-eyebrow {
    color: var(--c-gold);
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.hero-title {
    color: var(--c-white);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.hero-accent { color: var(--c-gold-light); font-style: italic; }
.hero-lede {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    max-width: 700px;
    margin-bottom: 2.5rem;
    font-weight: 300;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ============== SECTIONS GENERICHE ============== */
.section { padding: 6rem 0; }
.section-light { background: var(--c-white); }
.section-cream { background: var(--c-cream); }
.section-dark  { background: var(--c-navy); color: var(--c-white); }
.section-dark h2, .section-dark h3 { color: var(--c-white); }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 4rem; }
.eyebrow {
    color: var(--c-gold);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
}
.eyebrow-light { color: var(--c-gold-light); }
.section-sub { color: var(--c-ink-soft); font-size: 1.1rem; margin-top: 1rem; }
.section-sub-light { color: rgba(255,255,255,0.75); }

/* ============== TWO-COL (Studio) ============== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.two-col-image { position: relative; padding: 15px; }
.portrait {
    margin: 0;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(15, 40, 69, 0.3), 0 0 0 1px var(--c-line);
}
.two-col-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 60px; height: 60px;
    border-top: 2px solid var(--c-gold);
    border-left: 2px solid var(--c-gold);
}
.two-col-image::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 60px; height: 60px;
    border-bottom: 2px solid var(--c-gold);
    border-right: 2px solid var(--c-gold);
}
.bullets-clean { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.bullets-clean li { display: flex; align-items: center; gap: 0.75rem; color: var(--c-ink-soft); font-size: 0.95rem; }
.bullets-clean i { color: var(--c-gold); font-size: 0.85rem; }

/* ============== PRACTICE GRID ============== */
.practice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.practice-card {
    background: var(--c-white);
    padding: 2.5rem;
    border-radius: 4px;
    border: 1px solid var(--c-line);
    border-top: 4px solid var(--c-gold);
    transition: all 0.3s ease;
}
.practice-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -15px rgba(15, 40, 69, 0.25);
    border-top-color: var(--c-navy);
}
.practice-icon {
    width: 64px;
    height: 64px;
    background: var(--c-cream);
    color: var(--c-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}
.practice-card:hover .practice-icon {
    background: var(--c-navy);
    color: var(--c-gold);
}
.practice-card h3 {
    font-size: 1.65rem;
    color: var(--c-navy);
    margin-bottom: 1rem;
}
.practice-card p {
    color: var(--c-ink-soft);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.practice-card ul { display: flex; flex-direction: column; gap: 0.55rem; }
.practice-card ul li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--c-ink-soft);
    font-size: 0.9rem;
    line-height: 1.5;
}
.practice-card ul li::before {
    content: '\f0da';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--c-gold);
}

/* ============== METHOD ============== */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}
.method-step { text-align: center; padding: 1.5rem; }
.method-num {
    display: inline-block;
    font-family: var(--f-serif);
    font-size: 3rem;
    font-weight: 600;
    color: var(--c-gold);
    border-bottom: 2px solid var(--c-gold);
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
    line-height: 1;
}
.method-step h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.method-step p { color: var(--c-ink-soft); font-size: 0.95rem; }

/* ============== CONTATTI ============== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    margin-top: 2rem;
}
.contact-info-title { color: var(--c-gold-light); margin-bottom: 2rem; font-size: 1.4rem; }
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.75rem;
    color: rgba(255,255,255,0.9);
}
.contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(176, 141, 87, 0.15);
    color: var(--c-gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.contact-item strong {
    display: block;
    color: var(--c-white);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}
.contact-item span, .contact-item a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}
.contact-item a:hover { color: var(--c-gold-light); }

/* Form */
.contact-form-wrap {
    background: var(--c-white);
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 25px 50px -15px rgba(0,0,0,0.3);
}
.contact-form .form-row { margin-bottom: 1.25rem; }
.contact-form label {
    display: block;
    color: var(--c-ink);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: 3px;
    font-family: var(--f-sans);
    font-size: 0.95rem;
    color: var(--c-ink);
    background: var(--c-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--c-navy);
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.form-checkbox input { width: auto; margin-top: 4px; flex-shrink: 0; }
.form-checkbox label {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--c-ink-soft);
    line-height: 1.5;
    margin: 0;
}
.form-checkbox label a { color: var(--c-navy); text-decoration: underline; }

/* Honeypot — invisibile agli utenti, visibile ai bot */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--c-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-feedback {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 3px;
    font-size: 0.9rem;
    display: none;
}
.form-feedback.is-success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border-left: 3px solid #10b981;
}
.form-feedback.is-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

/* ============== MAPPA ============== */
.map-section { background: var(--c-cream); }
.map-section iframe { display: block; }

/* ============== FOOTER ============== */
.site-footer {
    background: var(--c-navy-deep);
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.3fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
}
.brand-footer .brand-name { color: var(--c-white); }
.brand-footer .brand-sub { color: var(--c-gold-light); }
.footer-blurb {
    margin-top: 1rem;
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    line-height: 1.6;
}
.site-footer h4 {
    color: var(--c-gold-light);
    font-family: var(--f-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
    font-weight: 600;
}
.footer-links li, .footer-contacts li { margin-bottom: 0.6rem; }
.footer-links a, .footer-contacts a { color: rgba(255,255,255,0.7); }
.footer-links a:hover, .footer-contacts a:hover { color: var(--c-gold-light); }
.footer-contacts li { display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.5; }
.footer-contacts i { color: var(--c-gold); margin-top: 4px; flex-shrink: 0; }

.footer-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
}
.footer-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
}
.footer-bar-inner p { margin: 0; }

/* ============== RESPONSIVE ============== */
@media (max-width: 960px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
    .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
    .practice-grid { grid-template-columns: 1fr; }
    .method-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .section { padding: 4rem 0; }
    .hero { min-height: 65vh; padding: 4rem 0; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .form-row-split { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; }
    .contact-form-wrap { padding: 1.5rem; }
    .practice-card { padding: 1.75rem; }
    .footer-bar-inner { flex-direction: column; text-align: center; }
}

/* ============== STAMPA ============== */
@media print {
    .site-header, .menu-toggle, .hero-cta, .map-section, .contact-form-wrap, .site-footer { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}

/* ============== PAGINE INTERNE (privacy, cookie, note) ============== */
.legal-page { padding: 4rem 0; max-width: 800px; margin: 0 auto; }
.legal-page h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.legal-page .legal-sub { color: var(--c-ink-light); margin-bottom: 2rem; font-style: italic; }
.legal-page h2 { font-size: 1.5rem; margin-top: 2rem; color: var(--c-navy); }
.legal-page p, .legal-page li { color: var(--c-ink-soft); line-height: 1.75; }
.legal-page ul { padding-left: 1.5rem; list-style: disc; margin-bottom: 1rem; }
.legal-page a { text-decoration: underline; }
.legal-back { display: inline-block; margin-bottom: 2rem; color: var(--c-navy); font-weight: 500; }
.legal-back i { margin-right: 0.4rem; }
