/* public/css/speak-to-coutts.css
   ---------------------------------------------------------------------------
   SPEAK TO COUTTS — advisory and enquiry hub.

   Every selector is namespaced .stc-* and the page carries body class .page-stc,
   so nothing here can reach another template. Colours and sizes reuse the values
   already established across the redesigned site (navy #0B1626, gold #C9A227 on
   light / #D9B65A on dark, the system font stack) rather than inventing a
   parallel system.
   --------------------------------------------------------------------------- */

.page-stc {
    --s-navy:   #0B1626;
    --s-navy-2: #071525;
    --s-panel:  #0C1D31;
    --s-gold:   #C9A227;   /* accents on light grounds */
    --s-gold-d: #D9B65A;   /* the same gold lifted for dark grounds */
    --s-ink:    #F4F6F9;
    --s-line:   #E3E7EE;
    --s-muted:  #6B7688;   /* 5.4:1 on white */
    --s-soft:   #F7F8FA;
    --s-font:   system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

    /* One type scale for the whole page, so the form, the summary and the offices
       cannot drift apart the way independently-authored sections do. */
    --s-fs-h1:      clamp(1.6rem, 3vw, 2.4rem);
    --s-fs-h2:      1.15rem;
    --s-fs-lead:    clamp(.92rem, 1.2vw, 1rem);
    --s-fs-body:    .9rem;
    --s-fs-input:   1rem;    /* below 16px, iOS Safari zooms the page on focus */
    --s-fs-label:   .82rem;
    --s-fs-meta:    .78rem;
    --s-fs-eyebrow: .7rem;

    background: var(--s-soft);
    font-family: var(--s-font);
}

/* tl.css applies Manrope and uppercase to every heading globally; this page sets its
   own type, so those are neutralised within its scope. */
.page-stc h1, .page-stc h2, .page-stc h3, .page-stc h4 {
    font-family: var(--s-font); text-transform: none; letter-spacing: normal;
}

.stc-wrap { max-width: var(--cx-container); margin: 0 auto; padding: 0 var(--cx-gutter); }
.stc-wrap--center { text-align: center; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.stc-hero {
    background: linear-gradient(135deg, var(--s-navy-2) 0%, #0d2136 60%, var(--s-navy-2) 100%);
    color: var(--s-ink);
    padding: clamp(2.4rem, 5vw, 4rem) clamp(1rem, 4vw, 2.4rem) clamp(2rem, 4vw, 3rem);
}
.stc-hero--slim { padding-bottom: clamp(2.4rem, 5vw, 3.4rem); }
.stc-hero-inner { max-width: var(--cx-container); margin: 0 auto; }

.stc-eyebrow {
    font-size: var(--s-fs-eyebrow); font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--s-gold-d); margin: 0 0 .6rem;
}
/* 600, not 800: no system UI face ships an 800, so a heavier value is synthesised
   and reads as a smeared display font rather than as the site's typography. */
.stc-h1 {
    font-size: var(--s-fs-h1); font-weight: 600; line-height: 1.15;
    letter-spacing: -.018em; color: var(--s-ink); margin: 0 0 .7rem;
    max-width: 20ch; text-wrap: balance;
}
.stc-lead {
    font-size: var(--s-fs-lead); line-height: 1.6; color: rgba(244,246,249,.8);
    max-width: 62ch; margin: 0 0 1.2rem; text-wrap: pretty;
}
.stc-lead--sm { font-size: var(--s-fs-body); }

/* Originating Guide/Insight */
.stc-source {
    display: inline-flex; flex-direction: column; gap: .2rem;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
    border-left: 3px solid var(--s-gold-d); border-radius: var(--cx-radius);
    padding: .7rem 1rem; margin: 0 0 1.4rem; text-decoration: none; max-width: 46ch;
}
.stc-source:hover { background: rgba(255,255,255,.08); }
.stc-source-kind {
    font-size: var(--s-fs-eyebrow); font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--s-gold-d);
}
.stc-source-title { font-size: var(--s-fs-body); color: var(--s-ink); line-height: 1.35; }

