/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --bg: #eee6f8;
    --bg-soft: #faf6ff;
    --text: #20182a;
    --muted: #6b5f7b;
    --line: rgba(63, 40, 92, 0.14);
    --accent: #9b6fd1;
    --accent-deep: #6c459b;
    --accent-soft: #dac5f4;
    --sage: #d9d3ef;
    --card: rgba(250, 246, 255, 0.84);
    --shadow: 0 24px 60px rgba(63, 40, 92, 0.14);
    --radius-lg: 32px;
    --radius-md: 22px;
    --radius-sm: 16px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(155, 111, 209, 0.24), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(218, 197, 244, 0.75), transparent 26%),
        linear-gradient(180deg, #fcf9ff 0%, var(--bg) 45%, #e6dcf6 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 75%);
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; line-height: 1.7; }
h1,h2,h3 { margin: 0; font-family: "Fraunces", serif; font-weight: 400; line-height: 1.05; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

/* ============================================================
   TOPBAR / NAV
   ============================================================ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(250, 246, 255, 0.88);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 12px;
    z-index: 100;
    animation: rise 0.8s ease-out both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fffbff;
    font-family: "Fraunces", serif;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 0.95rem; line-height: 1.2; }

.brand-copy span,
.section-label,
.eyebrow,
.studio-label {
    color: var(--muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 0.88rem;
    padding: 8px 11px;
    border-radius: 999px;
    transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover {
    background: rgba(155, 111, 209, 0.12);
    color: var(--accent-deep);
}

.nav-cta {
    background: var(--text) !important;
    color: #fffaf4 !important;
    padding: 10px 20px !important;
    border-radius: 999px;
    font-weight: 600;
    margin-left: 6px;
}

.nav-cta:hover { background: var(--accent-deep) !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 240ms ease, opacity 240ms ease;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 999px;
    font-family: "Manrope", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease;
    text-decoration: none;
}

.button-primary { background: var(--text); color: #fffaf4; }
.button-secondary { border: 1px solid var(--line); background: rgba(255,250,244,0.72); color: var(--text); }
.button:hover { transform: translateY(-2px); }
.button-primary:hover { background: var(--accent-deep); }

/* ============================================================
   HERO / HOME
   ============================================================ */
.hero-section { padding: 36px 0 20px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr;
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    padding: 52px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    animation: rise 0.9s ease-out both;
}

.eyebrow { display: inline-block; margin-bottom: 16px; }

.hero-copy h1 {
    font-size: clamp(2.6rem, 5.5vw, 4.6rem);
    margin-bottom: 24px;
    line-height: 1.08;
}

.lead { font-size: 1.05rem; color: var(--muted); max-width: 60ch; }

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-photo-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: rise 1s ease-out both;
}

.hero-photo-img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ============================================================
   PHOTO PLACEHOLDERS
   ============================================================ */
.photo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155,111,209,0.1), rgba(218,197,244,0.25));
    border: 2px dashed rgba(155,111,209,0.35);
    border-radius: var(--radius-md);
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
    gap: 10px;
}

.photo-placeholder::before {
    content: "??";
    font-size: 2rem;
    font-style: normal;
}

.hero-photo-wrap .photo-placeholder { border-radius: 0; min-height: 380px; }
.studio-photo { min-height: 190px; border-radius: var(--radius-md); }
.contact-photo { min-height: 360px; border-radius: var(--radius-lg); }
.contact-photo-wrap .photo-placeholder { border-radius: 0; min-height: 400px; }

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-block { margin-top: 96px; }

/* offset so sticky nav doesn't cover the section heading */
.hero-section,
.section-block {
    scroll-margin-top: 88px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 32px;
}

.section-heading h2 {
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.section-label { display: block; margin-bottom: 8px; }

/* ============================================================
   FORMAZIONE
   ============================================================ */
.formazione-card {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 44px 52px;
}

.formazione-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0;
}

.formazione-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 1.05rem;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.formazione-list li:last-child { border-bottom: none; padding-bottom: 0; }
.formazione-list li:first-child { padding-top: 0; }

.formazione-list li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 9px;
}

/* ============================================================
   SERVIZI TABLE
   ============================================================ */
.servizi-table-wrap {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.servizi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
}

.servizi-table thead tr {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fffbff;
}

.servizi-table th {
    padding: 18px 28px;
    text-align: left;
    font-family: "Fraunces", serif;
    font-weight: 400;
    font-size: 1.08rem;
    letter-spacing: 0.04em;
}

