/* COTX Holdings — site styles
   Brand: Deep Navy #0F2D4A · Texas Blue #2E5B7F · Sage Taupe #B7A78F · Light Gray #E6E8EB
   Type:  Playfair Display (headlines) · Inter (body)
   Themes are set with data-theme on <html>: classic (default), midnight, texas, mono. */

:root,
:root[data-theme="classic"] {
  --bg: #F4F4F0;
  --surface: #FFFFFF;
  --ink: #0F2D4A;
  --muted: #4A5868;
  --rule: #D6D9DD;
  --accent: #B7A78F;          /* decorative only: rules, swoosh */
  --accent-ink: #7C6A4E;      /* accent safe for text on --bg */
  --header-bg: var(--bg);
  --header-ink: var(--ink);
  --hero-bg: var(--bg);
  --hero-ink: var(--ink);
  --hero-muted: var(--muted);
  --band-bg: #0F2D4A;
  --band-ink: #FFFFFF;
  --band-muted: #C9D2DC;
  --band-accent: #B7A78F;
  --contact-bg: var(--surface);
  --btn-bg: #0F2D4A;
  --btn-ink: #FFFFFF;
  --btn-hover: #0A2036;
  --focus: #2E5B7F;
  --logo-ink: #0F2D4A;
  --logo-accent: #B7A78F;
  color-scheme: light;
}

:root[data-theme="midnight"] {
  --bg: #0A1F33;
  --surface: #0F2D4A;
  --ink: #F2F3F5;
  --muted: #A9B6C4;
  --rule: #23415F;
  --accent: #B7A78F;
  --accent-ink: #C9BBA3;
  --band-bg: #12365A;
  --band-ink: #FFFFFF;
  --band-muted: #BFCAD6;
  --band-accent: #B7A78F;
  --contact-bg: #0F2D4A;
  --btn-bg: #B7A78F;
  --btn-ink: #0A1F33;
  --btn-hover: #CBBDA6;
  --focus: #C9BBA3;
  --logo-ink: #FFFFFF;
  --logo-accent: #B7A78F;
  color-scheme: dark;
}

:root[data-theme="texas"] {
  --bg: #E6E8EB;
  --surface: #F7F8F9;
  --ink: #0F2D4A;
  --muted: #45566A;
  --rule: #C9CED5;
  --accent: #B7A78F;
  --accent-ink: #6F5E44;
  --header-bg: #2E5B7F;
  --header-ink: #FFFFFF;
  --hero-bg: #2E5B7F;
  --hero-ink: #FFFFFF;
  --hero-muted: #DCE5EE;
  --band-bg: #0F2D4A;
  --band-ink: #FFFFFF;
  --band-muted: #C9D2DC;
  --band-accent: #B7A78F;
  --contact-bg: var(--surface);
  --btn-bg: #2E5B7F;
  --btn-ink: #FFFFFF;
  --btn-hover: #244A68;
  --focus: #0F2D4A;
  --logo-ink: #FFFFFF;
  --logo-accent: #B7A78F;
  color-scheme: light;
}

:root[data-theme="mono"] {
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --ink: #111111;
  --muted: #555555;
  --rule: #DDDDDD;
  --accent: #111111;
  --accent-ink: #111111;
  --band-bg: #111111;
  --band-ink: #FFFFFF;
  --band-muted: #BDBDBD;
  --band-accent: #FFFFFF;
  --contact-bg: var(--surface);
  --btn-bg: #111111;
  --btn-ink: #FFFFFF;
  --btn-hover: #333333;
  --focus: #111111;
  --logo-ink: #111111;
  --logo-accent: #111111;
  color-scheme: light;
}

/* Themes that don't override header/hero inherit page colors */
:root[data-theme="midnight"], :root[data-theme="mono"] {
  --header-bg: var(--bg);
  --header-ink: var(--ink);
  --hero-bg: var(--bg);
  --hero-ink: var(--ink);
  --hero-muted: var(--muted);
}