.stc-direct { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.stc-direct--center { justify-content: center; margin-bottom: 1rem; }
.stc-direct-link {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: var(--s-fs-body); font-weight: 500;
    color: rgba(244,246,249,.82); text-decoration: none;
}
.stc-direct-link:hover { color: var(--s-gold-d); }
.stc-direct-link svg { width: 15px; height: 15px; color: var(--s-gold-d); }
.stc-direct-link:focus-visible { outline: 2px solid var(--s-gold-d); outline-offset: 3px; border-radius: var(--cx-radius-xs); }

/* Reference block on the confirmation */
.stc-ref {
    display: inline-flex; flex-direction: column; gap: .25rem;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--cx-radius-lg); padding: .8rem 1.2rem; margin: 0 0 1.2rem;
}
.stc-ref-label {
    font-size: var(--s-fs-eyebrow); letter-spacing: .12em; text-transform: uppercase;
    color: rgba(244,246,249,.6);
}
.stc-ref-code {
    font-size: 1.15rem; font-weight: 600; letter-spacing: .06em; color: var(--s-gold-d);
}

/* ── Form + summary ───────────────────────────────────────────────────────── */

.stc-main { padding: clamp(2rem, 4vw, 3rem) 0; }
/* 65/35, as the brief specifies. minmax(0,…) on the form column stops a long
   <select> option from forcing the column past its share. */
.stc-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(1.2rem, 2.4vw, 2.2rem); align-items: start; }

.stc-formcol { background: #fff; border: 1px solid var(--s-line); border-radius: var(--cx-radius-xl);
    padding: clamp(1.2rem, 2.4vw, 2rem); }

.stc-alert {
    background: #FDF2F2; border: 1px solid #F3C9C9; border-left: 3px solid #B3261E;
    border-radius: var(--cx-radius); padding: .9rem 1.1rem; margin-bottom: 1.4rem;
    font-size: var(--s-fs-body); color: #7A1B15;
}
.stc-alert ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.stc-alert:focus-visible { outline: 2px solid #B3261E; outline-offset: 2px; }

.stc-step { border: 0; padding: 0; margin: 0 0 1.6rem; }
.stc-step legend {
    display: flex; align-items: center; gap: .55rem;
    font-size: var(--s-fs-h2); font-weight: 600; color: var(--s-navy);
    margin: 0 0 .8rem; padding: 0;
}
.stc-stepn {
    font-size: var(--s-fs-meta); font-weight: 600; color: var(--s-gold);
    background: rgba(201,162,39,.1); border-radius: var(--cx-radius-sm); padding: .18rem .45rem;
}

/* ---- Chips (radio groups styled as selectable pills) ----
   The input stays in the DOM and keeps its native semantics — it is only visually
   replaced. A div-with-click would lose keyboard operation, arrow-key group
   navigation and screen-reader announcement, all of which §34 requires. */
.stc-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.stc-chip { position: relative; }
.stc-chip input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; margin: 0;
}
.stc-chip span {
    display: block; padding: .55rem 1rem; border-radius: var(--cx-radius-pill);
    border: 1px solid var(--s-line); background: #fff;
    font-size: var(--s-fs-label); color: var(--s-navy);
    transition: border-color var(--cx-duration-sm) ease, background-color var(--cx-duration-sm) ease;
}
.stc-chip:hover span { border-color: var(--s-gold); }
.stc-chip input:checked + span {
    background: var(--s-navy); border-color: var(--s-navy); color: #fff;
}
/* Focus lands on the invisible input, so the ring has to be drawn on its sibling. */
.stc-chip input:focus-visible + span { outline: 2px solid var(--s-gold); outline-offset: 2px; }

/* ---- Fields ---- */
.stc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.stc-field--full { grid-column: 1 / -1; }

/* Labels above fields, always present. Placeholder-only labelling disappears the
   moment someone types, which is exactly when they most need to check the field. */