.servizi-table th:first-child { width: 30%; }

.servizi-table td {
    padding: 16px 28px;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    line-height: 1.6;
}

.servizi-table td:first-child { color: var(--accent-deep); }
.servizi-table tbody tr:last-child td { border-bottom: none; }
.servizi-table tbody tr:hover { background: rgba(155,111,209,0.05); }

/* ============================================================
   DOVE RICEVO
   ============================================================ */
.dove-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.studio-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    height: 100%;
    min-height: 280px;
}

.studio-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.studio-info {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: grid;
    gap: 28px;
    align-content: start;
}

.studio-info-block { display: grid; gap: 8px; align-content: start; }

.studio-info-block .studio-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}

.studio-address {
    font-size: 1rem;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    font-weight: 400;
}

.studio-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-deep);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 4px;
    transition: color 160ms, gap 160ms;
}

.studio-map-link:hover { color: var(--accent); gap: 10px; }

.studio-quote {
    margin-top: 20px;
    padding: 28px 36px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(155,111,209,0.12), rgba(218,197,244,0.22));
    border: 1px solid rgba(155,111,209,0.2);
}

.studio-quote p {
    font-family: "Fraunces", serif;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    color: var(--accent-deep);
    text-align: center;
    font-style: italic;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq .faq-list {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 8px 20px;
}

.faq-list details {
    border-bottom: 1px solid var(--line);
    padding: 20px 16px;
}

.faq-list details:last-child { border-bottom: none; }

.faq-list summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 240ms ease;
}

.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.75;
}

.faq-list details p a {
    color: var(--accent-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   CONTATTI
   ============================================================ */
.contact {
    display: grid;
    grid-template-columns: 1fr 0.65fr;
    gap: 28px;
    align-items: start;
}

.contact-copy {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    gap: 28px;
}

.contact-copy h2 { font-size: clamp(2.4rem, 4.5vw, 4rem); }

.contact-details { display: grid; gap: 16px; }

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Fraunces", serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text);
    transition: color 160ms, gap 160ms;
}

.contact-link svg { color: var(--accent); flex-shrink: 0; }
.contact-link:hover { color: var(--accent-deep); gap: 18px; }

.contact-social { display: flex; gap: 14px; }

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.55);
    color: var(--accent-deep);
    transition: background 180ms, color 180ms, transform 180ms;
}

.social-link:hover { background: var(--accent-deep); color: #fff; transform: translateY(-3px); }

.contact-quote {
    margin: 0;
    padding: 22px 26px;
    border-left: 3px solid var(--accent);
    background: linear-gradient(135deg, rgba(155,111,209,0.08), transparent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: "Fraunces", serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent-deep);
    line-height: 1.5;
}

.contact-photo-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 400px;
}

.contact-photo-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 32px 8px 0;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
    margin-top: 96px;
}

.site-footer a { color: var(--accent-deep); font-weight: 600; transition: color 160ms; }
.site-footer a:hover { color: var(--accent); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo-wrap { min-height: 260px; }
    .dove-grid { grid-template-columns: 1fr; }
    .contact { grid-template-columns: 1fr; }
    .contact-photo-wrap { min-height: 280px; }
    .contact-photo-wrap .photo-placeholder { min-height: 280px; }
}

@media (max-width: 760px) {
    .page-shell { width: min(100% - 24px, 1180px); padding-top: 12px; }
    .topbar { border-radius: 22px; padding: 14px 18px; top: 8px; flex-wrap: wrap; }
    .nav-toggle { display: flex; }
    .nav-links { display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 4px; padding-top: 8px; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; }
    .nav-cta { margin-left: 0 !important; text-align: center; }
    .hero-copy { padding: 28px; }
    .section-block { margin-top: 72px; }
    .formazione-card { padding: 26px; }
    .studio-info { padding: 26px; }
    .studio-photos { grid-template-columns: 1fr 1fr 1fr; height: auto; min-height: unset; }
    .studio-photo-img { height: 180px; }
    .studio-info { grid-template-columns: 1fr; }
    .servizi-table th, .servizi-table td { padding: 14px 16px; font-size: 0.9rem; }
    .contact-copy { padding: 28px; }
    .section-heading { flex-direction: column; align-items: flex-start; }
    .site-footer { flex-direction: column; align-items: flex-start; margin-top: 72px; }
}

@media (max-width: 500px) {
    .servizi-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hero-actions { flex-direction: column; }
    .button { width: 100%; text-align: center; }
}
