/* bracture.ai version 2. Brand tokens are kept deliberately small: paper, navy and steel. */
:root {
  --page: #f7f6f2;
  --card: #ffffff;
  --card-hover: #f1efe8;
  --alt: #f1efe8;
  --text: #001f4a;
  --secondary: #526071;
  --meta: #777165;
  --meta-text: #6b665a;
  --border: #d9d8d2;
  --border-light: #8c949c;
  --field-border: #8c8373;
  --accent: #001f4a;
  --accent-hover: #07306b;
  --on-accent: #ffffff;
  --dark: #061a33;
  --on-dark-soft: #b9bcc2;
  --error: #9b1c1c;
  --error-bg: #fbf1ef;
  --font: "Manrope", "Avenir Next", "Avenir", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --wrap: 72rem;
  --gutter: 1.5rem;
  --ring: 0 0 0 3px rgba(0, 31, 74, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; margin: 0; color: var(--text); }
p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 2rem; } }
@media (max-width: 400px) { :root { --gutter: 1rem; } }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; font-size: 14px;
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0 1.5rem; border: 1px solid transparent; border-radius: 0;
  font: 500 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:disabled { cursor: default; }
.btn-primary:disabled:not(.is-busy) { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { border-color: var(--border-light); color: var(--secondary); font-size: 14px; padding: 0 1.25rem; background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-compact { min-height: 2.5rem; padding: 0 1rem; font-size: 14px; white-space: nowrap; }
.btn-block { width: 100%; min-height: 3.25rem; font-size: 16px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.site-header {
  position: relative; z-index: 20;
  border-bottom: 1px solid rgba(225, 217, 202, 0.7);
  background: rgba(248, 246, 242, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 48px; height: 48px; flex: none; }
.brand-text { display: block; line-height: 1; }
.brand-name { display: block; font-size: 19px; font-weight: 500; color: var(--text); white-space: nowrap; }
.brand-tag { display: block; margin-top: 0.35rem; font-size: 10px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--meta-text); white-space: nowrap; }
.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 1.4rem; }
.nav-desktop a, .nav-mobile-panel a { color: var(--secondary); text-decoration: none; font-size: 13.5px; }
.nav-desktop a:hover, .nav-mobile-panel a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.nav-mobile { position: relative; }
.nav-mobile summary {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 0.75rem;
  border: 1px solid var(--border-light); color: var(--secondary); font-size: 14px; cursor: pointer; list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.nav-mobile[open] .menu-icon { background: transparent; }
.nav-mobile[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.nav-mobile-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 18px 50px -30px rgba(11, 18, 32, 0.35);
  padding: 0.5rem 0;
}
.nav-mobile-panel a { display: block; padding: 0.65rem 1.1rem; font-size: 15px; }

@media (max-width: 520px) {
  .brand-tag { display: none; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 17px; }
}
@media (min-width: 1120px) {
  .nav-desktop { display: block; }
  .nav-mobile { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--page); border-bottom: 1px solid rgba(225, 217, 202, 0.7); }
.hero-art, .hero-fade { display: none; }
.hero-grid { position: relative; display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero-card { display: none; }
.hero-small-art { display: grid; gap: 1.25rem; justify-items: center; }
.hero-side img { max-height: 210px; width: auto; opacity: 0.9; }
.hero-small-art .dict-card { max-width: 360px; width: 100%; }
.hero-copy { max-width: 36rem; }
.eyebrow {
  display: inline-block; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--meta-text);
}
.hero h1 { margin-top: 1.75rem; font-size: clamp(2.55rem, 5vw, 4.85rem); line-height: 1.02; }
.lead { margin-top: 1.5rem; font-size: 17px; line-height: 1.72; color: var(--secondary); }
.rule-mark { display: flex; align-items: center; gap: 1rem; }
.rule-mark .rule-long { height: 3px; flex: 1; border-radius: 2px; background: var(--accent); }
.rule-mark .rule-short { height: 3px; width: 5rem; border-radius: 2px; background: var(--accent); }
.rule-mark img { width: 46px; height: 46px; flex: none; }
.rule-mark-small { margin-top: 2rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.25rem; }

@media (min-width: 640px) {
  .hero-grid { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .hero-side img { max-height: 280px; }
}
@media (min-width: 1024px) {
  .hero-art { display: block; position: absolute; inset: 0; }
  .hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: left bottom; }
  .hero-fade {
    display: block; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(248, 246, 242, 0.08) 0%, rgba(248, 246, 242, 0.34) 42%, rgba(248, 246, 242, 0.96) 68%, rgba(248, 246, 242, 1) 100%);
  }
  .hero-grid { grid-template-columns: minmax(0, 0.98fr) minmax(390px, 0.72fr); align-items: center; min-height: 760px; padding-top: 5rem; padding-bottom: 5rem; }
  .hero-small-art { display: none; }
  .hero-card { display: block; align-self: start; padding-top: 2.5rem; }
  .hero-card .dict-card { max-width: 350px; }
  .hero-copy { justify-self: end; }
  .rule-mark-small { display: none; }
}

/* Dictionary card */
.dict-card {
  border: 1.5px solid var(--accent); background: rgba(248, 246, 242, 0.95);
  padding: 1.25rem 1.25rem 1.35rem; box-shadow: 0 18px 60px -50px rgba(11, 18, 32, 0.42);
}
.dict-entry + .dict-entry { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.dict-term { font-size: 30px; font-weight: 500; line-height: 1; color: var(--accent); }
.dict-term-second { font-size: 22px; }
.dict-card dd { margin-top: 0.6rem; font-size: 14px; line-height: 1.6; color: var(--secondary); }
@media (min-width: 640px) { .dict-card { padding: 1.5rem; } .dict-term { font-size: 34px; } .dict-term-second { font-size: 24px; } .dict-card dd { font-size: 14.5px; } }

/* Bands */
.band { position: relative; border-bottom: 1px solid rgba(225, 217, 202, 0.7); padding: 4rem 0; }
.band-white { background: var(--card); }
.band-cream { background: var(--page); }
.band-dark { background: var(--dark); color: var(--on-accent); border-bottom-color: var(--dark); }
.band-art { overflow: hidden; }
.band-watermark { display: none; }
@media (min-width: 640px) { .band { padding: 5rem 0; } }
@media (min-width: 1024px) {
  .band-watermark { display: block; position: absolute; right: -90px; top: 2rem; width: 620px; height: 520px; opacity: 0.09; pointer-events: none; }
  .band-watermark img { width: 100%; height: 100%; object-fit: contain; object-position: right top; }
}
.band h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.12; }
.band-dark h2 { color: var(--on-accent); }
.band .wrap { position: relative; }

.split { display: grid; gap: 1.75rem; }
@media (min-width: 1024px) { .split { grid-template-columns: 0.8fr 1.2fr; gap: 3rem; align-items: start; } }

.prose { max-width: 40rem; }
.prose p { font-size: 16px; line-height: 1.75; color: var(--secondary); }
.prose p + p { margin-top: 1.1rem; }
.prose .lead-line { font-size: 21px; line-height: 1.45; color: var(--text); }
.band-dark .prose p { color: var(--on-dark-soft); font-size: 16.5px; }

.cells { margin-top: 2.5rem; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); overflow: hidden; }
@media (min-width: 768px) { .cells-2 { grid-template-columns: 1fr 1fr; } }
.cell { background: var(--card); padding: 1.5rem; transition: background-color 0.15s ease; }
.band-white .cell { background: var(--card); }
.band-white .cell:hover { background: var(--card-hover); }
.band-cream .cell { background: var(--card); }
@media (min-width: 640px) { .cell { padding: 1.75rem 1.9rem; } }
.cell h3 { font-size: 21px; line-height: 1.25; }
.cell > p { margin-top: 0.8rem; font-size: 15px; line-height: 1.7; color: var(--secondary); }
.work-card .kind { margin-top: 0; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--meta-text); }
.work-card h3 { margin-top: 0.6rem; }

