/* TechDoba marketing site. Self-contained: no CDN, no web fonts, system font stack.
   Direction C, "Bold mark": the slanted T from the logo icon drives the layout. */

:root {
  --font: "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  --navy: #0a2343;        /* brand navy, 15:1 with white */
  --navy-deep: #061629;
  --green: #6abd45;       /* brand green, 6.4:1 with navy; never text on white */
  --text: #0a2343;
  --muted: #3e4f66;       /* navy shade, 8.6:1 on white */
  --on-navy: #ffffff;
  --on-navy-muted: #c9d3e0; /* 10.6:1 on navy */
  --bg: #ffffff;
  --rule: #0a2343;
  --error: #b91c1c;
  --header-h: 4.5rem;
  --gutter: 24px;
  --rail: 0rem;           /* width reserved for the sticky section index (wide screens, .has-index pages only) */
  --max: 1120px;          /* one container for header, content and footer */
  --measure: 65ch;
  --slant: polygon(0 100%, 6px 0, 100% 0, calc(100% - 6px) 100%);
}
@media (min-width: 1200px) { .has-index { --rail: 14.5rem; } } /* 200px rail + 32px gap to the content column */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

@media (min-width: 768px) { body { font-size: 1.0625rem; } }
h1, h2, h3 { margin: 0 0 1rem; max-width: 24ch; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 18px + 0.25vw, 22px); font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

a { color: var(--navy); text-decoration-color: var(--green); text-decoration-thickness: 0.12em; text-underline-offset: 0.2em; }
a:hover { color: var(--navy-deep); text-decoration-thickness: 0.2em; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}
main:focus { outline: none; }

[hidden] { display: none !important; }

/* Layout: one centred container. On .has-index pages wide screens start main columns after the index rail. */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.has-index main .container { padding-left: calc(var(--gutter) + var(--rail)); }
.container.narrow > :not(h1, h2, h3) { max-width: var(--measure); }

/* Decorative T mark, traced from the icon proportions */
.mark { position: absolute; z-index: 0; display: none; pointer-events: none; }
.mark .m-navy { fill: var(--navy); }
.mark .m-green { fill: var(--green); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--text);
}
.skip-link:focus { top: 0.5rem; }

/* Wordmark */
.wordmark { display: inline-flex; line-height: 0; text-decoration: none; }
.wordmark img { display: block; width: auto; height: 2.125rem; }

/* Header */
/* Sticky only from tablet up: on phones the nav wraps and would cover focused form fields. */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--navy);
}
[id] { scroll-margin-top: 0.5rem; }
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
  [id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  min-height: var(--header-h);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--navy);
  text-decoration: none;
}
/* Phones: with JS the links fold behind a "Menu" icon button so the header stays one row.
   Without JS there is no button and the links show as above. The "js" class is set by
   /assets/js-flag.js before first paint, so the folded header renders at once (no layout shift). */
.nav-toggle { display: none; }
@media (max-width: 767.98px) {
  .js .header-inner { flex-wrap: nowrap; }
  .js .site-header nav { display: flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; }
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid var(--navy);
    border-radius: 0;
    background: var(--bg);
    color: var(--navy);
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 1.25rem;
    height: 3px;
    background: var(--navy);
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; background: var(--green); }
  .nav-open .nav-toggle { background: var(--navy); }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { top: 0; background: #ffffff; transform: rotate(45deg); }
  .nav-open .nav-toggle-bars::after { top: 0; background: var(--green); transform: rotate(-45deg); }
  .js .nav-list { display: none; }
  .nav-open .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 2px solid var(--navy);
  }
  .nav-open .nav-list li { border-bottom: 1px solid var(--rule); }
  .nav-open .nav-list li:last-child { border-bottom: 0; padding-top: 1rem; }
  .nav-open .nav-list a { display: block; padding: 0.875rem 0; font-size: 1.0625rem; }
  .nav-open .nav-list a:not(.nav-cta)::after { right: auto; width: 3rem; }
  .nav-open .nav-list a.nav-cta { display: inline-block; padding: 0.75rem 1.25rem; }
}
.nav-list a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 4px;
  background: var(--green);
  clip-path: polygon(0 100%, 3px 0, 100% 0, calc(100% - 3px) 100%);
  transform: scaleX(0);
  transform-origin: left;
}
.nav-list a:not(.nav-cta):hover::after,
.nav-list a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }
.nav-list a.nav-cta {
  padding: 0.5rem 1.125rem;
  background: var(--navy);
  color: #ffffff;
}