:root {
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(68rem, 100% - 3rem); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Logo (inline SVG, follows theme) */
.logo-ink { fill: var(--logo-ink); }
.logo-accent { fill: var(--logo-accent); }
:root[data-theme="mono"] .logo-word { mask: url(#cotx-ko); }

/* Header */
header.site { background: var(--header-bg); color: var(--header-ink); padding: 1.25rem 0; }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mark { display: block; line-height: 0; }
.mark svg { width: 150px; height: auto; }
.tools { display: flex; align-items: center; gap: 1.25rem; }
header.site nav a {
  font-size: .95rem; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
}
:root[data-theme="texas"] header.site nav a { --focus: #FFFFFF; }

/* Theme switcher */
.themes { display: flex; gap: .4rem; align-items: center; }
.themes button {
  width: 1.375rem; height: 1.375rem; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--header-ink) 35%, transparent);
  position: relative;
}
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--header-bg), 0 0 0 4px var(--header-ink); }
.themes button::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.swatch-classic  { background: linear-gradient(135deg, #F4F4F0 50%, #0F2D4A 50%); }
.swatch-midnight { background: linear-gradient(135deg, #0A1F33 50%, #B7A78F 50%); }
.swatch-texas    { background: linear-gradient(135deg, #2E5B7F 50%, #E6E8EB 50%); }
.swatch-mono     { background: linear-gradient(135deg, #FFFFFF 50%, #111111 50%); }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: clamp(3.5rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem); }
.eyebrow {
  font: 500 .8rem/1.4 var(--sans); letter-spacing: .28em; text-transform: uppercase;
  color: var(--hero-muted); margin: 0 0 1.5rem;
}
.hero h1 {
  font: 500 clamp(2.4rem, 6.2vw, 4.75rem)/1.08 var(--serif);
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 0 1.75rem;
}
.hero p.lead { font-size: 1.2rem; color: var(--hero-muted); max-width: 38rem; margin: 0; }

/* Band: what we do */
.band { background: var(--band-bg); color: var(--band-ink); padding: clamp(3rem, 7vw, 5rem) 0; }
.band .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.band h2 { font: 600 1.4rem/1.25 var(--serif); margin: 0 0 .6rem; }
.band p { margin: 0; color: var(--band-muted); max-width: 32ch; }
.band .grid > div { border-top: 3px solid var(--band-accent); padding-top: 1.25rem; }

/* Sections */
section.plain { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split h2 { font: 500 clamp(1.8rem, 3.5vw, 2.5rem)/1.15 var(--serif); margin: 0; }
.split .lede { color: var(--muted); margin: 1rem 0 0; max-width: 28ch; }
ul.criteria { list-style: none; margin: 0; padding: 0; }
ul.criteria li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
ul.criteria li:first-child { border-top: 1px solid var(--rule); }
ul.criteria strong { display: block; font-weight: 600; }
ul.criteria span { color: var(--muted); }

ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
ol.steps li:first-child { border-top: 1px solid var(--rule); }
ol.steps li::before { content: counter(s); font: 600 1.25rem/1.4 var(--serif); color: var(--accent-ink); }
ol.steps strong { display: block; font-weight: 600; }
ol.steps span { color: var(--muted); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.principles h3 {
  font: 600 .8rem/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  margin: 0 0 .5rem; color: var(--ink);
}
.principles h3::before {
  content: ""; display: block; width: 2.5rem; height: 3px; background: var(--accent); margin-bottom: 1rem;
}
.principles p { margin: 0; color: var(--muted); }

.divider { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* Contact */
.contact { background: var(--contact-bg); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.contact h2 { font: 500 clamp(1.8rem, 3.5vw, 2.5rem)/1.15 var(--serif); margin: 0 0 1rem; max-width: 22ch; }
.contact p { color: var(--muted); max-width: 40rem; margin: 0 0 2rem; }
.button {
  display: inline-block; background: var(--btn-bg); color: var(--btn-ink);
  padding: .95rem 1.6rem; text-decoration: none; font-weight: 600;
  border-radius: 2px; transition: background-color .15s ease;
}
.button:hover { background: var(--btn-hover); }
.email { display: block; margin-top: 1rem; color: var(--muted); font-size: .95rem; }

footer.site { padding: 2rem 0; font-size: .875rem; color: var(--muted); }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }

/* 404 */
.notfound { padding: clamp(4rem, 12vw, 9rem) 0; }
.notfound h1 { font: 500 clamp(2rem, 5vw, 3.25rem)/1.1 var(--serif); margin: 0 0 1rem; }
.notfound p { color: var(--muted); margin: 0 0 2rem; }

@media (max-width: 800px) {
  .band .grid, .split, .principles { grid-template-columns: 1fr; }
  .band .grid { gap: 2rem; }
}
@media (max-width: 520px) {
  .mark svg { width: 120px; }
  .tools { gap: .9rem; }
  header.site nav a { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
