/* Triovant Systems — site styles. Brand colours live in :root; edit them there. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2"); /* Inter, SIL Open Font License */
}
:root {
  --navy: #101820;
  --navy-2: #16222d;
  --cyan: #28d7e5;
  --teal: #0b7480;          /* darker cyan for text/links on light backgrounds (AA contrast) */
  --white: #ffffff;
  --light: #f7fafc;
  --muted: #64748b;
  --border: #e2e8f0;
  --text: #101820;
  --danger: #b42318;
  --success: #067647;
  --radius: 12px;
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
ul { padding-left: 1.2em; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: var(--cyan); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--cyan); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: var(--light); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.075rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.dark .eyebrow { color: var(--cyan); }
.lead { font-size: 1.15rem; color: var(--muted); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 18px; height: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .975rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: #5fe3ee; color: var(--navy); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: #24323f; color: var(--white); }
.btn-outline { border-color: var(--border); color: var(--navy); background: var(--white); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.dark .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.28); }
.dark .btn-outline:hover { border-color: var(--cyan); color: var(--white); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.mt { margin-top: 28px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: var(--white); cursor: pointer;
}
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); padding: 8px 20px 24px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  display: block; padding: 14px 4px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--white); }
.site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cyan); padding-left: 14px; }
.site-nav .btn { margin-top: 20px; width: 100%; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; position: static; padding: 0; border: 0; align-items: center; gap: 32px; background: none; }
  .site-nav ul { display: flex; gap: 28px; }
  .site-nav a:not(.btn) { padding: 8px 0; border: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cyan); padding-left: 0; }
  .site-nav .btn { margin: 0; width: auto; min-height: 44px; }
}

/* Hero */
.dark { background: var(--navy); color: var(--white); }
.dark p, .dark .lead { color: rgba(255,255,255,.74); }
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(40,215,229,.12), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
}
.hero::before { /* faint engineering grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero-inner { position: relative; display: grid; gap: 48px; align-items: center; padding: clamp(64px, 10vw, 120px) 20px; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 56ch; margin-bottom: 32px; }
.hero-art { max-width: 460px; width: 100%; justify-self: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.15fr .85fr; } }
.tagline { margin-top: 40px; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55) !important; }

.page-hero { padding: clamp(56px, 8vw, 96px) 0; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { max-width: 62ch; margin: 0; }

/* Grids & cards */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: #c7d2de; box-shadow: 0 12px 32px rgba(16,24,32,.08); transform: translateY(-3px); }
.card p { color: var(--muted); }
.card .link-arrow { margin-top: auto; }
.card-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 10px;
  background: rgba(40,215,229,.12); color: var(--teal); margin-bottom: 20px;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { border-top: 2px solid var(--border); padding-top: 20px; }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-weight: 700; color: var(--teal); margin-bottom: 8px; font-size: .9rem; letter-spacing: .08em; }
.step p { color: var(--muted); margin: 0; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--teal); margin-top: 3px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .container { max-width: 760px; }
.cta-band .btn-row { justify-content: center; margin-top: 28px; }

/* Services page */
.service-detail { display: grid; gap: 32px; padding: 56px 0; border-top: 1px solid var(--border); scroll-margin-top: 96px; }
.service-detail:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .service-detail { grid-template-columns: 340px 1fr; gap: 56px; } }
.service-detail .cols { display: grid; gap: 28px; }
@media (min-width: 640px) { .service-detail .cols { grid-template-columns: 1fr 1fr; } }
.service-detail .h4-like { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.service-detail ul { margin: 0; color: var(--text); }
.service-detail li { margin-bottom: 6px; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 8px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; }
.toc a:hover { border-color: var(--cyan); color: var(--white); }

/* Contact */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 380px 1fr; gap: 64px; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .card-icon { margin: 0; width: 44px; height: 44px; }
.contact-list strong { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; }
.contact-list a { font-weight: 600; color: var(--navy); text-decoration: none; display: block; }
.contact-list a:hover { color: var(--teal); text-decoration: underline; }

.form { display: grid; gap: 20px; }
@media (min-width: 640px) { .form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } }
.form .row-2 { display: grid; gap: 20px; }
.field label { display: block; font-weight: 600; font-size: .925rem; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field .hint { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--white);
  border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(11,116,128,.35); outline-offset: 0; border-color: var(--teal); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: .875rem; margin: 6px 0 0; }
.field .error:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.form-status { border-radius: 10px; padding: 14px 16px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.ok { background: #ecfdf3; color: var(--success); border: 1px solid #abefc6; }
.form-status.err { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.form-note { font-size: .875rem; color: var(--muted); margin: 0; }

/* Prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: #334155; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--white); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .875rem; }
.footer-bottom ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }

/* Motion (all of it is switched off by the prefers-reduced-motion rule at the top) */
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.card:hover .card-icon { background: rgba(40,215,229,.2); }
@keyframes rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: none; } }
.hero-inner > *, .page-hero .container > * { animation: rise .6s ease-out both; }
.hero-inner > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: .12s; }
.page-hero .container > :nth-child(3) { animation-delay: .24s; }
/* Scroll reveal: only in browsers with scroll-driven animations; others just show the content */
@supports (animation-timeline: view()) {
  .section .card, .section .step, .section-head { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}

/* Sliding services / technologies strip (home) */
.marquee-section { padding: clamp(48px, 6vw, 72px) 0; }
.marquee-title { text-align: center; font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 32px; }
.marquee { overflow: hidden; padding: 4px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: 16px; }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 50s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 16px; margin: 0; padding: 0 16px 0 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 16px 24px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; color: var(--navy);
}
.chip .icon { color: var(--teal); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { /* no sliding: show one static, wrapped copy */
  .marquee { mask-image: none; }
  .marquee-track { width: auto; }
  .marquee ul { flex-wrap: wrap; justify-content: center; padding: 0 20px; }
  .marquee ul[aria-hidden] { display: none; }
}