.stc-label {
    display: block; font-size: var(--s-fs-label); font-weight: 600;
    color: var(--s-navy); margin-bottom: .3rem;
}
.stc-req { color: #B3261E; }
.stc-input {
    width: 100%; font-family: var(--s-font); font-size: var(--s-fs-input);
    color: var(--s-navy); background: #fff;
    border: 1px solid var(--s-line); border-radius: var(--cx-radius); padding: .65rem .8rem;
    transition: border-color var(--cx-duration-sm) ease, box-shadow var(--cx-duration-sm) ease;
}
.stc-input:hover { border-color: #C9CFDA; }
.stc-input:focus {
    outline: none; border-color: var(--s-gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}
.stc-textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.stc-help { font-size: var(--s-fs-meta); color: var(--s-muted); margin: .35rem 0 0; }

.stc-schedule { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--s-line); }

/* Honeypot: removed from view without display:none, which some bots detect. */
.stc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.stc-consent {
    display: flex; gap: .6rem; align-items: flex-start;
    font-size: var(--s-fs-body); line-height: 1.5; color: var(--s-navy);
    margin: 0 0 1.4rem;
}
.stc-consent input { margin-top: .22rem; width: 17px; height: 17px; flex: none; accent-color: var(--s-gold); }
.stc-consent a { color: #8A6E12; }

.stc-submit {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--s-gold); color: #1A1204; border: 0; border-radius: var(--cx-radius);
    font-family: var(--s-font); font-size: var(--s-fs-label); font-weight: 600;
    padding: .8rem 1.6rem; cursor: pointer;
    transition: transform var(--cx-duration-sm) ease, box-shadow var(--cx-duration-sm) ease, opacity var(--cx-duration-sm) ease;
}
.stc-submit:hover { transform: translateY(var(--cx-hover-lift)); box-shadow: 0 8px 22px rgba(201,162,39,.3); }
.stc-submit:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.stc-submit:focus-visible { outline: 2px solid var(--s-navy); outline-offset: 3px; }

/* ---- Summary panel ---- */
.stc-summary { position: sticky; top: 1.2rem; }
.stc-summary-inner {
    background: var(--s-panel); color: var(--s-ink);
    border: 1px solid rgba(255,255,255,.09); border-radius: var(--cx-radius-xl);
    padding: clamp(1.1rem, 2vw, 1.5rem);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 26px rgba(11,22,38,.16);
}
.stc-summary-title {
    font-size: var(--s-fs-label); font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--s-gold-d); margin: 0 0 .9rem;
}
.stc-summary-list { margin: 0; }
.stc-summary-row { padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.stc-summary-row dt {
    font-size: var(--s-fs-eyebrow); letter-spacing: .08em; text-transform: uppercase;
    color: rgba(244,246,249,.55); margin-bottom: .18rem;
}
.stc-summary-row dd {
    margin: 0; font-size: var(--s-fs-body); color: var(--s-ink);
    display: flex; align-items: center; gap: .45rem;
}
.stc-summary-row .fi { width: 20px; height: 14px; border-radius: var(--cx-radius-xs); flex: none; }
.stc-summary-row .fi:not([class*=" fi-"]) { display: none; }
.stc-summary-empty { font-size: var(--s-fs-meta); color: rgba(244,246,249,.55); margin: 0 0 .5rem; }

.stc-next-title {
    font-size: var(--s-fs-label); font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(244,246,249,.65); margin: 1.4rem 0 .7rem;
}
.stc-next { list-style: none; margin: 0; padding: 0; }
.stc-next li {
    display: flex; gap: .6rem; align-items: baseline;
    font-size: var(--s-fs-body); color: rgba(244,246,249,.85); padding: .3rem 0;
}
.stc-next li span {
    font-size: var(--s-fs-eyebrow); font-weight: 600; color: var(--s-gold-d); flex: none;
}
.stc-discreet { font-size: var(--s-fs-meta); color: rgba(244,246,249,.55); margin: 1.1rem 0 0; }
.stc-offices .stc-discreet { color: var(--s-muted); }

/* ── Statistics ───────────────────────────────────────────────────────────── */

.stc-stats { background: var(--s-navy); padding: clamp(1.4rem, 2.6vw, 2rem) 0; }
.stc-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.2rem; }
.stc-stat { text-align: center; }
.stc-stat-n { display: block; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 600;
    color: var(--s-gold-d); line-height: 1; letter-spacing: -.015em; }
.stc-stat-l { display: block; font-size: var(--s-fs-meta); font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-top: .35rem; }
.stc-stat-s { display: block; font-size: var(--s-fs-eyebrow); color: rgba(255,255,255,.6); margin-top: .2rem; }

/* ── Offices, FAQs, recommendations ───────────────────────────────────────── */

.stc-offices, .stc-faq, .stc-recs { padding: clamp(2rem, 4vw, 3rem) 0; }
.stc-h2 { font-size: var(--s-fs-h2); font-weight: 600; color: var(--s-navy);
    letter-spacing: -.01em; margin: 0 0 .4rem; text-wrap: balance; }
.stc-sub { font-size: var(--s-fs-body); color: var(--s-muted); margin: 0 0 1.4rem; }

.stc-office-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stc-office { background: #fff; border: 1px solid var(--s-line); border-radius: var(--cx-radius-lg); padding: 1.1rem 1.25rem; }
.stc-office-city { display: flex; align-items: center; gap: .5rem;
    font-size: var(--s-fs-label); font-weight: 600; color: var(--s-navy); margin-bottom: .5rem; }
.stc-office-city .fi { width: 20px; height: 14px; border-radius: var(--cx-radius-xs); }
.stc-office address { font-style: normal; font-size: var(--s-fs-body);
    line-height: 1.55; color: var(--s-muted); margin: 0 0 .6rem; }
.stc-office-tel { font-size: var(--s-fs-body); font-weight: 600; color: #8A6E12; text-decoration: none; }
.stc-office-tel:hover { text-decoration: underline; }

.stc-faq-list { display: grid; gap: .5rem; max-width: 800px; }
.stc-faq-item { background: #fff; border: 1px solid var(--s-line); border-radius: var(--cx-radius-lg); }
.stc-faq-item summary {
    cursor: pointer; padding: .85rem 1.1rem; list-style: none;
    font-size: var(--s-fs-body); font-weight: 600; color: var(--s-navy);
}
.stc-faq-item summary::-webkit-details-marker { display: none; }
.stc-faq-item summary::after { content: '+'; float: right; color: var(--s-gold); font-weight: 600; }
.stc-faq-item[open] summary::after { content: '−'; }
.stc-faq-item summary:focus-visible { outline: 2px solid var(--s-gold); outline-offset: -2px; border-radius: var(--cx-radius-lg); }
.stc-faq-item p { margin: 0; padding: 0 1.1rem 1rem; font-size: var(--s-fs-body);
    line-height: 1.6; color: var(--s-muted); }

.stc-rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stc-rec { display: flex; flex-direction: column; gap: .3rem;
    background: #fff; border: 1px solid var(--s-line); border-radius: var(--cx-radius-lg);
    padding: 1.1rem 1.25rem; text-decoration: none;
    transition: border-color var(--cx-duration-sm) ease, transform var(--cx-duration-sm) ease; }
.stc-rec:hover { border-color: var(--s-gold); transform: translateY(var(--cx-hover-lift)); }
.stc-rec-kind { font-size: var(--s-fs-eyebrow); font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #8A6E12; }
.stc-rec-title { font-size: var(--s-fs-body); font-weight: 600; color: var(--s-navy); line-height: 1.35; }
.stc-rec-cta { margin-top: auto; padding-top: .5rem; font-size: var(--s-fs-meta);
    font-weight: 600; color: #8A6E12; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* Form first, summary after — the summary is a reflection of the form, so it cannot
   sensibly precede it once the two columns become one. Source order already gives
   this, so no order property is needed. */
@media (max-width: 980px) {
    .stc-grid { grid-template-columns: minmax(0, 1fr); }
    .stc-summary { position: static; }
    .stc-office-grid, .stc-rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .stc-fields { grid-template-columns: minmax(0, 1fr); }
    .stc-office-grid, .stc-rec-grid { grid-template-columns: minmax(0, 1fr); }
    .stc-direct { gap: .9rem; }
    /* Comfortable targets on touch. */
    .stc-chip span { padding: .65rem 1.1rem; }
    .stc-submit { width: 100%; justify-content: center; padding: .95rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .stc-input, .stc-chip span, .stc-submit, .stc-rec { transition: none; }
    .stc-submit:hover, .stc-rec:hover { transform: none; }
}

/* A disabled field's explanation. Quiet, directly beneath the control it refers to, and
   linked by aria-describedby so a screen reader hears the reason rather than only that
   the control is unavailable. */
.stc-field-note {
    margin: .45rem 0 0; font-size: .8rem; line-height: 1.5;
    color: var(--cx-muted, #5A6472);
}
.stc-input:disabled { background: #F2F0EA; color: var(--cx-muted, #5A6472); cursor: not-allowed; }

/* ---- inline validation ------------------------------------------------------
   The form previously showed only a summary at the top: a visitor was told what was
   wrong but not which field, and on a five-step form that is the difference between
   a quick correction and abandoning the enquiry.

   State is carried by a red rule, the message text and aria-invalid — never by colour
   alone, and never by colour a red-green colour-blind visitor cannot distinguish. */
.stc-input.is-invalid,
.stc-textarea.is-invalid {
    border-color: #B3261E;
    box-shadow: inset 0 0 0 1px #B3261E;
}
.stc-input.is-invalid:focus,
.stc-textarea.is-invalid:focus { outline-color: #B3261E; }

.stc-error {
    margin: .35rem 0 0;
    font-size: .8rem; font-weight: 700; line-height: 1.45;
    color: #B3261E;
}
/* The marker names the problem for anyone who cannot see the colour. */
.stc-error::before { content: "Error: "; }

/* Summary items link to their field, so they must read as links. */
.stc-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.stc-alert a:hover { text-decoration: none; }

/* A linked field gets a moment of emphasis when jumped to, and scroll-margin keeps it
   clear of the sticky header rather than landing underneath it. */
.stc-input:target,
.stc-textarea:target { scroll-margin-top: 120px; outline: 2px solid #B3261E; outline-offset: 2px; }
