/* M.A. INDEL, LLC design system.
   Structure and shared colors live here. Template-specific accent colors live in theme.css
   (the active template); the five options are in /assets/css/themes/. To switch templates,
   copy the chosen file over theme.css. All colors are PLACEHOLDERS pending real branding. */
:root {
  /* Shared palette: derived from the primary #110771 (hue 246) */
  --primary: #110771;
  --surface: #16123A;      /* toned-down indigo for large dark areas (hero, call-to-action) */
  --surface-2: #241F5C;    /* second stop of the hero gradient */
  --link: #2B1DAF;
  --ink: #14112C;
  --slate: #524F69;
  --mist: #F4F3FC;
  --line: #DCDAEC;
  --white: #FFFFFF;
  --hero-text: #DBD8F8;
  --footer-bg: #0E0B28;
  --footer-text: #C2BFE3;
  --footer-link: #EBE9FB;
  --footer-line: #26215A;
  --footer-muted: #A6A2CD;
  --ph-line: #9B97C4;
  --ph-bg: #F4F3FC;
  --ph-bg-2: #E9E7F8;
  --field-border: #827F9F;
  --focus-ring: rgba(43, 29, 175, .25);
  --ok: #166534;
  --err: #B42318;
  --draft-bg: #FFF4E5;
  --draft-text: #7A3E00;
  --draft-line: #F3D3A4;

  --radius: 10px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
h1, h2, h3 { color: var(--primary); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--link); }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
img, svg { max-width: 100%; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Draft bar: remove the <div class="draft-bar"> from each page before launch */
.draft-bar { background: var(--draft-bg); color: var(--draft-text); font-size: .8125rem; text-align: center; padding: .35rem 1rem; border-bottom: 1px solid var(--draft-line); }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--primary); font-weight: 700; letter-spacing: .02em; }
.brand:hover { color: var(--primary); }
.brand-mark { width: 58px; height: auto; color: var(--primary); flex: 0 0 auto; }
.brand-name { font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-text); }
.nav a.btn, .nav a.btn:hover { color: var(--on-accent); }
.nav-toggle { display: none; align-items: center; padding: .5rem .9rem; border: 1.5px solid var(--primary); border-radius: 8px; background: var(--white); color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--mist); }
  .nav a.btn { margin-top: .75rem; text-align: center; border-bottom: 2px solid transparent; }
}

/* Buttons */
.btn { display: inline-block; padding: .8rem 1.4rem; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; background: var(--accent); color: var(--on-accent); cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; transition: background .15s; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn-sm { padding: .55rem 1rem; font-size: .95rem; }
/* On dark bands, solid buttons get an optional light edge (set per template with --accent-edge) */
/* Buttons on dark bands: a template may set --btn-dark-* (otherwise they follow the accent). Larger, centered. */
.hero .btn, .cta .btn { background: var(--btn-dark-bg, var(--accent)); color: var(--btn-dark-text, var(--on-accent)); border-color: var(--accent-edge); }
.hero .btn:hover, .cta .btn:hover { background: var(--btn-dark-hover, var(--accent-hover)); color: var(--btn-dark-text, var(--on-accent)); }
/* Secondary (outline) button: indigo outline on light backgrounds, white outline and lettering on the dark bands. */
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--mist); color: var(--primary); }
.hero .btn-ghost, .cta .btn-ghost { background: transparent; color: var(--white); border-color: var(--white); }
.hero .btn-ghost:hover, .cta .btn-ghost:hover { background: rgba(255,255,255,.14); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.5rem; }

/* Hero + page heads */
.hero { background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); color: var(--white); padding: clamp(3rem, 8vw, 6rem) 0; }
.hero h1 { color: var(--white); }
.hero .lede { color: var(--hero-text); }
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--accent-text); margin-bottom: .75rem; }
.hero .eyebrow { color: var(--hero-eyebrow); }
.lede { font-size: 1.2rem; max-width: 40rem; color: var(--slate); }
.page-head { background: var(--mist); padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .35em; }
.page-head .lede { margin: 0; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 40px; height: 40px; color: var(--link); margin-bottom: .9rem; }
.card .more { font-weight: 600; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0; }
.stats div { padding: 1.1rem 1.25rem; border-left: 3px solid var(--accent-2); background: var(--white); }
.stats dt { font-size: .8rem; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; }
.stats dd { margin: .3rem 0 0; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Process steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(5, 1fr); }
.steps li { counter-increment: s; position: relative; padding-top: 3rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--primary); color: var(--white); display: grid; place-items: center; font-weight: 700; }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { font-size: .95rem; color: var(--slate); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* Testimonials */
.quotes { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }
.quote-card { display: flex; flex-direction: column; gap: 1.1rem; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent-2); border-radius: var(--radius); padding: 1.5rem; }
.quote-mark { width: 34px; height: 34px; color: var(--accent-2); }
.quote-card blockquote { margin: 0; flex: 1; font-size: 1.05rem; }
.quote-by { border-top: 1px solid var(--line); padding-top: .9rem; font-size: .95rem; color: var(--slate); }
.quote-by strong { display: block; color: var(--primary); }

/* Placeholders: dashed outline = "replace me before launch" */
.ph { display: grid; place-items: center; text-align: center; min-height: 280px; border: 2px dashed var(--ph-line); border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--ph-bg), var(--ph-bg) 12px, var(--ph-bg-2) 12px, var(--ph-bg-2) 24px); color: var(--slate); font-size: .9rem; padding: 1rem; }
.ph strong { display: block; color: var(--primary); margin-bottom: .25rem; }
.ph-sm { min-height: 110px; }
.ph-inline { display: inline-block; padding: .05em .55em; border: 1.5px dashed var(--ph-line); border-radius: 6px; background: var(--ph-bg); color: var(--slate); font-size: .85em; font-weight: 500; }
.note { border-left: 4px solid var(--accent); background: var(--note-bg); padding: 1rem 1.25rem; border-radius: 6px; font-size: .95rem; margin: 0 0 2rem; }

/* CTA band */
.cta { background: var(--surface); color: var(--white); text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta h2 { color: var(--white); }
.cta p { color: var(--hero-text); max-width: 40rem; margin-inline: auto; }
.cta .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: var(--footer-link); }
.site-footer h2 { color: var(--white); font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot-bottom { border-top: 1px solid var(--footer-line); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; color: var(--footer-muted); }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }

/* Long-form text (legal pages) */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

/* Form */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--slate); }
input, select, textarea { width: 100%; padding: .75rem .85rem; font: inherit; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: 3px solid var(--focus-ring); outline-offset: 0; }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { width: auto; margin-top: .4rem; flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; font-weight: 600; margin: 0; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.help { font-size: .85rem; color: var(--slate); margin: 0; }
.field-error { font-size: .9rem; font-weight: 600; color: var(--err); margin: .3rem 0 0; }
.field-error[hidden] { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }
.form-status a { color: inherit; text-decoration: underline; }

/* Disclosure, badges, details */
details { border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1.1rem; background: var(--white); margin-bottom: .75rem; }
summary { cursor: pointer; font-weight: 600; color: var(--primary); }
details p { margin: .6rem 0 0; color: var(--slate); }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 700px) { .badges { grid-template-columns: repeat(2, 1fr); } }
.detail-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; }
.detail-list dt { font-weight: 600; color: var(--primary); }
.detail-list dd { margin: 0; }
.list-check { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.list-check li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; }
.list-check li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .55rem; height: .3rem; border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
