/* ============================================================
   WESTCOTT'S DECORATING - CONTACT (v2.7 §22 redesign)
   Content preserved; silent-fail form flow + spinner retained.
   Page prefix: wc-
   ============================================================ */

/* ============================================================
   FORM SECTION - photo band; form on a dark panel for contrast
   ============================================================ */
.wc-form-section {
    position: relative;
    background-image:
        linear-gradient(rgba(29,31,32,0.72), rgba(29,31,32,0.72)),
        url('/images/contact-hero.jpg');
    background-size: cover;
    background-position: center;
    padding: var(--section-y) 0;
    color: var(--grey);
}
.wc-form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;                 /* top-align so H1 sits level with form top */
    max-width: 1060px;
    margin: 0 auto;
}

/* Left column: H1 + intro, then note, then points */
.wc-intro-head { margin-bottom: 22px; }
.wc-intro-head h1 {
    font-size: var(--fs-h1);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 14px 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.wc-intro-head p {
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.6;
    margin: 0;
    max-width: 44ch;
    color: rgba(236,235,233,0.92);
}

/* Left column reassurance points */
.wc-intro-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}
.wc-intro-points span {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.0625rem;
    color: var(--grey);
}
.wc-intro-points i { color: var(--brand-light); }
.wc-intro-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(236,235,233,0.75);
    max-width: 40ch;
}
.wc-intro-note i { color: var(--brand-light); margin-top: 3px; }

/* Right: form on a solid dark-grey panel (better contrast) */
.wc-form-panel {
    position: relative;
    background: #3b3f41;                 /* dark grey, distinct from the photo */
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md);
}
.wc-form-panel-head { margin-bottom: 18px; }
.wc-form-panel-head h2 {
    font-size: var(--fs-h3);
    font-weight: 600;
    color: var(--white);
    margin: 0 0 6px 0;
}
.wc-form-panel-head p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(236,235,233,0.72);
    margin: 0;
}

.wc-form-messages > div {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 16px;
    text-align: left;
}

/* Loading overlay (spinner + 2s hold) */
.wc-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59,63,65,0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(5px);
}
.wc-spinner-container { text-align: center; }
.wc-spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(175,140,89,0.25);
    border-top: 4px solid var(--brand);
    border-radius: 50%;
    animation: wc-spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes wc-spin { to { transform: rotate(360deg); } }
.wc-loading-text { font-size: 1rem; color: var(--grey); margin: 0; font-weight: 500; }

.wc-form-section.is-submitting input,
.wc-form-section.is-submitting textarea,
.wc-form-section.is-submitting button { pointer-events: none; opacity: 0.6; }

.wc-form-fields { display: flex; flex-direction: column; gap: 14px; }
.wc-form-fields input,
.wc-form-fields textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid rgba(255,255,255,0.14);
    border-radius: var(--radius);
    font-size: 1rem;                 /* 16px min - no iOS zoom */
    background: rgba(255,255,255,0.06);
    color: var(--white);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.wc-form-fields input::placeholder,
.wc-form-fields textarea::placeholder { color: rgba(236,235,233,0.5); }
.wc-form-fields input:focus,
.wc-form-fields textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 0 0 3px rgba(175,140,89,0.25);
}
.wc-form-fields textarea { resize: none; min-height: 130px; }

.wc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wc-form-fields input.is-invalid,
.wc-form-fields textarea.is-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.18) !important;
}
.wc-submit { margin-top: 6px; width: 100%; }

/* ============================================================
   CONTACT DETAILS - wider cards
   ============================================================ */
.wc-details { padding: var(--section-y) 0; background: var(--grey); }
.wc-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1140px;              /* wider (was 960) */
    margin: 44px auto 0;
}
.wc-card {
    background: var(--white);
    padding: 40px 34px;            /* roomier */
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.wc-card-icon {
    width: 60px; height: 60px;
    background: var(--charcoal);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.wc-card-icon i { font-size: 1.35rem; color: var(--brand); }
.wc-card h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--charcoal); margin: 0 0 8px 0; }
.wc-card > p { font-size: 1rem; color: var(--charcoal); line-height: 1.5; margin: 0 0 14px 0; opacity: 0.75; }
.wc-card a, .wc-card span { font-size: 1rem; color: var(--charcoal); font-weight: 600; display: block; text-decoration: none; }
.wc-card a { transition: color 0.2s var(--ease); }
.wc-card a:hover { color: var(--brand); }
.wc-card .westcotts-phonenote { margin-top: 10px; font-weight: 400; text-align: center; }

/* ============================================================
   RESPONSIVE - form first on mobile, then intro, then cards
   ============================================================ */
@media (max-width: 900px) {
    .wc-form-section { background-attachment: scroll; }
    .wc-form-layout { grid-template-columns: 1fr; gap: 22px; max-width: 560px; }
    /* Let intro's children take part in ordering: head first, form next, rest after */
    .wc-intro { display: contents; }
    .wc-intro-head { order: 1; text-align: center; }
    .wc-intro-head p { margin-inline: auto; }
    .wc-form-panel { order: 2; }
    .wc-intro-note { order: 3; text-align: left; margin-top: 4px; }
    .wc-intro-points { order: 4; margin-top: 0; }

    .wc-cards { grid-template-columns: 1fr; gap: 16px; max-width: 420px; }
    .wc-card { padding: 32px 26px; }
    .wc-card:hover { transform: none; }
}

@media (max-width: 480px) {
    .wc-cards { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .wc-card:hover { transform: none; }
}