/* Hero (home, 404) and page heads (inner pages) */
.hero,
.page-head,
.legal {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0;
}
.hero > .container,
.page-head > .container,
.legal > .container { position: relative; z-index: 1; }
@media (min-width: 768px) {
  .hero,
  .page-head,
  .legal { padding: 6rem 0; }
  /* Home hero only: the whole T, inside the container's right edge, beside the copy. */
  .hero .mark {
    display: block;
    top: 50%;
    right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
    width: min(30vw, 24rem);
    height: auto;
    transform: translateY(-50%);
  }
  .hero > .container > * { max-width: min(42rem, 54vw); }
  .page-head > .container > * { max-width: 42rem; }
}
.lead { font-size: clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem); line-height: 1.45; color: var(--muted); margin-bottom: 2.25rem; }
.page-head .lead:last-child { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; }
.lead,
.section-intro,
.prose p,
.card p,
.teaser p { max-width: var(--measure); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 0.5rem;
  background: var(--green);
  clip-path: var(--slant);
}

/* Buttons: solid navy, square, green slanted underline on hover */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--navy);
  border-radius: 0;
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
}
.btn::after,
.nav-list a.nav-cta::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -0.625rem;
  height: 0.375rem;
  background: var(--green);
  clip-path: var(--slant);
  transform: scaleX(0);
  transform-origin: left;
}
.btn:hover::after,
.btn:focus-visible::after,
.nav-list a.nav-cta:hover::after,
.nav-list a.nav-cta:focus-visible::after,
.nav-list a.nav-cta[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a.nav-cta::after { left: 0; right: 0; bottom: -0.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .btn::after,
  .nav-list a::after { transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1); }
}
.btn-primary { background: var(--navy); color: #ffffff; }
.btn-primary:hover { color: #ffffff; }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { color: var(--navy); }
/* Phones: every call to action is full width and 48px tall. */
@media (max-width: 599.98px) {
  .btn { width: 100%; }
}

/* Sections: white space, then full-bleed navy blocks */
.section { position: relative; padding: 3.5rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
/* Adjacent white blocks share one gap (the previous block's bottom padding) instead of stacking two. Navy blocks keep their own. */
:is(.hero, .page-head, .section:not(.section-alt, .band)) + .section:not(.section-alt, .band) { padding-top: 0; }
.section-intro { font-size: 1.125rem; color: var(--muted); margin-bottom: 3rem; }

.section-alt { background: var(--navy); color: var(--on-navy); }
.section-alt h2,
.section-alt h3,
.section-alt .name-line,
.section-alt .options-line { color: var(--on-navy); }
.section-alt p,
.section-alt li,
.section-alt dd,
.section-alt .section-intro,
.section-alt .note,
.section-alt .teaser p,
.section-alt .product-line { color: var(--on-navy-muted); }
.section-alt .product-desc { color: var(--on-navy); }
.section-alt a { color: var(--on-navy); }
.section-alt a:hover { color: var(--on-navy); }
.section-alt .eyebrow { color: var(--on-navy); }
.section-alt :focus-visible { outline-color: #ffffff; }
.section-alt .btn-primary { background: #ffffff; border-color: #ffffff; color: var(--navy); }
.section-alt .btn-secondary { border-color: #ffffff; color: #ffffff; }
.section-alt .card-grid,
.section-alt .card,
.section-alt .steps,
.section-alt .steps li,
.section-alt .teaser { border-color: rgb(255 255 255 / 0.35); }
.section-alt .card-tag { color: var(--green); }
.section-alt .card p { color: var(--on-navy-muted); }

/* Lists in place of cards */
.card-grid {
  list-style: none;
  border-top: 2px solid var(--rule);
}
.card {
  display: grid;
  gap: 0.25rem 2.5rem;
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--rule);
}
.card > * { grid-column: 1; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); }
.card p:last-of-type { margin-bottom: 0.75rem; }
.card-tag {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy) !important;
}
.section-alt .card-tag { color: var(--green) !important; }
.card-link { justify-self: start; font-weight: 800; }
@media (min-width: 900px) {
  .card {
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    align-items: baseline;
    padding: 2.5rem 0 2.75rem;
  }
  .card > * { grid-column: 2; }
  .card > .card-tag { grid-column: 1; grid-row: 1 / span 3; padding-top: 0.6rem; }
  .card > h3 { grid-row: 1; }
  /* Cards without a tag: the title takes the first column */
  .card:not(:has(.card-tag)) > h3 { grid-column: 1; grid-row: 1 / span 3; }
  .card:not(:has(.card-tag)) > p { grid-column: 2; }
}

/* Home teasers: two ruled columns */
.teaser-grid { display: grid; gap: 4rem; }
@media (min-width: 900px) { .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5rem; } }
.teaser { padding-top: 1.75rem; border-top: 2px solid var(--rule); }
.teaser p { color: var(--muted); }
.text-link { font-weight: 800; }
.more-link { margin: 3rem 0 0; }

/* Closing CTA band: full-bleed navy */
.band { background: var(--navy); color: var(--on-navy); overflow: hidden; }
.section-alt + .band { border-top: 1px solid rgb(255 255 255 / 0.2); }
.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.band h2 { margin: 0; color: var(--on-navy); }
.band :focus-visible { outline-color: #ffffff; }
.band .btn-primary { background: #ffffff; border-color: #ffffff; color: var(--navy); }
.band .btn-primary:hover { color: var(--navy); }

/* Products page */
.product-desc { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.5; }
.product-line { color: var(--muted); font-weight: 700; margin-bottom: 0.5rem; }
.product .cta-row { margin-top: 2.25rem; }

/* Managed services page */
.options-line { font-size: clamp(1.375rem, 1.15rem + 1vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 2rem 0; }
.note { color: var(--muted); font-size: 0.9375rem; margin-top: 2rem; }
.bullet-list { list-style: none; margin: 0 0 1.75rem; border-top: 1px solid var(--rule); }
.bullet-list li { position: relative; padding: 0.875rem 0 0.875rem 2.25rem; border-bottom: 1px solid var(--rule); }
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45rem;
  width: 1.25rem;
  height: 0.375rem;
  background: var(--green);
  clip-path: polygon(0 100%, 4px 0, 100% 0, calc(100% - 4px) 100%);
}
.section-alt .bullet-list,
.section-alt .bullet-list li { border-color: rgb(255 255 255 / 0.35); }
.faq { margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.section-alt .faq,
.section-alt .faq dd { border-color: rgb(255 255 255 / 0.35); }
.faq dt { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; padding-top: 1.5rem; }
.faq dd { margin: 0.375rem 0 0; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin-top: 3rem;
  border-top: 2px solid var(--rule);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: baseline;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.4;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green);
}
@media (min-width: 768px) { .steps li { grid-template-columns: 8rem minmax(0, 46rem); padding: 2.25rem 0; } }
.section-alt .steps li { color: var(--on-navy); }

/* About page */
.name-line { font-size: 1.25rem; font-weight: 800; }

/* Contact form */
/* No outer box: the fields sit on the page. */
.form-box { max-width: 40rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 800; }
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 0.375rem;
  height: 3rem;
  padding: 0 1rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #5b6b80; /* 5.3:1 against white for UI boundaries */
  border-radius: 0;
}
.field textarea { height: auto; min-height: 9rem; padding: 0.75rem 1rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 1px; border-color: var(--navy); }
/* Disabled until Turnstile is configured: flat grey fill, solid rule, text kept at AA contrast. */
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  opacity: 1;
  color: var(--muted);              /* 7.4:1 on the grey fill */
  -webkit-text-fill-color: var(--muted);
  background: #eef1f5;
  border-color: #5b6b80;             /* 4.8:1 against the fill */
  cursor: not-allowed;
}
.field textarea:disabled::placeholder { color: #4f5f74; -webkit-text-fill-color: #4f5f74; opacity: 1; } /* 5.6:1 */
.btn-primary[aria-disabled="true"]:disabled {
  opacity: 1;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-navy-muted);       /* 10.6:1 on navy */
  cursor: not-allowed;
}
.btn-primary[aria-disabled="true"]:disabled::after { display: none; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-hint { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.field-error { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--error); }
.field-error:empty { display: none; }
.form-status {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--error);
  background: #fef2f2;
  color: #991b1b;
}
.form-done:focus { outline: none; }
.page-head .form-box { margin-top: 2.5rem; }
.page-head .form-box:has(form[hidden]):not(:has(.form-done)) { display: none; }

/* Honeypot: off-screen for people, still in the DOM for bots */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* Prose */
.prose h2 { margin-top: 3rem; }
.prose h2:first-child { margin-top: 0; }
.prose-lg h2:not(:first-child) { margin-top: 4rem; }
/* Body text is one size everywhere: 16px on phones, 17px from 768px (prose, two-column teasers, cards, product blocks). */
.prose p:not([class]),
.teaser p,
.card p:not(.card-tag),
.product-line,
.bullet-list li,
.faq dd,
.note { font-size: 1rem; }
@media (min-width: 768px) {
  .prose p:not([class]),
  .teaser p,
  .card p:not(.card-tag),
  .product-line,
  .bullet-list li,
  .faq dd,
  .note { font-size: 1.0625rem; }
}
.legal h1 { margin-bottom: 1.5rem; }
.updated { color: var(--muted); font-size: 0.9375rem; font-weight: 700; padding-bottom: 2rem; border-bottom: 2px solid var(--rule); }

/* Sticky in-page index (built by /assets/page-index.js on .has-index pages, 1200px and up only).
   Rail is 200px wide; labels are 14px and wrap within 180px so they never reach the content column. */
.page-index-rail { display: none; }
@media (min-width: 1200px) {
  .has-index main { position: relative; }
  .has-index .page-index-rail {
    display: block;
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
    width: calc(var(--rail) - 2rem);
    pointer-events: none;
  }
  .page-index {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    margin-top: 2.5rem;
    padding: 1rem 1rem 1rem 0;
    background: var(--bg);
    pointer-events: auto;
  }
  .page-index ol { list-style: none; margin: 0; padding: 0; counter-reset: idx; border-left: 2px solid var(--navy); }
  .page-index li { counter-increment: idx; }
  .page-index a {
    position: relative;
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    padding: 0.4rem 0 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 180px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--muted);
    text-decoration: none;
  }
  .page-index a::before {
    content: counter(idx, decimal-leading-zero);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: var(--navy);
  }
  .page-index a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--green); }
  .page-index a[aria-current="true"] { color: var(--navy); font-weight: 800; }
  .page-index a[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: -2px;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 4px;
    background: var(--green);
  }
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--on-navy-muted);
  padding: 4.5rem 0 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
  margin-bottom: 3.5rem;
}
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
.footer-line { margin: 1.25rem 0 0; max-width: 32ch; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #ffffff; }
.footer-title {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}
.footer-list { list-style: none; }
.footer-list a {
  display: inline-block;
  padding: 0.375rem 0;
  color: var(--on-navy-muted);
  text-decoration: none;
}
.footer-list a:hover { color: #ffffff; text-decoration: underline; text-decoration-color: var(--green); }
.site-footer :focus-visible { outline-color: #ffffff; }
.copyright {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-size: 0.9375rem;
}
