/* jangraciviltech.com homepage. Brand teal and Poppins come from the JCT logo and the tools site. */
:root {
  --teal: #2b9e91;
  --teal-ink: #1f7d72;      /* teal text on white (AA contrast) */
  --teal-wash: #e8f4f2;
  --plan: #0f2b28;          /* headings and the dark band: the green-black of a printed survey plan */
  --plan-2: #1b403b;
  --body: #46514f;
  --paper: #f7f9f8;
  --rule: #d6dfdd;
  --peg: #f0b429;           /* survey station markers only */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 16px/1.65 var(--font); color: var(--body); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--plan); margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--teal-ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--plan); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px;
  border: 1.5px solid var(--plan); border-radius: 6px; background: #fff; color: var(--plan);
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--paper); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plan); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.mark img { display: block; }
.mark span { white-space: nowrap; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--plan); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--teal-ink); }

/* ---------- hero: a survey plan ---------- */
.hero { position: relative; overflow: hidden; background: var(--paper); border-bottom: 1px solid var(--rule); }
.plan { position: absolute; inset: 0; }
.plan .contours, .plan .traverse { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-in { position: relative; padding-top: 112px; padding-bottom: 120px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; max-width: 13em; letter-spacing: -0.025em; }
.lede { margin-top: 24px; font-size: 18px; max-width: 34em; color: var(--plan-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.since { margin-top: 40px; font-size: 14px; max-width: 32em; padding-left: 14px; border-left: 3px solid var(--peg); color: var(--plan-2); }
/* Keeps the text readable where it sits over the plan. */
.hero-in > * { position: relative; }
.hero-in::before {
  content: ''; position: absolute; inset: 0 auto 0 -40vw; width: calc(40vw + 760px);
  background: linear-gradient(90deg, var(--paper) 70%, rgba(247, 249, 248, 0));
}

.traverse .leg { fill: none; stroke: var(--plan); stroke-width: 1.6; }
.traverse .ray { fill: none; stroke: var(--plan); stroke-width: 1; stroke-dasharray: 3 5; opacity: .45; }
.traverse .stn { fill: var(--peg); stroke: var(--plan); stroke-width: 1.4; stroke-linejoin: round; }
.traverse .office { fill: var(--teal); stroke: #fff; stroke-width: 3; }
.traverse .ring { fill: none; stroke: var(--teal); stroke-width: 1.5; }
.traverse text { font: 500 13px var(--font); fill: var(--plan); font-variant-numeric: tabular-nums; }
.traverse .name { font-weight: 600; }
.traverse .obs { fill: var(--plan-2); font-weight: 400; font-size: 12px; }
.traverse .halo { stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; }
/* The one load animation: the traverse is run from station to station. */
.traverse.run .leg { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .55s ease-out forwards; animation-delay: var(--at); }
.traverse.run .reveal { opacity: 0; animation: show .3s ease-out forwards; animation-delay: var(--at); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }

/* ---------- clients ---------- */
.clients { padding: 40px 0; border-bottom: 1px solid var(--rule); }
.clients-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.clients h2 { font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.clients ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.clients li { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 6px; color: var(--plan); font-weight: 500; font-size: 15px; background: #fff; }

/* ---------- sections ---------- */
.block { padding: 104px 0; }
.block.alt { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: end; margin-bottom: 56px; }
.head h2, .deliv h2, .route h2, .contact h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.head p { font-size: 17px; max-width: 32em; }

.group { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; padding: 32px 0; border-top: 1.5px solid var(--plan); }
.group + .group { margin-top: 24px; }
.group h3 { font-size: 20px; }
.svc { margin: 0; }
.svc > div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.svc > div:first-child { padding-top: 0; }
.svc > div:last-child { border-bottom: 0; padding-bottom: 0; }
.svc dt { font-weight: 600; color: var(--plan); font-size: 17px; }
.svc dd { margin: 4px 0 0; }

/* ---------- route band ---------- */
.route { background: var(--plan); color: #c9dbd8; padding: 96px 0 88px; }
.route h2 { color: #fff; }
.route-text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: end; }
.route-text p { font-size: 17px; max-width: 34em; }
.chainage { display: block; width: 100%; height: auto; margin: 48px 0 40px; overflow: visible; }
.chainage .align { fill: none; stroke: var(--teal); stroke-width: 3; }
.chainage line { stroke: #fff; stroke-width: 1.4; }
.chainage line.km { stroke: var(--peg); stroke-width: 2; }
.chainage text { fill: #9fbab6; font: 400 12px var(--font); font-variant-numeric: tabular-nums; }
.chainage text.km { fill: var(--peg); font-weight: 600; }
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--plan-2); }
.works li { padding: 18px 0; border-bottom: 1px solid var(--plan-2); color: #fff; font-weight: 500; font-size: 17px; }

/* ---------- about ---------- */
.block.about { background: var(--paper); border-bottom: 1px solid var(--rule); }
.about-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.about h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.timeline { list-style: none; margin: 36px 0 0; padding: 0; border-left: 1.5px solid var(--plan); }
.timeline li { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 0 0 18px 24px; color: var(--plan); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--peg); border: 1.5px solid var(--plan); }
.timeline span { font-weight: 600; font-variant-numeric: tabular-nums; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.people li { padding: 24px 0 0; border-top: 1.5px solid var(--plan); }
.people h3 { font-size: 20px; }
.people .role { color: var(--teal-ink); font-weight: 500; margin: 2px 0 10px; }
.people a { display: inline-block; margin-top: 8px; padding: 4px 0; color: var(--plan); font-weight: 500; text-decoration-color: var(--teal); text-underline-offset: 3px; }

/* ---------- process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 20px; border-top: 1.5px solid var(--plan); }
.steps li::before { content: counter(step); display: block; font-size: 15px; font-weight: 600; color: var(--teal-ink); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { font-size: 15px; }

/* ---------- deliverables ---------- */
.deliv { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 64px; align-items: start; }
.sub { font-size: 17px; margin-top: 16px; max-width: 34em; }
.formats { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.formats li { padding: 20px 0; border-top: 1px solid var(--rule); }
.formats strong { display: block; color: var(--plan); font-weight: 600; font-size: 17px; }
.formats span { font-size: 15px; }
.kit { margin: 0; padding: 28px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.kit figcaption { font-weight: 600; color: var(--plan); margin-bottom: 12px; }
.kit ul { margin: 0; padding: 0; list-style: none; }
.kit li { padding: 8px 0 8px 22px; position: relative; }
.kit li::before { content: ''; position: absolute; left: 0; top: 16px; border: 6px solid transparent; border-bottom: 10px solid var(--peg); border-top: 0; }

/* ---------- contact ---------- */
.contact-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 72px; align-items: start; }
.details > p { margin-top: 16px; font-size: 17px; }
.reach { margin: 36px 0 0; }
.reach > div { padding: 16px 0; border-top: 1px solid var(--rule); }
.reach dt { font-size: 14px; }
.reach dd { margin: 2px 0 0; color: var(--plan); font-weight: 500; }
.reach a { display: inline-block; padding: 6px 0; color: var(--plan); text-decoration-color: var(--teal); text-underline-offset: 3px; }
.reach dd a[href^="https"] { font-weight: 400; font-size: 15px; color: var(--teal-ink); }

.form { display: grid; gap: 18px; padding: 36px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--plan); font-weight: 500; }
.form em { font-style: normal; font-weight: 400; color: var(--body); }
.form input, .form select, .form textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--plan); background: #fff;
  border: 1px solid #bcc9c6; border-radius: 6px; padding: 11px 12px;
}
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f2b28' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(43, 158, 145, .2); }
.form [aria-invalid="true"] { border-color: #c8312b; }
.form .btn { justify-self: start; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.msg:empty { display: none; }
.msg { font-size: 15px; color: #b02a25; }
.msg.ok { color: var(--plan); background: var(--teal-wash); border-left: 3px solid var(--teal); padding: 12px 14px; }

/* ---------- footer ---------- */
.foot { background: var(--plan); color: #a9c1bd; font-size: 14px; padding: 56px 0 28px; }
.foot strong { color: #fff; font-weight: 600; font-size: 16px; }
.foot p { margin-top: 6px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.legal { margin: 0; display: grid; gap: 14px; }
.legal a { display: inline-block; padding: 4px 0; }
.legal dt { color: #fff; font-weight: 500; }
.legal dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.foot nav { display: grid; gap: 6px; justify-items: start; align-content: start; }
.foot a { color: #fff; text-decoration: none; padding: 4px 0; }
.foot a:hover { text-decoration: underline; }
.copy { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--plan-2); font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.foot a.staff { color: #7f9a96; font-size: 13px; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .plan .traverse { display: none; }
  .top-in { justify-content: space-between; }
  .head, .group, .route-text, .deliv, .contact-in, .about-in { grid-template-columns: 1fr; gap: 20px; }
  .clients-in { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .contact-in { gap: 48px; }
  .hero-in::before { width: calc(40vw + 100%); background: linear-gradient(180deg, rgba(247, 249, 248, .92), rgba(247, 249, 248, .8)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-in { height: 60px; }
  .mark span { font-size: 15px; }
  .mark img { width: 36px; height: 36px; }
  .btn.small { padding: 0 12px; font-size: 13px; }
  .hero-in { padding-top: 56px; padding-bottom: 64px; }
  .lede { font-size: 16px; }
  .block { padding: 72px 0; }
  .route { padding: 72px 0 64px; }
  .works { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .works li { font-size: 15px; }
  .steps, .formats { grid-template-columns: 1fr; }
  .form { padding: 20px; }
  .form .row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .foot-in { grid-template-columns: 1fr; }
  .clients-in { grid-template-columns: 1fr; gap: 16px; }
  .clients li { font-size: 14px; }
  .chainage text { display: none; }
  .chainage { margin: 32px 0; }
}
@media (max-width: 340px) {
  .mark span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .traverse.run .leg, .traverse.run .reveal { animation: none; stroke-dashoffset: 0; opacity: 1; }
}
