/* ============================================================
   components.css — Bortolutti Digital Ltd
   Bottoni, card, badge, form, modali, UI elements
   ============================================================ */

/* --- Bottoni --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    background: var(--gold);
    color: #07090f;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    min-height: 44px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(201, 169, 97, 0.35);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    background: transparent;
    color: var(--text);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
    min-height: 36px;
    white-space: nowrap;
}

.btn-ghost:hover {
    border-color: rgba(201,169,97,0.5);
    color: var(--gold);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color var(--dur) var(--ease);
}

.btn-text:hover { color: var(--gold); }

.btn-text svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    transition: transform var(--dur) var(--ease);
}

.btn-text:hover svg { transform: translateX(3px); }

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.badge-gold {
    background: var(--gold-dim);
    color: var(--gold);
    border: 0.5px solid var(--gold-border);
}

.badge-green {
    background: rgba(94, 229, 155, 0.12);
    color: var(--green);
    border: 0.5px solid rgba(94, 229, 155, 0.25);
}

.badge-muted {
    background: rgba(255,255,255,0.04);
    color: var(--subtle);
    border: 0.5px solid var(--line);
}

/* --- Card progetto --- */
.project-card {
    background: var(--bg-2);
    border: 0.5px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-3px);
}

.project-card-cover {
    aspect-ratio: 16/9;
    background: var(--bg-3);
    overflow: hidden;
    position: relative;
}

.project-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.project-card:hover .project-card-cover img { transform: scale(1.04); }

.project-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
}

.project-card-cover-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1;
    stroke-linecap: round;
}

.project-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-card-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.3;
}

.project-card-title em {
    color: var(--gold);
    font-style: italic;
}

.project-card-desc {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.6;
    flex: 1;
}

.project-card-footer {
    padding: 1rem 1.5rem;
    border-top: 0.5px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- Feature card (icona + testo) --- */
.feature-card {
    padding: 1.75rem;
    border: 0.5px solid var(--line);
    border-radius: 10px;
    background: var(--bg-2);
    transition: border-color var(--dur) var(--ease);
}

.feature-card:hover { border-color: var(--gold-border); }

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.6;
}

/* --- Servizi card (grid 4 col) --- */
.service-card {
    padding: 1.5rem;
}

.service-card-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 1.25rem;
}

.service-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-card h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* --- Form inputs --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-3);
    border: 0.5px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
    min-height: 44px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--gold-border);
    background: var(--bg-4);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

/* Select custom con freccia */
.form-select-wrap {
    position: relative;
}

.form-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--subtle);
    border-bottom: 1.5px solid var(--subtle);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.form-select {
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-3);
    color: var(--text);
}

/* Checkbox custom */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-check-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 0.5px solid var(--line);
    border-radius: 4px;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.form-check input:checked + .form-check-box {
    background: var(--gold);
    border-color: var(--gold);
}

.form-check input:checked + .form-check-box::after {
    content: '';
    width: 5px;
    height: 9px;
    border-right: 2px solid #07090f;
    border-bottom: 2px solid #07090f;
    transform: rotate(45deg) translate(-1px, -1px);
}

.form-check-label {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.5;
}

/* --- Progress bar (WIP projects) --- */
.progress-wrap {
    margin-top: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.progress-bar-bg {
    height: 2px;
    background: var(--line);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 99px;
    transition: width 0.8s var(--ease);
}

/* --- Divider gold --- */
.divider-gold {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 1.25rem 0;
}

/* --- Alert / notifiche --- */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    border: 0.5px solid transparent;
}

.alert-success {
    background: rgba(94, 229, 155, 0.08);
    border-color: rgba(94, 229, 155, 0.25);
    color: var(--green);
}

.alert-error {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.25);
    color: var(--red);
}

/* --- Sezione eyebrow generico (usato su più pagine) --- */
.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* --- Partners strip (home + eventuali altre pagine) --- */
.partners-section {
    padding: 1.75rem 0;
    background: transparent;
}

.partners-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.22em;
    color: #444;
    text-align: center;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.partners-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem 5.5rem;
}

.partner-name {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #777;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.partner-name:hover { color: #888; }

.partner-name--bpc {
    font-family: var(--font-sans);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #888;
    line-height: 1;
}

.partner-name--bpc-sub {
    display: block;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.16em;
    color: #666;
    margin-top: 3px;
}

/* --- Metodo (home + azienda) --- */
.method-section {
    padding: 5rem 0;
    background: #111;
    border-top: 0.5px solid rgba(255,255,255,0.06);
}

.method-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.method-title-col .section-eyebrow {
    color: #444;
    margin-bottom: 1rem;
}

.method-title {
    font-family: var(--font-sans);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #f0f0f0;
}

.method-steps {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.method-steps::-webkit-scrollbar { display: none; }

.method-step {
    flex: 1;
    min-width: 100px;
    padding-left: 1.5rem;
    position: relative;
}

.method-step:first-child { padding-left: 0; }

.method-step-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.5px;
    background: rgba(255,255,255,0.08);
}

.method-step-num {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 300;
    color: rgba(201,169,97,0.3);
    letter-spacing: -0.04em;
    margin-bottom: 0.6rem;
    line-height: 1;
}

.method-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 0.4rem;
}

.method-step-desc {
    font-size: 11px;
    color: #555;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .method-inner {
        grid-template-columns: 260px 1fr;
        align-items: start;
        gap: 5rem;
    }
}

/* --- Cookie wall btn --- */
.cookie-btn-accept {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem;
    background: var(--gold);
    color: #07090f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-height: 36px;
    transition: background var(--dur) var(--ease);
    white-space: nowrap;
}

.cookie-btn-accept:hover { background: var(--gold-light); }

/* --- Metodo: griglia 2 colonne su mobile invece dello scroll orizzontale --- */
@media (max-width: 640px) {
    .method-steps {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1.25rem;
        overflow: visible;
    }
    .method-step {
        min-width: 0;
        padding-left: 0;
        padding-bottom: 1.25rem;
        border-bottom: 0.5px solid rgba(255,255,255,0.08);
    }
    .method-step-line { display: none; }
    .method-step:last-child { border-bottom: none; }
    .method-step-num { font-size: 1.15rem; }
    .method-step-title { font-size: 12px; }
    .method-step-desc { font-size: 10.5px; }
}
