/**
 * Corporate Gifting page — page-unique sections only.
 *
 * Shared editorial primitives (scope/reset, eyebrow, buttons, hero, section
 * scaffolding, trust strip) live in css/editorial.css under .cjw-ed. This
 * sheet keeps ONLY what is specific to corporate-gifting: hero lead/subtitle
 * sizing, the "what makes us different" grid, use-cases table, how-it-works
 * steps, featured Google review, FAQ, and the quote form + confirmation panel.
 *
 * Scope: .cjw-ed--cg. Tokens come from the --ed-* aliases in editorial.css.
 * Loaded only when templates/page-corporate-gifting.php is active.
 */

/* --- Hero (per-page type scale) ---------------------------------------- */
.cjw-ed--cg .cjw-hero__lead {
    font-size: clamp(22px, 3.2vw, 44px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.9);
    max-width: 32ch;
    margin: 0 0 24px;
}
.cjw-ed--cg .cjw-hero__lead em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.78);
}
.cjw-ed--cg .cjw-hero__title em {
    font-style: italic;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: -0.01em;
}

/* --- 3. What makes us different --------------------------------------- */
.cg-diff__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--ed-rule);
}
.cg-diff__card {
    padding: 36px 28px 36px 0;
    border-right: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
}
.cg-diff__card:nth-child(3n) { border-right: none; padding-right: 0; }
.cg-diff__card:not(:first-child) { padding-left: 28px; }

.cg-diff__num {
    font-family: var(--ed-mono);
    font-size: 13px;
    color: var(--ed-mute-soft);
    letter-spacing: 0.1em;
}

.cjw-ed--cg .cg-diff__card h3 {
    margin-top: 14px;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ed-ink);
    max-width: 22ch;
}

.cg-diff__proof {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ed-mute);
}

/* --- 4. Use cases table ----------------------------------------------- */
.cg-table-wrap {
    border-top: 1px solid var(--ed-ink);
    border-bottom: 1px solid var(--ed-ink);
    overflow-x: auto;
}

.cg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: var(--ed-paper);
    color: var(--ed-ink);
}

.cg-table thead th {
    font-family: var(--ed-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ed-mute-soft);
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--ed-rule-strong);
    background: var(--ed-paper-alt);
    font-weight: 500;
}

.cg-table tbody th,
.cg-table tbody td {
    padding: 22px 20px;
    border-bottom: 1px solid var(--ed-rule);
    vertical-align: top;
    text-align: left;
}
.cg-table tbody tr:last-child th,
.cg-table tbody tr:last-child td {
    border-bottom: none;
}

.cg-table th:nth-child(1),
.cg-table tbody tr > *:nth-child(1) { width: 22%; }
.cg-table th:nth-child(2),
.cg-table tbody tr > *:nth-child(2) { width: 42%; }
.cg-table th:nth-child(3),
.cg-table tbody tr > *:nth-child(3) { width: 20%; }
.cg-table th:nth-child(4),
.cg-table tbody tr > *:nth-child(4) { width: 16%; }

.cg-table tbody th {
    font-weight: 600;
    color: var(--ed-ink);
}

.cg-table tbody td {
    color: var(--ed-mute);
}
.cg-table tbody td:nth-child(3) {
    font-family: var(--ed-mono);
    color: var(--ed-ink);
    white-space: nowrap;
}
.cg-table tbody td:nth-child(4) {
    font-family: var(--ed-mono);
    font-size: 13px;
    color: var(--ed-mute);
    white-space: nowrap;
}

.cg-table tbody tr:hover {
    background: var(--ed-paper-alt);
}

/* --- 5. How it works -------------------------------------------------- */
.cg-how__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--ed-rule);
}
.cg-how__step {
    padding: 32px 24px 32px 0;
    border-right: 1px solid var(--ed-rule);
    border-bottom: 1px solid var(--ed-rule);
}
.cg-how__step:nth-child(4n) { border-right: none; padding-right: 0; }
.cg-how__step:not(:first-child) { padding-left: 24px; }

.cg-how__num {
    font-family: var(--ed-mono);
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--ed-mute-soft);
    font-weight: 600;
}

.cjw-ed--cg .cg-how__step h3 {
    margin-top: 14px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ed-ink);
    max-width: 22ch;
}

.cg-how__step p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ed-mute);
}

/* --- 6. Featured Google review ---------------------------------------- */
.cg-quote {
    background: var(--ed-ink);
    color: #fff;
    padding: var(--ed-pad-y) var(--ed-pad-x);
    position: relative;
    overflow: hidden;
}
.cg-quote::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 480px at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%);
    pointer-events: none;
}
.cg-quote__inner {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    text-align: left;
}
.cg-quote__mark {
    display: block;
    font-family: var(--ed-serif);
    font-size: clamp(80px, 12vw, 140px);
    line-height: 0.6;
    color: rgba(255, 255, 255, 0.18);
    margin-bottom: 24px;
}
.cg-quote__body {
    margin: 0;
    padding: 0;
    border: none;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.45;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    font-style: italic;
}
.cg-quote__attr {
    margin-top: 28px;
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Quote band is dark — invert the primary CTA like the hero does. */
.cg-quote .cjw-btn--primary {
    background: #fff;
    color: var(--ed-ink);
    border-color: #fff;
}
.cg-quote .cjw-btn--primary:hover,
.cg-quote .cjw-btn--primary:focus-visible {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.cg-quote .cjw-btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}
.cg-quote .cjw-btn--ghost:hover,
.cg-quote .cjw-btn--ghost:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* --- 7. FAQ ----------------------------------------------------------- */
.cg-faq__list {
    border-top: 1px solid var(--ed-rule);
}
.cg-faq__item {
    border-bottom: 1px solid var(--ed-rule);
}
.cg-faq__item summary {
    list-style: none;
    cursor: pointer;
    padding: 24px 56px 24px 0;
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 600;
    color: var(--ed-ink);
    position: relative;
    transition: color 0.18s ease;
}
.cg-faq__item summary::-webkit-details-marker { display: none; }
.cg-faq__item summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background:
        linear-gradient(currentColor, currentColor) center/100% 1.5px no-repeat,
        linear-gradient(currentColor, currentColor) center/1.5px 100% no-repeat;
    transition: transform 0.2s ease;
}
.cg-faq__item[open] summary::after {
    background: linear-gradient(currentColor, currentColor) center/100% 1.5px no-repeat;
}
.cg-faq__item summary:hover { color: var(--ed-ink-soft); }
.cg-faq__item[open] summary { color: var(--ed-ink); }
.cg-faq__item p {
    padding: 0 56px 24px 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ed-mute);
    max-width: 70ch;
}

