/* Enko Media Group: inner pages (pricing, quote, case studies, legal).
   Builds on site.css; never redefine tokens here. */

/* ---------- Pricing: the rate sheet ---------- */

.plans { margin-top: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--rule); }
.plan {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr) minmax(0, 4fr) minmax(0, 2.6fr);
    gap: clamp(20px, 3vw, 48px);
    align-items: start;
    padding-block: clamp(28px, 3.4vw, 44px);
    border-top: 1px solid var(--rule);
}
.plan__name {
    font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.125rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.025em;
}
.plan__pick { display: inline-block; margin-top: 10px; font-weight: 800; font-size: 0.9375rem; }
.plan__for { margin-top: 8px; color: var(--ink-soft); font-size: 0.9375rem; }
.plan__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 8px;
}
.plan__amount {
    font-size: clamp(2.25rem, 1.4rem + 2.2vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
}
.plan__cadence { color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; }
.plan__includes { display: grid; gap: 10px; padding-top: 6px; }
.plan__includes li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    text-wrap: pretty;
}
.plan__includes svg { margin-top: 0.2em; color: var(--blue); }
.plan__includes strong { font-weight: 700; }
.plan__action { display: grid; gap: 10px; }
.plan__action .btn { width: 100%; }
.plan__action-note { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.45; }
.plan--featured .plan__name { padding-top: 0; }
.plan--once { background: transparent; }
.plan--once .plan__amount { font-size: clamp(2rem, 1.3rem + 1.8vw, 3rem); }

.terms-list { display: grid; padding-top: 8px; }
.terms-list li {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 24px;
    padding-block: 18px;
    border-top: 1px solid var(--rule);
    text-wrap: pretty;
}
.terms-list li:first-child { border-top: 0; padding-top: 0; }
.terms-list b { font-weight: 800; }
.terms-list span { color: var(--ink-soft); max-width: 52ch; }

/* ---------- Quote: the reply form ---------- */

.quote-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: var(--col-gap);
    align-items: start;
    padding-bottom: var(--section);
}

.quote-builder {
    background: var(--sheet);
    border-radius: 8px;
    box-shadow: var(--lift);
    padding: clamp(22px, 3vw, 44px);
}
.quote-builder__intro { color: var(--ink-soft); max-width: 52ch; text-wrap: pretty; }