.ticks { margin-top: 1rem; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.15rem; font-size: 15px; line-height: 1.65; color: var(--secondary); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.45rem; height: 1.5px; background: var(--accent); }

.rows { display: grid; gap: 0; }
.row { display: grid; gap: 0.5rem; border-top: 1px solid var(--border); padding: 1.35rem 0; }
.row:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .row { grid-template-columns: 13rem 1fr; gap: 1.5rem; } }
.row h3 { font-size: 18px; line-height: 1.35; }
.row p { font-size: 15px; line-height: 1.7; color: var(--secondary); }

.kv { display: grid; }
.kv-row { display: grid; gap: 0.25rem; border-top: 1px solid var(--border); padding: 1rem 0; }
.kv-row:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .kv-row { grid-template-columns: 11rem 1fr; gap: 1.5rem; } }
.kv dt { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--meta-text); padding-top: 0.2rem; }
.kv dd { font-size: 15px; line-height: 1.65; color: var(--text); }
.kv-compact .kv-row { padding: 0.8rem 0; }
@media (min-width: 640px) { .kv-compact .kv-row { grid-template-columns: 7.5rem 1fr; } }

.engagement-wrap { max-width: 60rem; }
.options { margin-top: 1.75rem; display: grid; }
.options li { position: relative; border-top: 1px solid var(--border); padding: 1rem 0 1rem 1.6rem; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.options li:last-child { border-bottom: 1px solid var(--border); }
.options li::before { content: ""; position: absolute; left: 0; top: 1.85rem; width: 0.55rem; height: 1.5px; background: var(--accent); }
.note { margin-top: 1.25rem; font-size: 15px; line-height: 1.7; color: var(--secondary); }
#company .kv { margin-top: 1.75rem; }

.contact-card {
  display: grid; gap: 2rem; border: 1px solid var(--border); border-top: 3px solid var(--accent);
  background: var(--page); padding: 2rem 1.5rem; box-shadow: 0 20px 70px -52px rgba(11, 18, 32, 0.34);
}
@media (min-width: 768px) { .contact-card { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 3rem; gap: 3rem; } }
.contact-text .lead { margin-top: 1rem; }
.contact-actions { display: grid; gap: 0.9rem; justify-items: start; }
.contact-actions p { font-size: 15px; color: var(--secondary); }

/* Footer */
.site-footer { background: var(--page); border-top: 1px solid rgba(225, 217, 202, 0.7); }
.footer-inner { display: flex; flex-direction: column; gap: 1.25rem; padding-top: 2.25rem; padding-bottom: 2.25rem; font-size: 12.5px; line-height: 1.7; color: var(--meta-text); }
.footer-name { font-weight: 500; color: var(--secondary); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.footer-links a { color: var(--meta-text); text-decoration: none; }
.footer-links a:hover { color: var(--secondary); text-decoration: underline; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } .footer-links { justify-content: flex-end; max-width: 60%; } }

/* Legal and utility pages */
.legal, .not-found { padding: 3.5rem 0 4.5rem; }
.legal-wrap { max-width: 48rem; }
.legal h1, .not-found h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.05; }
.legal-body { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.legal-body p { font-size: 15.5px; line-height: 1.75; color: var(--secondary); }
.not-found .btn { margin-top: 2rem; }

.request-page { padding: 3rem 0 4.5rem; }
.request-wrap { display: grid; gap: 2rem; max-width: 60rem; }
@media (min-width: 1024px) { .request-wrap { grid-template-columns: 0.8fr 1.2fr; align-items: start; gap: 3rem; } .request-intro { position: sticky; top: 2rem; } }
.request-intro .rule-mark { max-width: 16rem; margin-bottom: 2rem; }
.request-intro h1 { font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1.05; }
.request-card { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--accent); padding: 1.5rem; box-shadow: 0 20px 70px -52px rgba(11, 18, 32, 0.34); }
@media (min-width: 640px) { .request-card { padding: 2.25rem; } }
@media (min-width: 1024px) { .request-card .field[data-field="engagement"], .request-card .field[data-field="timeline"] { grid-column: 1 / -1; } }