/* --- 8. Form ---------------------------------------------------------- */
.cg-form-section {
    background: var(--ed-paper-alt);
    max-width: none;
    border-top: 1px solid var(--ed-rule);
    padding: var(--ed-pad-y) var(--ed-pad-x);
    scroll-margin-top: 80px;
}
.cg-form-section .cjw-section__head,
.cg-form,
.cg-confirm {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.cg-form {
    background: #fff;
    border: 1px solid var(--ed-rule);
    padding: clamp(28px, 4vw, 48px);
}

.cg-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.cg-form__row:last-of-type { margin-bottom: 28px; }

.cg-field { display: flex; flex-direction: column; }
.cg-field--full { grid-column: 1 / -1; }

.cg-field__label {
    font-family: var(--ed-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ed-mute);
    margin-bottom: 8px;
}
.cg-field__label em {
    color: var(--ed-ink);
    font-style: normal;
    margin-left: 2px;
}
.cg-field__opt {
    font-family: var(--ed-display);
    text-transform: none;
    letter-spacing: 0;
    color: var(--ed-mute-soft);
    font-size: 12px;
    margin-left: 4px;
}

.cg-field input,
.cg-field select,
.cg-field textarea {
    width: 100%;
    font-family: var(--ed-display);
    font-size: 15px;
    line-height: 1.4;
    color: var(--ed-ink);
    padding: 12px 16px;
    border: 1px solid var(--ed-rule-strong);
    border-radius: 0;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}
/* Lock single-line inputs/selects to a uniform height so <select> doesn't
   inherit the browser's intrinsic option-row height. */
.cg-field input,
.cg-field select {
    height: 46px;
}
.cg-field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.cg-field select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ed-ink) 50%),
        linear-gradient(135deg, var(--ed-ink) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.cg-field input:focus,
.cg-field select:focus,
.cg-field textarea:focus {
    outline: none;
    border-color: var(--ed-ink);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.cg-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cg-form__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.cg-form__fineprint {
    font-size: 12px;
    color: var(--ed-mute-soft);
    margin: 0;
    flex: 1;
    min-width: 220px;
}
.cg-form__fineprint strong { color: var(--ed-ink); font-weight: 600; }

.cg-form__error {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fff4f4;
    border-left: 3px solid #c0392b;
    color: #7a1f15;
    font-size: 14px;
}

/* Confirmation panel */
.cg-confirm {
    background: #fff;
    border: 1px solid var(--ed-rule);
    padding: clamp(36px, 5vw, 64px);
    text-align: left;
}
.cjw-ed--cg .cg-confirm__title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ed-ink);
    margin: 0 0 16px;
}
.cg-confirm__body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ed-mute);
    margin: 0 0 28px;
}
.cg-confirm__body a {
    color: var(--ed-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cg-confirm__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.cg-confirm .cjw-btn--ghost {
    color: var(--ed-ink);
    border-color: var(--ed-rule-strong);
}
.cg-confirm .cjw-btn--ghost:hover {
    border-color: var(--ed-ink);
    background: var(--ed-paper-alt);
}

/* --- Responsive (page-unique sections) -------------------------------- */
@media (max-width: 1024px) {
    .cg-diff__grid { grid-template-columns: 1fr; }
    .cg-diff__card { border-right: none; padding: 28px 0; }
    .cg-diff__card:not(:first-child) { padding-left: 0; }

    .cg-how__steps { grid-template-columns: repeat(2, 1fr); }
    .cg-how__step:nth-child(2n) { border-right: none; }
    .cg-how__step:not(:nth-child(2n+1)) { padding-left: 24px; }
    .cg-how__step:nth-child(2n+1) { padding-right: 24px; padding-left: 0; }
}

@media (max-width: 720px) {
    .cg-how__steps { grid-template-columns: 1fr; }
    .cg-how__step,
    .cg-how__step:nth-child(2n+1) {
        border-right: none;
        padding: 24px 0;
    }
    .cg-how__step:not(:first-child) { padding-left: 0; }

    .cg-form__row { grid-template-columns: 1fr; }

    .cg-table thead { display: none; }
    .cg-table,
    .cg-table tbody,
    .cg-table tr,
    .cg-table th,
    .cg-table td { display: block; width: 100%; }
    .cg-table tbody tr {
        padding: 18px 0;
        border-bottom: 1px solid var(--ed-rule);
    }
    .cg-table tbody tr:last-child { border-bottom: none; }
    .cg-table tbody th,
    .cg-table tbody td {
        padding: 4px 0;
        border-bottom: none;
        width: 100%;
    }
    .cg-table tbody th {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .cg-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-family: var(--ed-mono);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--ed-mute-soft);
        margin-top: 8px;
    }
}
