/* ============================================================
   Monetti — Liste Regalo · stile pubblico
   Palette Monetti: avorio caldo · nero #221F21 · oro #B5A27E
   Font: Cormorant Garamond (display) + Jost (testo)
   ------------------------------------------------------------ */
:root {
    /* Brand (mappato sui nomi storici --brand* per compatibilità) */
    --brand: #B5A27E;          /* oro Monetti */
    --brand-dark: #9C8862;     /* oro profondo (hover / gradiente) */
    --brand-soft: #EFE8DA;     /* oro pallido (sfondi tenui) */
    --gold-line: rgba(181,162,126,.45);

    --ink: #221F21;            /* nero caldo */
    --ink-soft: #5C564E;       /* testo secondario */
    --muted: #9C9488;          /* testo tenue */
    --line: #E6DFD2;           /* hairline caldo */
    --bg: #F6F1E9;             /* avorio pagina */
    --card: #FFFFFF;

    --ok: #2F7D5B;
    --err: #A6402E;

    --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --sans: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --shadow-card: 0 2px 10px rgba(34,31,33,.05), 0 18px 50px -28px rgba(34,31,33,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: .005em; }
a { color: var(--brand-dark); text-decoration: none; }

/* Header --------------------------------------------------------*/
.site-header {
    background: rgba(246,241,233,.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header img { height: 42px; }
.site-header .actions { display: flex; align-items: center; }
.site-header .actions a {
    margin-left: 22px; color: var(--ink-soft); text-decoration: none;
    font-size: 13px; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; transition: color .2s ease;
}
.site-header .actions a:hover { color: var(--brand-dark); }
.site-header .actions a.header-cta {
    background: var(--ink);
    color: #F4EFE6;
    padding: 10px 20px;
    border-radius: 2px;
    font-weight: 400;
    letter-spacing: .1em;
    transition: background .25s ease, color .25s ease;
}
.site-header .actions a.header-cta:hover {
    background: var(--brand);
    color: var(--ink);
}

/* Hero generico (pagine interne) -------------------------------*/
.hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    color: #F4EFE6;
    padding: 48px 24px 64px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    z-index: -2;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,18,19,.25) 0%, rgba(20,18,19,.78) 100%);
    z-index: -1;
}
.hero .hero-inner { max-width: 980px; margin: 0 auto; width: 100%; }
.hero .eyebrow {
    display: inline-block;
    color: var(--brand);
    border: 1px solid var(--brand);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-bottom: 16px;
}
.hero h1 { font-size: 44px; margin: 0 0 8px; font-weight: 500; line-height: 1.06; }
.hero .subtitle { font-size: 17px; opacity: .9; max-width: 600px; font-weight: 300; }

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.section { padding: 40px 0; }

.list-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .list-grid { grid-template-columns: 1fr; } }

.card {
    background: var(--card);
    border-radius: 4px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
}
.card h2 { margin: 0 0 14px; font-size: 26px; font-weight: 500; }
.description { color: var(--ink-soft); white-space: normal; line-height: 1.8; font-weight: 300; }
.description p { margin: 0 0 12px; }

.donate-card { position: sticky; top: 96px; }
.donate-card h2 { font-size: 22px; margin: 0 0 4px; }
.donate-card .quota-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }

.amount-fixed {
    background: var(--brand-soft);
    border: 1px solid var(--gold-line);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin-bottom: 18px;
}
.amount-fixed .label { color: var(--brand-dark); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.amount-fixed .value { font-family: var(--serif); font-size: 38px; font-weight: 600; color: var(--ink); margin-top: 4px; }

.suggested {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.suggested button {
    padding: 12px 0;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 3px;
    cursor: pointer;
    font-weight: 400;
    font-family: var(--sans);
    color: var(--ink);
    transition: all .2s ease;
    font-size: 15px;
}
.suggested button:hover, .suggested button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; color: var(--ink-soft); }
input, textarea, select {
    width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 3px;
    font-size: 15px; font-family: var(--sans); font-weight: 300; background: var(--card); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(181,162,126,.18); }

.btn-pay {
    width: 100%; padding: 15px; background: var(--ink); color: #F4EFE6; border: none; border-radius: 3px;
    font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; margin-top: 8px;
    font-family: var(--sans); transition: background .25s ease, color .25s ease;
}
.btn-pay:hover { background: var(--brand); color: var(--ink); }
.btn-pay:disabled { opacity: .5; cursor: not-allowed; }

.progress {
    background: var(--brand-soft);
    border-radius: 999px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 8px;
}
.progress > div {
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
    height: 100%;
    transition: width .4s;
}
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }
.progress-meta strong { color: var(--ink); font-weight: 500; }

