/*
 * Digitally Boosted brand (identity manual: "Manual de identidad").
 *
 * Colours: corporate blue #4884C4 and purple #772486, used in equal measure.
 * On white, the blue is 3.9:1 (fine for large text and shapes, not body text),
 * the purple 9.4:1. So primary actions are purple, links use a deeper blue
 * (#2F6AA8, 5.2:1), and the full blue is for accents, icons and gradients.
 *
 * Type: the manual's Myriad Pro Bold Condensed Italic (brand voice) and
 * Helvetica Neue LT Condensed (web) are licensed fonts; Barlow Condensed and
 * Roboto (SIL OFL, self-hosted) stand in. Condensed type is kept to display
 * headings, buttons and labels; reading text is regular-width for legibility.
 *
 * Used by the portal, the account pages and the marketing site (core), and by
 * the editor in each site's /manage/ (a copy in digitallyboosted-site).
 */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
             src: url("fonts/BarlowCondensed-600.ba4513495282.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap;
             src: url("fonts/BarlowCondensed-600i.80bf737f5609.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap;
             src: url("fonts/BarlowCondensed-700i.47197c3b45b7.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400 700; font-display: swap;
             src: url("fonts/Roboto-variable.665db5e157d2.woff2") format("woff2"); }

:root {
  --brand-blue: #4884c4;
  --brand-purple: #772486;
  --brand-blue-ink: #2f6aa8;      /* links and blue text on white */
  --brand-purple-dark: #5c1a68;   /* hover/active */
  --brand-blue-50: #eef4fb;
  --brand-purple-50: #f6eef8;
  --brand-ink: #1d1b2b;
  --brand-muted: #5d5b70;         /* 6.4:1 on white */
  --brand-border: #e4e2ec;         /* cards and dividers */
  --brand-field: #8b879e;          /* form controls: 3.5:1 on white (WCAG 1.4.11) */
  --brand-surface: #f7f6fb;
  --brand-gradient: linear-gradient(135deg, #4884c4 0%, #5f57a8 48%, #772486 100%);
  --brand-display: "Barlow Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --brand-text: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --brand-radius: 12px;
  --brand-shadow: 0 1px 2px rgba(29, 27, 43, .06), 0 8px 24px rgba(29, 27, 43, .06);
  --brand-focus: 0 0 0 .25rem rgba(72, 132, 196, .4);
  /* A faint hexagon grid, from the manual's hex artwork. */
  --brand-hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 54 16v30L28 61 2 46V16zM28 49v48M2 46l-2 1M54 46l2 1' fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='1.2'/%3E%3C/svg%3E");

  /* Bootstrap and smbs_pages tokens follow the brand. */
  --bs-primary: #772486;
  --bs-primary-rgb: 119, 36, 134;
  --bs-link-color: #2f6aa8;
  --bs-link-color-rgb: 47, 106, 168;
  --bs-link-hover-color: #772486;
  --bs-link-hover-color-rgb: 119, 36, 134;
  --bs-body-font-family: var(--brand-text);
  --bs-body-color: #1d1b2b;
  --bs-border-color: #e4e2ec;
  --bs-border-radius: .6rem;
  --bs-focus-ring-color: rgba(72, 132, 196, .4);
}

/* smbs_pages tokens: html:root outranks sections.css's :root defaults, which load later. */
html:root {
  --db-primary: #772486;
  --db-secondary: #4884c4;
  --db-accent: #4884c4;
  --db-surface: #f7f6fb;
  --db-radius: 12px;
  --db-heading-font: var(--brand-display);
  --db-body-font: var(--brand-text);
}

body { font-family: var(--brand-text); color: var(--brand-ink); -webkit-font-smoothing: antialiased; }
h1, h2, .brand-display { font-family: var(--brand-display); font-style: italic; font-weight: 700; letter-spacing: .005em; line-height: 1.05; }
h3, h4, h5 { font-family: var(--brand-display); font-weight: 600; letter-spacing: .01em; }
.text-muted, .form-text { color: var(--brand-muted) !important; }
a { text-underline-offset: .15em; }
:focus-visible { outline: none; box-shadow: var(--brand-focus) !important; border-radius: 4px; }

/* Buttons */
.btn { font-family: var(--brand-display); font-weight: 600; font-size: 1.08rem; letter-spacing: .02em; border-radius: 999px; padding: .5rem 1.25rem; }
.btn-sm { font-size: .95rem; padding: .3rem .9rem; }
.btn-lg { font-size: 1.25rem; padding: .7rem 1.75rem; }
.btn-primary, .btn-db-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand-purple); --bs-btn-border-color: var(--brand-purple);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-purple-dark); --bs-btn-hover-border-color: var(--brand-purple-dark);
  --bs-btn-active-bg: var(--brand-purple-dark); --bs-btn-active-border-color: var(--brand-purple-dark);
  --bs-btn-disabled-bg: var(--brand-purple); --bs-btn-disabled-border-color: var(--brand-purple);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-purple); --bs-btn-border-color: var(--brand-purple);
  --bs-btn-hover-bg: var(--brand-purple); --bs-btn-hover-border-color: var(--brand-purple); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-purple-dark); --bs-btn-active-border-color: var(--brand-purple-dark);
}
.btn-outline-secondary {
  --bs-btn-color: var(--brand-ink); --bs-btn-border-color: var(--brand-border);
  --bs-btn-hover-bg: var(--brand-surface); --bs-btn-hover-border-color: #cfcbdc; --bs-btn-hover-color: var(--brand-ink);
  --bs-btn-active-bg: var(--brand-purple-50); --bs-btn-active-color: var(--brand-ink);
}
.btn-light-on-brand { background: #fff; color: var(--brand-purple); border: 0; }
.btn-light-on-brand:hover { background: var(--brand-purple-50); color: var(--brand-purple-dark); }
.btn-ghost-on-brand { color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.btn-ghost-on-brand:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* Forms */
.form-control, .form-select { border-color: var(--brand-field); border-radius: .6rem; padding: .6rem .8rem; }
.form-check-input { border-color: var(--brand-field); }
.form-control::placeholder { color: #77738b; opacity: 1; }  /* lighter than typed text, still 4.6:1 */
.input-group-text { border-color: var(--brand-field) !important; }
.form-control:focus, .form-select:focus { border-color: var(--brand-blue); box-shadow: var(--brand-focus); }
.form-label { font-weight: 500; }
.form-check-input:checked { background-color: var(--brand-purple); border-color: var(--brand-purple); }
.input-group-text { background: var(--brand-surface); border-color: var(--brand-border); color: var(--brand-muted); }

/* App bar and footer */
.brand-skip { position: absolute; left: -999px; top: 0; z-index: 2000; background: #fff; padding: .5rem 1rem; }
.brand-skip:focus { left: 1rem; top: 1rem; }
.brand-appbar { background: #fff; border-bottom: 1px solid var(--brand-border); position: sticky; top: 0; z-index: 1030; }
.brand-appbar .container { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand-logo img { height: 38px; width: auto; display: block; }
.brand-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.brand-nav a.brand-nav-link { color: var(--brand-ink); text-decoration: none; font-weight: 500; padding: .45rem .8rem; border-radius: 999px; }
.brand-nav a.brand-nav-link:hover, .brand-nav a.brand-nav-link.active { background: var(--brand-purple-50); color: var(--brand-purple); }
.brand-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-gradient); color: #fff; display: inline-flex;
                align-items: center; justify-content: center; font-weight: 700; font-family: var(--brand-display); font-size: 1.1rem; }
.brand-footer { border-top: 1px solid var(--brand-border); background: var(--brand-surface); color: var(--brand-muted); font-size: .9rem; }
.brand-footer a { color: var(--brand-muted); }
.brand-footer a:hover { color: var(--brand-purple); }
.brand-footer img { height: 28px; }
@media (max-width: 575.98px) {
  .brand-logo img { height: 30px; }
  .brand-nav .brand-nav-link.hide-xs { display: none; }
}

/* Surfaces */
.brand-page { background: var(--brand-surface); min-height: calc(100vh - 68px); }
.brand-card { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--brand-radius); box-shadow: var(--brand-shadow); }
.brand-eyebrow { font-family: var(--brand-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--brand-blue-ink); }
.brand-gradient-text { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-hero, .db-section.brand-hero { background: var(--brand-hex), var(--brand-gradient); background-size: 56px 97px, cover;
  background-repeat: repeat, no-repeat; background-position: center top, center; color: #fff; }
.db-page .brand-hero :is(h1, h2) { font-style: italic; font-weight: 700; }
.brand-hero a:not(.btn) { color: #fff; }
.brand-hero .text-muted, .brand-hero .form-text { color: rgba(255, 255, 255, .85) !important; }

/* Status: a coloured dot plus words (never colour alone). */
.brand-status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.brand-status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.brand-status-live { color: #1c7c4a; }
.brand-status-working { color: var(--brand-blue-ink); }
.brand-status-working::before { animation: brand-pulse 1.2s ease-in-out infinite; }
.brand-status-problem { color: #b42318; }
.brand-status-paused { color: var(--brand-muted); }
@keyframes brand-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .brand-status-working::before { animation: none; } }

/* Site cards on the dashboard */
.brand-site-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.brand-site-card .brand-site-preview { height: 120px; background: var(--brand-hex), var(--brand-gradient); background-size: 56px 97px, cover; position: relative; }
.brand-site-card .brand-site-preview .brand-site-initial { position: absolute; left: 1.25rem; bottom: -1.5rem; width: 3.25rem; height: 3.25rem;
  border-radius: 14px; background: #fff; color: var(--brand-purple); box-shadow: var(--brand-shadow); display: flex; align-items: center;
  justify-content: center; font-family: var(--brand-display); font-style: italic; font-weight: 700; font-size: 1.6rem; }
.brand-site-card .card-body { padding: 2.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.brand-site-card .brand-site-actions { margin-top: auto; padding-top: .75rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.brand-new-card { border: 2px dashed #cfcbdc; border-radius: var(--brand-radius); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 2rem 1.25rem; height: 100%; min-height: 260px; color: var(--brand-muted); }

/* Choice tiles ("Create with AI" / "Start from a template") */
.brand-choice { display: block; height: 100%; padding: 1.5rem; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.brand-choice:hover { transform: translateY(-2px); border-color: var(--brand-blue); box-shadow: 0 12px 32px rgba(72, 132, 196, .18); color: inherit; }
.brand-choice-icon { width: 3rem; height: 3rem; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; background: var(--brand-gradient); margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) { .brand-choice, .brand-choice:hover { transition: none; transform: none; } }

/* Step indicator (wizards) */
.brand-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 2rem; counter-reset: step; }
.brand-steps li { flex: 1; font-size: .85rem; color: var(--brand-muted); counter-increment: step; }
.brand-steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  border-radius: 50%; border: 2px solid var(--brand-border); background: #fff; font-weight: 700; margin-bottom: .35rem; }
.brand-steps li.done::before { content: "✓"; background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.brand-steps li.current { color: var(--brand-ink); font-weight: 500; }
.brand-steps li.current::before { border-color: var(--brand-purple); background: var(--brand-purple); color: #fff; }

/* Build progress */
.brand-progress-list { list-style: none; padding: 0; }
.brand-progress-list li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; color: var(--brand-muted); }
.brand-progress-list li .bi { font-size: 1.15rem; width: 1.25rem; text-align: center; }
.brand-progress-list li.done { color: var(--brand-ink); }
.brand-progress-list li.done .bi { color: #1c7c4a; }
.brand-progress-list li.current { color: var(--brand-ink); font-weight: 500; }

/* Sign-in / sign-up */
.brand-auth { min-height: calc(100vh - 68px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.brand-auth-aside { padding: 3rem; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.brand-auth-aside h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
.brand-auth-aside li { margin-bottom: .6rem; }
.brand-auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; background: var(--brand-surface); }
.brand-auth-card { width: 100%; max-width: 440px; padding: 2rem; }
@media (max-width: 899.98px) {
  .brand-auth { grid-template-columns: 1fr; }
  .brand-auth-aside { display: none; }
}

.brand-callout { border-radius: var(--brand-radius); padding: 1rem 1.25rem; background: var(--brand-blue-50); border: 1px solid #d3e3f4; }
.brand-callout-warning { background: #fff8e6; border-color: #f3dfa6; }

/* Page documents (the marketing site) on the brand gradient: buttons that read on it. */
.brand-hero .btn-db-primary { --bs-btn-bg: #fff; --bs-btn-color: var(--brand-purple); --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: var(--brand-purple-50); --bs-btn-hover-color: var(--brand-purple-dark); --bs-btn-hover-border-color: var(--brand-purple-50);
  background: #fff; color: var(--brand-purple); border-color: #fff; }
.brand-hero .btn-db-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .75); }
.brand-hero .btn-db-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.db-page .brand-hero .db-eyebrow { color: rgba(255, 255, 255, .9); }
.db-page .brand-hero .db-lead, .db-page .brand-hero p { color: rgba(255, 255, 255, .92); }
.db-page .db-eyebrow { font-family: var(--brand-display); font-weight: 600; letter-spacing: .12em; color: var(--brand-blue-ink); }
.db-page .db-card { border-color: var(--brand-border); box-shadow: var(--brand-shadow); }
.db-page .db-icon { color: var(--brand-purple); }
.db-page .db-step-number { background: var(--brand-gradient); color: #fff; }
.db-page .accordion-button { font-family: var(--brand-text); font-weight: 500; }
.db-page .accordion-button:not(.collapsed) { color: var(--brand-purple); background: var(--brand-purple-50); }
