/* Cotangent Tech Inc. — site styles. No external fonts or scripts. */
:root {
  --ink: #16232d;
  --muted: #4a5a66;
  --brand: #1f4e5f;
  --brand-dark: #153744;
  --accent: #7d5f25;
  --line: #d7dee2;
  --soft: #f3f6f7;
  --paper: #ffffff;
  --focus: #b35c00;
  --max: 1120px;
  --radius: 10px;
  font-size: 100%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brand-dark); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; flex: none; display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 500; }
.site-nav a:hover { background: var(--soft); color: var(--brand-dark); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--soft); box-shadow: inset 0 -2px 0 var(--brand); }
.site-nav a.nav-cta { background: var(--brand); color: #fff; }
.site-nav a.nav-cta:hover { background: var(--brand-dark); color: #fff; }

/* Language switch: top right of the header (English, Español, Deutsch) and the notice on translated pages */
.lang-switch ul { list-style: none; margin: 0; padding: 2px; display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.lang-switch a, .lang-switch .current { display: block; padding: 4px 11px; border-radius: 999px; font-size: .875rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.lang-switch a { color: var(--ink); }
.lang-switch a:hover { background: var(--soft); color: var(--brand-dark); }
.lang-switch .current { background: var(--brand); color: #fff; }
.lang-notice { background: var(--soft); border-bottom: 1px solid var(--line); }
.lang-notice p { margin: 0; padding: 10px 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.lang-notice a { font-weight: 600; white-space: nowrap; }

/* Hero */
.hero { background: linear-gradient(180deg, #f3f7f8 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 64px; padding-bottom: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 0 0 10px; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 26px; max-width: 40em; }
.hero-art { justify-self: center; width: 100%; max-width: 340px; }
.page-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-top: 44px; padding-bottom: 36px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: 8px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 46em; font-size: 1.1rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid var(--brand); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand); }
.btn-secondary:hover { background: var(--soft); }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); line-height: 1.25; margin: 0 0 12px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; line-height: 1.3; }
.section-intro { color: var(--muted); max-width: 46em; margin: 0 0 28px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 1.3rem; }
.card p { margin: 0 0 10px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--brand); }
.card ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.card ul li { margin-bottom: 4px; }
.card-link { font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* Service detail blocks */
.service { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 36px 0; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h2 { font-size: 1.45rem; }
.service .tagline { color: var(--muted); margin: 0; }
.service ul { margin: 0 0 12px; padding-left: 20px; }
.service li { margin-bottom: 6px; }
.note { font-size: .9rem; color: var(--muted); }

/* Data table */
.facts { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.facts th { width: 34%; background: var(--soft); font-weight: 600; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.codes { width: 100%; border-collapse: collapse; }
.codes th, .codes td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.codes thead th { background: var(--brand); color: #fff; font-weight: 600; }
.codes td:first-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #fff4e0; color: #7a4f00; border: 1px solid #efd3a0; }
.ph { background: #fff4c2; outline: 1px dashed #c9a100; padding: 0 3px; border-radius: 3px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .98rem; }

.cta-band { background: var(--brand); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; color: #d9e6ea; }
.cta-band .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.cta-band .btn:hover { background: var(--soft); }

.prose { max-width: 46em; }
.prose h2 { margin-top: 36px; font-size: 1.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.updated { color: var(--muted); font-size: .95rem; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer { background: #0f2630; color: #cfdde2; padding: 44px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .footer-social ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.site-footer .footer-social li { margin: 0; }
.site-footer .footer-social a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #2c4652; border-radius: 50%; color: #fff; }
.site-footer .footer-social a:hover { background: #1f4e5f; border-color: #5fa3b8; }
.site-footer .footer-social a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.site-footer .footer-social svg { width: 20px; height: 20px; }
.site-footer .legal { border-top: 1px solid #2c4652; margin-top: 28px; padding-top: 18px; font-size: .85rem; color: #a9bec6; }
.site-footer .legal p { margin: 0 0 6px; }

/* Contact form (assets/contact.js) */
.form-card { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; margin: 20px 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-grid .field { margin-bottom: 0; }
.field label { font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #6b7f8a; border-radius: 8px; padding: 10px 12px; width: 100%; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--brand); }
.field [aria-invalid="true"] { border-color: #a3322a; }
.card .field .hint, .field .hint { font-size: .88rem; color: var(--muted); margin: 0; }
.field-error { color: #a3322a; font-size: .9rem; font-weight: 600; margin: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.card .form-status, .form-status { padding: 10px 14px; border-radius: 8px; background: var(--soft); color: var(--ink); margin: 0 0 16px; }
.card .form-status.error, .form-status.error { background: #fbeeed; color: #7a231d; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
button.btn[disabled] { opacity: .6; cursor: wait; }
.form-done { border-left: 4px solid var(--brand); background: var(--soft); border-radius: 8px; padding: 16px 20px; margin-top: 8px; }
.form-done:focus { outline: none; }
.altcha-box:not(:empty) { margin: 0 0 14px; }

/* Cookie choices (assets/consent.js) */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: var(--brand-dark); color: #fff; box-shadow: 0 -4px 18px rgba(0, 0, 0, .18); }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; padding-top: 16px; padding-bottom: 16px; }
.cookie-banner p { margin: 0; max-width: 46em; font-size: .95rem; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.btn-cookie { background: #fff; color: var(--brand-dark); border-color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn-cookie:hover { background: var(--soft); border-color: var(--soft); }
.btn-cookie:focus-visible { outline: 3px solid #ffb35c; outline-offset: 2px; }

/* Responsive */
@media (max-width: 960px) {
  .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; justify-self: start; }
  .service { grid-template-columns: 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lang-switch { order: 2; margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  section { padding: 40px 0; }
  .hero .wrap { padding-top: 40px; padding-bottom: 36px; }
  .hero-art { display: none; }
  .facts th { width: 40%; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav a { padding: 8px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn-cookie { flex: 1; text-align: center; }
}

@media print {
  .site-header nav, .skip-link, .cta-band, .site-footer, .cookie-banner { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}

/* Spacing helpers (replace inline styles so the page policy can stay strict) */
.mt-card { margin-top: 20px; }
.mt-sm { margin: 10px 0 0; }
.preview-bar { position: sticky; top: 0; z-index: 50; background: #fff3cd; color: #664d03; padding: 8px 16px; text-align: center; font-size: .9rem; }