.progress-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-block: 24px 32px;
    counter-reset: qstep;
}
.progress-step {
    counter-increment: qstep;
    padding-top: 10px;
    border-top: 3px solid var(--rule);
    color: var(--ink-soft);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.progress-step::before { content: counter(qstep) " "; font-variant-numeric: tabular-nums; }
.progress-step.active { border-top-color: var(--blue); color: var(--ink); }

.form-step { border: 0; padding: 0; min-width: 0; }
.js .form-step { display: none; }
.js .form-step.active { display: block; }
html:not(.js) .form-step + .form-step { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--rule); }
html:not(.js) .form-navigation { display: none; }
html:not(.js) .form-step:last-child .form-navigation { display: flex; }
html:not(.js) .form-step:last-child .btn-prev { display: none; }
.form-step legend {
    padding: 0;
    font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin-bottom: 20px;
}
.form-step legend:focus { outline: none; }
.form-step legend:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.form-group { display: grid; gap: 8px; margin-bottom: 22px; }
.form-group > label:not(.choice) { font-weight: 600; font-size: 0.9375rem; }
.form-hint { font-size: 0.875rem; color: var(--ink-soft); }
.form-hint .tbc { font-weight: 600; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.choice {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px 0 14px;
    border-radius: 8px;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px var(--rule);
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.choice:hover { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.choice:has(input:checked) { background: var(--blue-wash); box-shadow: inset 0 0 0 2px var(--blue); }
.choice:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.choice input:focus-visible { outline: none; }

.field {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px var(--rule);
    font-size: 1rem;
    transition: box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.field:hover { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.field:focus { outline: 0; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--blue); }
.field::placeholder { color: var(--ink-faint); }
.field:user-invalid { box-shadow: inset 0 0 0 2px var(--error); }
textarea.field { resize: vertical; line-height: 1.5; min-height: 150px; }
select.field {
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121418' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    cursor: pointer;
}

.form-navigation { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 8px; }
.form-navigation .btn-next, .form-navigation [type="submit"] { margin-left: auto; }

/* quote.js writes its own thank-you markup into .quote-builder */
.quote-builder > div[style] { padding-block: 24px; }
.quote-builder > div[style] h3 { font-size: clamp(1.85rem, 1.1rem + 2.2vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.quote-builder > div[style] p { margin-top: 10px; color: var(--ink-soft); }
.quote-builder .btn-primary {
    display: inline-flex; align-items: center; min-height: 56px; margin-top: 24px; padding: 14px 22px;
    border-radius: 8px; background: var(--blue); color: var(--on-blue); font-weight: 700; text-decoration: none;
    box-shadow: 0 1px 0 rgb(18 20 24 / 0.2), 0 10px 24px -12px rgb(35 64 255 / 0.7);
}
.quote-builder .btn-primary:hover { background: var(--blue-deep); color: var(--on-blue); }

.talk { position: sticky; top: 24px; display: grid; gap: 0; }
.talk h2 { font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.125rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
.talk__intro { margin-top: 10px; color: var(--ink-soft); }
.talk__lines { margin-top: 22px; border-top: 1px solid var(--rule); }
.talk__lines li { padding-block: 14px; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.talk__lines b { font-weight: 800; font-size: 0.9375rem; }
.talk__lines a { font-weight: 600; overflow-wrap: anywhere; }
.talk__hour { margin-top: 24px; color: var(--ink-soft); text-wrap: pretty; }
.talk__hour strong { color: var(--ink); }
.talk .btn { margin-top: 16px; width: 100%; }

/* ---------- Case studies index ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: clamp(28px, 3vw, 40px);
}
.filter-bar__label { font-weight: 800; margin-right: 8px; }
.filter-btn {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--sheet);
    box-shadow: inset 0 0 0 1px var(--rule);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.filter-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.filter-btn.active { background: var(--ink); color: var(--paper); box-shadow: none; }
.filter-status { margin-left: auto; font-size: 0.875rem; color: var(--ink-soft); }
.case-study-card.hide { display: none; }

/* ---------- Single case study ---------- */

.study-lead {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 3.4fr);
    gap: clamp(32px, 5vw, 88px);
    align-items: end;
    padding-block: clamp(20px, 3vw, 40px) clamp(40px, 5vw, 72px);
}
.study-lead .lead__title { margin-top: 16px; }
.facts {
    display: grid;
    border-top: 1px solid var(--rule);
    font-size: 0.9375rem;
}
.facts div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 800; }
.facts dd { color: var(--ink-soft); text-wrap: pretty; }

.study-files {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding-bottom: calc(var(--section) * 0.8);
}
.study-files .attach { padding: 8px; }
.study-files .attach--photo img { aspect-ratio: 16 / 10; }
.study-files .attach--portrait img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; }
.study-files--single { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.study-files .attach:only-child { grid-column: auto; }
.entries--index { margin-top: 0; }
.attach__note { display: block; padding: 8px 4px 2px; }

.quote-block { max-width: 40ch; }
.quote-block p {
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
    line-height: 1.32;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-wrap: pretty;
}
.quote-block footer { margin-top: 16px; color: var(--ink-soft); font-size: 0.9375rem; display: grid; gap: 8px; justify-items: start; }

/* ---------- Legal ---------- */

.legal {
    display: grid;
    grid-template-columns: minmax(0, 3.4fr) minmax(0, 8fr);
    gap: var(--col-gap);
    align-items: start;
    padding-bottom: var(--section);
}
.toc { position: sticky; top: 24px; font-size: 0.9375rem; }
.toc h2 { font-weight: 800; font-size: 0.9375rem; margin-bottom: 8px; }
.toc ol { border-top: 1px solid var(--rule); }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding-block: 9px; color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--blue); text-decoration: underline; }

.legal__body { max-width: 68ch; }
.legal__section { padding-block: 32px; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.legal__section:first-child { border-top: 0; padding-top: 0; }
.legal__section h2 {
    font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    text-wrap: balance;
}
.legal__section p, .legal__section ul { text-wrap: pretty; }
.legal__section p + p, .legal__section p + ul, .legal__section ul + p { margin-top: 0.9em; }
.legal__section ul { display: grid; gap: 8px; padding-left: 1.2em; list-style: disc; }
.legal__section li::marker { color: var(--ink-soft); }
.legal__section strong { font-weight: 700; }
.legal__section a { overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .plan { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .plan__includes { grid-column: 1 / -1; grid-row: 2; }
    .plan__action { grid-column: 1 / -1; max-width: 360px; }
    .quote-layout { grid-template-columns: minmax(0, 1fr); }
    .talk { position: static; max-width: 560px; }
}

@media (max-width: 860px) {
    .plan { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .plan__price, .plan__includes, .plan__action { grid-column: auto; grid-row: auto; }
    .plan__action { max-width: none; }
    .terms-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }

    .study-lead { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .study-files { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
    .study-files .attach { padding: 6px; }

    .filter-status { margin-left: 0; flex-basis: 100%; }

    .legal { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .toc { position: static; }
}

@media (max-width: 520px) {
    .study-files { grid-template-columns: minmax(0, 1fr); }
    .study-files .attach:not(.attach--photo):not(.attach--portrait) { max-width: 200px; }
    .form-navigation .btn { flex: 1; justify-content: center; }
}

/* ---- Welcome page ---- */
.welcome-video .block__head { margin-bottom: 20px; }
.video { max-width: 860px; border-radius: 8px; background: var(--sheet); box-shadow: var(--lift); padding: 6px; }
.video--ready { aspect-ratio: 16 / 9; }
.video iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 4px; }
.video__fallback { padding: clamp(20px, 4vw, 36px); max-width: 62ch; }
.video__fallback-title { font-weight: 800; font-size: 1.25rem; margin-bottom: 8px; }
.ready-list { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; max-width: 60ch; }
.ready-list li::marker { color: var(--ink-soft); }
[data-for][hidden] { display: none !important; }

/* ---- Custom checkout page ---- */
.co { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: var(--section, 96px); }
.co-summary { position: sticky; top: 24px; background: var(--sheet); border-radius: 8px; box-shadow: var(--lift); padding: clamp(20px, 3vw, 32px); }
.co-summary__title { font-family: var(--font-meta); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.co-summary__name { margin-top: 10px; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.co-summary__list { margin-top: 14px; display: grid; gap: 8px; padding-left: 1.2em; list-style: disc; color: var(--ink-soft); }
.co-totals { margin-top: 22px; border-top: 1px solid var(--rule); }
.co-totals div { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.co-totals dt { color: var(--ink-soft); }
.co-totals dd { font-variant-numeric: tabular-nums; text-align: right; }
.co-totals__total dt, .co-totals__total dd { color: var(--ink); font-weight: 800; font-size: 1.125rem; }
.co-summary__note { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-soft); }
.co-summary__change { display: inline-block; margin-top: 14px; font-size: 0.9375rem; color: var(--blue); }
.co-form { display: grid; gap: 28px; }
.co-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.co-step legend { font-weight: 800; font-size: 1.125rem; margin-bottom: 12px; }
.co-label { display: block; font-size: 0.9375rem; color: var(--ink-soft); margin-bottom: 6px; }
.co-input { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); }
.co-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.co-input[aria-invalid="true"] { border-color: #C42B1C; }
.co-field-error, .co-error { color: #C42B1C; font-size: 0.9375rem; min-height: 0; }
.co-field-error:empty, .co-error:empty { display: none; }
.co-element { min-height: 44px; }
.co-terms { font-size: 0.9375rem; color: var(--ink-soft); }
.co-pay { width: 100%; justify-content: center; padding-block: 16px; font-size: 1.0625rem; }
.co-pay[disabled] { opacity: 0.6; cursor: not-allowed; }
.co-pay[aria-busy="true"] { cursor: progress; }
.co-secure { font-size: 0.875rem; color: var(--ink-soft); }
.co-secure svg { display: inline-block; vertical-align: -3px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.co-secure a { overflow-wrap: anywhere; }
.co-fatal { background: var(--sheet); border-radius: 8px; box-shadow: var(--lift); padding: 24px; }
@media (max-width: 860px) {
  .co { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; }
}