/* Request dialog */
.request-dialog {
  width: min(44rem, calc(100vw - 2rem)); max-height: calc(100dvh - 3rem);
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible;
}
.request-dialog::backdrop { background: rgba(11, 18, 32, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.request-dialog[open] { animation: dialog-in 0.18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .request-dialog[open] { animation: none; } }
.dialog-panel {
  display: flex; flex-direction: column; max-height: calc(100dvh - 3rem);
  background: var(--card); border-top: 4px solid var(--accent); box-shadow: 0 30px 90px -30px rgba(11, 18, 32, 0.55);
}
.dialog-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; padding: 1.5rem 1.5rem 1.25rem; border-bottom: 1px solid var(--border); }
.dialog-mark { width: 36px; height: 36px; margin-top: 0.15rem; }
.dialog-heading h2 { font-size: 24px; line-height: 1.2; }
.dialog-heading p { margin-top: 0.35rem; font-size: 15px; line-height: 1.55; color: var(--secondary); }
.dialog-close {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin: -0.35rem -0.5rem 0 0;
  border: 1px solid transparent; background: transparent; color: var(--secondary); cursor: pointer;
}
.dialog-close:hover { border-color: var(--border); color: var(--text); background: var(--card-hover); }
.dialog-body { overflow-y: auto; padding: 1.5rem; overscroll-behavior: contain; }
@media (min-width: 640px) {
  .dialog-head { padding: 1.75rem 2rem 1.4rem; }
  .dialog-body { padding: 1.75rem 2rem 2rem; }
}
@media (max-width: 639.98px) {
  .request-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; }
  .dialog-panel { height: 100%; max-height: 100%; }
  .request-dialog[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Form */
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 1.35rem 1.25rem; } .field-wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.45rem; align-content: start; }
.field label { font-size: 14px; font-weight: 500; color: var(--text); }
.field-optional { margin-left: 0.35rem; font-size: 12px; font-weight: 400; color: var(--meta-text); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem;
  font: 16px/1.4 var(--font); color: var(--text); background: var(--card);
  border: 1px solid var(--field-border); border-radius: 0; appearance: none; -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--secondary); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 1rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.35rem;
  border-right: 1.5px solid var(--secondary); border-bottom: 1.5px solid var(--secondary); transform: rotate(45deg); pointer-events: none;
}
.select select { padding-right: 2.5rem; cursor: pointer; }
.field-helps { display: grid; gap: 0.15rem; }
.field-help { font-size: 13px; line-height: 1.5; color: var(--secondary); }
.field-foot { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.field-count { margin-left: auto; font-size: 12px; color: var(--meta-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.field-count.is-near { color: var(--error); }
.field-error { font-size: 13px; line-height: 1.45; color: var(--error); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(155, 28, 28, 0.2); }

.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-summary { margin-bottom: 1.5rem; padding: 1rem 1.15rem; border-left: 3px solid var(--error); background: var(--error-bg); }
.form-summary:focus { outline: 2px solid var(--error); outline-offset: 2px; }
.form-summary-title { font-size: 15px; font-weight: 500; color: var(--error); }
.form-summary ul { margin-top: 0.5rem; display: grid; gap: 0.25rem; }
.form-summary a { color: var(--error); font-size: 14px; }

.form-alerts:not(:empty) { margin-top: 1.25rem; }
.form-alert { padding: 1rem 1.15rem; border-left: 3px solid var(--accent); background: var(--alt); display: grid; gap: 0.35rem; }
.form-alert p { font-size: 14.5px; line-height: 1.6; color: var(--text); }

.form-actions { margin-top: 1.5rem; display: grid; gap: 1rem; }
.form-note { font-size: 13px; line-height: 1.6; color: var(--secondary); }

.btn-spinner { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #ffffff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.is-busy .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation-duration: 2.4s; } }

.inquiry-success { padding: 1rem 0 0.5rem; text-align: left; }
.success-title:focus { outline: none; }
.success-mark { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.success-title { margin-top: 1.25rem; font-size: 26px; line-height: 1.2; font-weight: 500; }
.inquiry-success p { margin-top: 0.75rem; font-size: 16px; line-height: 1.7; color: var(--secondary); }
.reference { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