.participants { margin-top: 26px; }
.participants h3 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; color: var(--ink-soft); }
.participants ul { list-style: none; padding: 0; margin: 0; }
.participants li {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.participants li:last-child { border-bottom: none; }
.participants .avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--ink);
    color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 15px; font-family: var(--serif);
}
.participants .info { flex: 1; }
.participants .name { font-weight: 400; font-size: 15px; }
.participants .msg { color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.participants .amt { font-weight: 600; font-family: var(--serif); font-size: 17px; color: var(--brand-dark); }

.alert {
    background: var(--brand-soft); border: 1px solid var(--gold-line); color: #6b5a30;
    padding: 14px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px;
}
.alert.error { background: #F6E6E2; border-color: #E2C2BA; color: #8A2F1F; }
.alert.success { background: #E6F0EA; border-color: #BFD9CB; color: #1F6347; }

/* Pagina di ringraziamento (esito pagamento) ------------------ */
.thanks-wrap {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    position: relative;
    overflow: hidden;
}
.thanks-wrap::before {
    content: "";
    position: absolute;
    inset: -100px;
    background:
        radial-gradient(circle at 20% 30%, rgba(181,162,126,.16) 0%, transparent 42%),
        radial-gradient(circle at 80% 70%, rgba(181,162,126,.12) 0%, transparent 42%);
    z-index: 0;
}
.thanks-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 580px;
    background: var(--card);
    border-radius: 6px;
    padding: 52px 44px;
    box-shadow: 0 30px 90px -40px rgba(34,31,33,.30), 0 4px 16px rgba(34,31,33,.05);
    border: 1px solid var(--line);
    text-align: center;
}
.thanks-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
}
.thanks-icon.success { background: linear-gradient(135deg, #C9B58C 0%, #B5A27E 100%); color: var(--ink); box-shadow: 0 14px 36px -12px rgba(181,162,126,.6); }
.thanks-icon.error { background: linear-gradient(135deg, #C36A55 0%, #A6402E 100%); box-shadow: 0 14px 36px -12px rgba(166,64,46,.45); }
.thanks-icon.info { background: linear-gradient(135deg, #B6AFA3 0%, #9C9488 100%); box-shadow: 0 14px 36px -12px rgba(156,148,136,.4); }

.thanks-eyebrow {
    color: var(--brand-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: 11px;
    margin-bottom: 10px;
}
.thanks-card h1 {
    font-size: 40px;
    margin: 0 0 12px;
    font-weight: 500;
    line-height: 1.12;
    color: var(--ink);
}
.thanks-card .lead {
    font-size: 16px;
    color: var(--ink-soft);
    margin: 0 auto 28px;
    line-height: 1.7;
    max-width: 460px;
    font-weight: 300;
}

.receipt {
    text-align: left;
    background: linear-gradient(180deg, #FBF7EF 0%, #FFFFFF 100%);
    border: 1px solid var(--gold-line);
    border-radius: 6px;
    padding: 26px 30px;
    margin: 24px 0 28px;
    position: relative;
}
.receipt::before, .receipt::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    background: var(--bg);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.receipt::before { left: -8px; }
.receipt::after { right: -8px; }
.receipt .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--gold-line);
    gap: 16px;
}
.receipt .row:last-child { border-bottom: none; }
.receipt .row .label { color: var(--ink-soft); font-weight: 400; }
.receipt .row .value { font-weight: 500; color: var(--ink); text-align: right; word-break: break-all; }
.receipt .row.total .label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-dark); font-weight: 500; }
.receipt .row.total .value { font-size: 30px; font-family: var(--serif); color: var(--ink); font-weight: 600; }

.thanks-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.thanks-meta strong { color: var(--ink-soft); }

.thanks-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 3px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .25s ease, color .25s ease, transform .15s;
    border: none;
    cursor: pointer;
    font-family: var(--sans);
}
.btn-pill.primary {
    background: var(--ink);
    color: #F4EFE6;
}
.btn-pill.primary:hover { background: var(--brand); color: var(--ink); text-decoration: none; }
.btn-pill.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-pill.ghost:hover { background: var(--card); border-color: var(--brand); color: var(--ink); text-decoration: none; }

/* Polvere d'oro decorativa sulla pagina di ringraziamento ------ */
.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.confetti i {
    position: absolute;
    color: var(--brand);
    font-size: 10px;
    opacity: 0;
    animation: confetti-fall linear infinite;
}
.confetti i:nth-child(odd) { color: var(--brand-dark); }
.confetti i:nth-child(3n) { color: #C9B58C; }
.confetti i:nth-child(5n) { color: #D8C7A0; }
@keyframes confetti-fall {
    0% { opacity: 0; transform: translateY(-40px) rotate(0deg); }
    12% { opacity: .9; }
    100% { opacity: 0; transform: translateY(100vh) rotate(360deg); }
}

/* Footer --------------------------------------------------------*/
footer.site-footer {
    background: var(--ink);
    color: #B7AE9E;
    padding: 44px 24px;
    text-align: center;
    margin-top: 56px;
}
footer.site-footer img { height: 46px; opacity: .92; margin-bottom: 14px; filter: brightness(0) invert(1); }
footer.site-footer a { color: var(--brand); text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }
footer.site-footer .footer-name { color: #F4EFE6; font-family: var(--serif); font-weight: 500; font-size: 16px; letter-spacing: .08em; margin-bottom: 8px; }
footer.site-footer .footer-row { font-size: 12.5px; line-height: 1.6; opacity: .85; }
footer.site-footer .footer-row .sep { opacity: .35; margin: 0 8px; }
footer.site-footer .footer-legal { font-size: 11.5px; opacity: .65; margin-top: 2px; letter-spacing: .2px; }
footer.site-footer .footer-bottom {
    font-size: 11px; opacity: .55; max-width: 360px;
    margin: 14px auto 0; padding-top: 12px;
    border-top: 1px solid rgba(244,239,230,.12);
}

/* Home — hero fotografico di lusso ----------------------------- */
.home-hero {
    background:
        linear-gradient(180deg, rgba(20,18,19,.45) 0%, rgba(20,18,19,.72) 100%),
        url('/assets/img/hero-monetti.jpg') center/cover no-repeat;
    color: #F4EFE6;
    padding: 120px 24px 104px;
    text-align: center;
    position: relative;
}
.home-hero .home-eyebrow {
    display: inline-block;
    color: var(--brand);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .28em;
    margin-bottom: 18px;
}
.home-hero h1 { font-size: clamp(36px, 6vw, 62px); margin: 0 0 16px; font-weight: 500; line-height: 1.05; }
.home-hero h1 .accent { color: var(--brand); font-style: italic; }
.home-hero p { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 36px; font-weight: 300; }

.code-finder {
    max-width: 500px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 3px;
    display: flex;
    align-items: center;
    padding: 7px 7px 7px 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,.28);
    gap: 8px;
}
.code-finder > i { color: var(--brand); font-size: 16px; }
.code-finder input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 14px 8px;
    font-size: 16px;
    font-family: var(--sans);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: .06em;
    box-shadow: none;
}
.code-finder input::placeholder { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 300; }
.code-finder input:focus { outline: none; box-shadow: none; }
.code-finder button {
    background: var(--ink);
    color: #F4EFE6;
    border: none;
    padding: 14px 24px;
    border-radius: 3px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background .25s ease, color .25s ease;
    font-family: var(--sans);
}
.code-finder button:hover { background: var(--brand); color: var(--ink); }

.home-flash {
    max-width: 500px;
    margin: 16px auto 0;
    padding: 11px 16px;
    border-radius: 4px;
    font-size: 14px;
    background: rgba(255,255,255,.95);
}
.home-flash.error { color: #8A2F1F; }
.home-flash.success { color: #1F6347; }
.home-flash.info { color: #4a4030; }

.home-hero-cta { margin-top: 40px; }
.home-hero-cta a { color: rgba(244,239,230,.8); text-decoration: none; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.home-hero-cta a:hover { color: var(--brand); }

/* Feature grid (home) ------------------------------------------*/
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 64px 0; }
@media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { padding: 34px 28px; background: var(--card); border-radius: 4px; border: 1px solid var(--line); text-align: center; }
.feature .icon { font-size: 28px; margin-bottom: 14px; color: var(--brand); }
.feature h3 { margin: 0 0 10px; font-size: 22px; font-weight: 500; }
.feature .muted { color: var(--ink-soft); font-size: 14.5px; font-weight: 300; }

/* Sezione titolata (home) --------------------------------------*/
.section-head { text-align: center; max-width: 640px; margin: 0 auto 8px; }
.section-head .eyebrow { display: inline-block; color: var(--brand-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .22em; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; font-weight: 500; }
.section-head p { color: var(--ink-soft); font-weight: 300; font-size: 16px; }

/* Responsive ---------------------------------------------------*/
@media (max-width: 760px) {
    .site-header { padding: 12px 16px; }
    .site-header img { height: 34px; }
    .site-header .actions a { margin-left: 14px; font-size: 12px; }

    .home-hero { padding: 84px 18px 64px; }
    .home-hero h1 { font-size: 32px; }
    .home-hero p { font-size: 15.5px; margin-bottom: 26px; }
    .code-finder { padding: 6px 6px 6px 16px; }
    .code-finder > i { font-size: 15px; }
    .code-finder input { font-size: 15px; padding: 12px 6px; }
    .code-finder button { padding: 12px 16px; font-size: 11px; }
    .code-finder button span { display: none; }

    .feature-grid { gap: 16px; margin: 40px 0; }
    .feature { padding: 26px 22px; }

    .hero { min-height: 280px; padding: 36px 18px 44px; }
    .hero h1 { font-size: 30px; }
    .hero .subtitle { font-size: 15px; }

    .container, .section { padding-left: 16px; padding-right: 16px; }
    .section { padding-top: 28px; padding-bottom: 28px; }

    .list-grid { grid-template-columns: 1fr; gap: 20px; }
    .donate-card { position: static; }

    .card { padding: 24px 20px; }
    .card h2 { font-size: 22px; }

    .suggested { gap: 6px; }
    .suggested button { padding: 10px 0; font-size: 14px; }
    .amount-fixed .value { font-size: 30px; }

    .progress-meta { flex-wrap: wrap; gap: 4px 12px; }

    .thanks-wrap { padding: 32px 16px; min-height: auto; }
    .thanks-card { padding: 36px 24px; }
    .thanks-card h1 { font-size: 30px; }
    .thanks-card .lead { font-size: 14.5px; }
    .thanks-icon { width: 76px; height: 76px; font-size: 32px; }
    .receipt { padding: 20px 22px; }
    .receipt .row { padding: 8px 0; }
    .receipt .row.total .value { font-size: 24px; }
    .thanks-actions { gap: 8px; }
    .btn-pill { padding: 12px 20px; font-size: 11px; }

    .participants .msg { font-size: 12px; }

    footer.site-footer { padding: 32px 18px; }
    footer.site-footer img { height: 40px; }
    footer.site-footer .footer-row { font-size: 12px; }
    footer.site-footer .footer-bottom { font-size: 10.5px; }
    footer.site-footer .footer-name { font-size: 15px; }
}

@media (max-width: 420px) {
    .home-hero h1 { font-size: 28px; }
    .code-finder { flex-direction: column; padding: 12px; border-radius: 6px; gap: 10px; }
    .code-finder > i { display: none; }
    .code-finder input { width: 100%; text-align: center; letter-spacing: .04em; }
    .code-finder button { width: 100%; justify-content: center; }
    .code-finder button span { display: inline; }
    .receipt { padding: 16px 18px; }
    .receipt .row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .receipt .row.total { flex-direction: row; align-items: baseline; }
    .thanks-actions .btn-pill { width: 100%; justify-content: center; }
}
