/* Advanced Calibration & Glass Inc */
:root {
  --c-bay: #EDF0F2;
  --c-white: #FFFFFF;
  --c-graphite: #14262E;
  --c-slate: #52646E;
  --c-teal: #0E7C86;
  --c-teal-dark: #0A5F67;
  --c-teal-soft: #D5E8EA;
  --c-yellow: #E4B400;
  --c-line: #C8D1D6;
  --c-on-dark: #C9D6DC;
  --c-error: #A3231A;

  --f-display: "Chakra Petch", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 6rem;

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-pill: 999px;

  --sh-rig: 0 30px 60px -36px rgba(20, 38, 46, 0.7);
  --sh-header: 0 8px 20px -14px rgba(20, 38, 46, 0.5);
  --sh-form: 0 24px 48px -34px rgba(20, 38, 46, 0.55);

  --tape-h: 12px;
  --header-h: 68px;
  --max-w: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; color: var(--c-graphite); background: var(--c-bay); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--c-teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--c-graphite); }
:focus-visible { outline: 3px solid var(--c-yellow); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 6.5vw, 3rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--s-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-4); top: var(--s-2); z-index: 100; background: var(--c-graphite); color: var(--c-white); padding: var(--s-2) var(--s-4); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); color: var(--c-white); }

/* Signature: checker calibration tape */
.checker-tape {
  height: var(--tape-h);
  background-color: var(--c-white);
  background-image: repeating-conic-gradient(var(--c-graphite) 0 25%, var(--c-white) 0 50%);
  background-size: calc(var(--tape-h) * 2) var(--tape-h);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--s-3) var(--s-5); font: 600 1.0625rem/1.2 var(--f-body); border: 2px solid transparent; border-radius: var(--r-pill); text-decoration: none; cursor: pointer; transition: transform 0.15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-teal); color: var(--c-white); }
.btn-primary:hover { background: var(--c-teal-dark); color: var(--c-white); }
.btn-outline { background: transparent; color: var(--c-graphite); border-color: var(--c-graphite); }
.btn-outline:hover { background: var(--c-graphite); color: var(--c-white); }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-bay); border-bottom: 1px solid var(--c-line); }
.site-header.is-scrolled { box-shadow: var(--sh-header); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); height: var(--header-h); }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--c-graphite); min-width: 0; }
.brand:hover { color: var(--c-graphite); }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: 0.875rem; color: var(--c-slate); }

.burger { width: 48px; height: 48px; flex-shrink: 0; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-pill); cursor: pointer; padding: 0; }
.burger-line { width: 20px; height: 2px; background: var(--c-graphite); transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }
.burger[aria-expanded="true"] .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-bay); border-bottom: 1px solid var(--c-line); box-shadow: var(--sh-header); opacity: 0; transform: translateY(-10px); visibility: hidden; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s; }
.site-nav.is-open { opacity: 1; transform: translateY(0); visibility: visible; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.nav-list { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-5); }
.nav-list a { display: block; padding: var(--s-3) 0; color: var(--c-graphite); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--c-line); }
.nav-list a:hover { color: var(--c-teal-dark); }
.nav-list li:last-child a { border-bottom: 0; }
.nav-list .nav-cta { margin-top: var(--s-3); text-align: center; background: var(--c-teal); color: var(--c-white); border-radius: var(--r-pill); }
.nav-list .nav-cta:hover { background: var(--c-teal-dark); color: var(--c-white); }

/* Hero */
.hero { padding: var(--s-7) 0 var(--s-8); }
.hero-grid { display: grid; gap: var(--s-7); }
.hero-place { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--c-slate); margin-bottom: var(--s-3); }
.hero-place::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--c-yellow); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--c-bay), inset 0 0 0 7px var(--c-graphite); }
.hero-title { font-size: clamp(2.5rem, 11vw, 4.6rem); font-weight: 700; line-height: 0.98; max-width: 13ch; letter-spacing: -0.01em; }
.lead { margin-top: var(--s-5); color: var(--c-slate); font-size: 1.125rem; max-width: 52ch; }
.hero-actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-actions .btn { flex: 1 1 200px; }

/* Hero rig */
.rig { background: var(--c-graphite); border-radius: var(--r-lg); padding: var(--s-3); box-shadow: var(--sh-rig); }
.rig-bay { position: relative; height: 360px; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(180deg, #1D343E 0%, #14262E 62%, #0F1F26 100%); }
.rig-bay::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: repeating-linear-gradient(90deg, rgba(201, 214, 220, 0.12) 0 1px, transparent 1px 36px); border-top: 2px solid rgba(201, 214, 220, 0.25); }
.windshield { position: absolute; top: 22px; left: 50%; width: 82%; height: 108px; transform: translateX(-50%); clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); background: linear-gradient(160deg, rgba(213, 232, 234, 0.55) 0%, rgba(14, 124, 134, 0.75) 55%, rgba(10, 95, 103, 0.9) 100%); }
.camera { position: absolute; top: 0; left: 50%; width: 44px; height: 22px; transform: translateX(-50%); background: var(--c-graphite); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.camera::after { content: ""; position: absolute; left: 50%; top: 6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c-yellow); }
.laser { position: absolute; top: 44px; left: 50%; width: 2px; height: 172px; margin-left: -1px; background: var(--c-yellow); transform-origin: top center; animation: laser-draw 0.9s var(--ease) 0.3s both; }
.target { position: absolute; left: 50%; top: 150px; width: 132px; height: 132px; transform: translateX(-50%); background: var(--c-white); padding: 8px; border-radius: var(--r-sm); }
.target-board { width: 100%; height: 100%; background-color: var(--c-white); background-image: repeating-conic-gradient(var(--c-graphite) 0 25%, var(--c-white) 0 50%); background-size: 29px 29px; }
.reticle { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border: 3px solid var(--c-yellow); border-radius: 50%; box-shadow: 0 0 0 3px var(--c-graphite); animation: lock-on 0.45s var(--ease) 1.15s both; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--c-yellow); }
.reticle::before { left: 50%; top: -10px; bottom: -10px; width: 3px; margin-left: -1.5px; }
.reticle::after { top: 50%; left: -10px; right: -10px; height: 3px; margin-top: -1.5px; }
.stand { position: absolute; left: 50%; top: 282px; width: 8px; height: 30px; margin-left: -4px; background: var(--c-on-dark); }
.stand::after { content: ""; position: absolute; left: -34px; bottom: -4px; width: 76px; height: 6px; border-radius: var(--r-pill); background: var(--c-on-dark); }
.rig-label { position: absolute; font-size: 0.875rem; font-weight: 600; color: var(--c-on-dark); }
.rig-label-cam { top: 138px; left: var(--s-3); max-width: 30%; }
.rig-label-target { top: 322px; right: var(--s-3); }
@keyframes laser-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lock-on { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: scale(1); } }

/* Sections */
.section { padding: var(--s-8) 0; }
.section-tint { background: var(--c-teal-soft); }
.section-dark { background: var(--c-graphite); color: var(--c-bay); }
.section-head { max-width: 620px; margin-bottom: var(--s-6); }
.section-head p { margin-top: var(--s-3); color: var(--c-slate); font-size: 1.125rem; }
.section-dark .section-head p { color: var(--c-on-dark); }

/* Services */
.service-groups { display: grid; gap: var(--s-6); }
.service-group { background: var(--c-white); border-radius: var(--r-lg); padding: var(--s-5) var(--s-4); }
.service-group-tech { background: var(--c-graphite); color: var(--c-bay); }
.group-title { display: flex; align-items: center; gap: var(--s-3); font-size: 1.6rem; padding-bottom: var(--s-4); border-bottom: 2px solid var(--c-line); }
.group-title::before { content: ""; width: 26px; height: 18px; flex-shrink: 0; clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); background: var(--c-teal); }
.service-group-tech .group-title { border-color: rgba(201, 214, 220, 0.25); }
.service-group-tech .group-title::before { width: 18px; height: 18px; clip-path: none; background: repeating-conic-gradient(var(--c-bay) 0 25%, var(--c-graphite) 0 50%) 0 0 / 9px 9px; }
.service { padding: var(--s-5) 0 var(--s-2); }
.service + .service { border-top: 1px solid var(--c-line); }
.service-group-tech .service + .service { border-color: rgba(201, 214, 220, 0.25); }
.service p { margin-top: var(--s-2); color: var(--c-slate); }
.service-group-tech .service p { color: var(--c-on-dark); }

/* Calibration */
.calib-grid { display: grid; gap: var(--s-2); }
.calib-points { display: grid; gap: var(--s-5); }
.point { position: relative; padding-left: var(--s-6); }
.point::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--c-yellow); border-radius: 50%; }
.point::after { content: ""; position: absolute; left: 7px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--c-yellow); }
.point p { margin-top: var(--s-2); color: var(--c-on-dark); max-width: 52ch; }

/* Prepare checklist */
.prepare-grid { display: grid; gap: var(--s-2); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.checklist li { position: relative; background: var(--c-white); border-radius: var(--r-md); padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-4) + 34px); }
.checklist li::before { content: ""; position: absolute; left: var(--s-4); top: calc(var(--s-4) + 3px); width: 20px; height: 20px; background: repeating-conic-gradient(var(--c-graphite) 0 25%, var(--c-white) 0 50%) 0 0 / 10px 10px; box-shadow: 0 0 0 2px var(--c-graphite); }
.checklist p { margin-top: var(--s-1); color: var(--c-slate); }

/* Company */
.company-grid { display: grid; gap: var(--s-2); }
.details { margin: 0; background: var(--c-white); border-radius: var(--r-lg); padding: var(--s-2) var(--s-4); }
.details div { display: grid; gap: 2px; padding: var(--s-3) 0; border-bottom: 1px solid var(--c-line); }
.details div:last-child { border-bottom: 0; }
.details dt { font-size: 0.9375rem; color: var(--c-slate); }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Contact */
.contact-grid { display: grid; gap: var(--s-7); }
.contact-info > p { margin-top: var(--s-3); color: var(--c-slate); max-width: 46ch; }
.contact-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.contact-list li { display: grid; gap: 2px; padding: var(--s-3) 0; border-bottom: 1px solid var(--c-line); }
.contact-list a, .contact-list span:not(.contact-label) { font-weight: 600; overflow-wrap: anywhere; }
.contact-label { font-size: 0.9375rem; color: var(--c-slate); }
.form-wrap { background: var(--c-white); border-radius: var(--r-lg); padding: var(--s-5) var(--s-4); box-shadow: var(--sh-form); border-top: var(--tape-h) solid var(--c-teal); }
.request-form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-1); }
.field-pair { display: grid; gap: var(--s-4); }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--c-slate); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: var(--s-3); font: 400 1.0625rem/1.4 var(--f-body); color: var(--c-graphite); background: var(--c-bay); border: 2px solid transparent; border-bottom-color: var(--c-slate); border-radius: var(--r-sm); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #66767F; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-teal); background: var(--c-white); }
.field [aria-invalid="true"] { border-color: var(--c-error); }
.field-error { min-height: 1.2em; font-size: 0.9375rem; font-weight: 600; color: var(--c-error); }
.field-check { grid-template-columns: 24px 1fr; column-gap: var(--s-3); align-items: start; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin: 3px 0 0; padding: 0; accent-color: var(--c-teal); }
.field-check label { font-weight: 400; }
.field-check .field-error { grid-column: 1 / -1; }
.form-success { display: grid; gap: var(--s-4); animation: pop-in 0.35s var(--ease) both; }
.form-success[hidden] { display: none; }
.form-success:focus { outline: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Legal pages */
.page-hero { padding: var(--s-7) 0 var(--s-6); }
.page-hero h1 { font-size: clamp(2.3rem, 10vw, 4rem); font-weight: 700; line-height: 1; max-width: 16ch; }
.page-intro { margin-top: var(--s-4); color: var(--c-slate); font-size: 1.125rem; max-width: 56ch; }
.updated { margin-top: var(--s-4); font-size: 0.9375rem; font-weight: 600; }
.prose { max-width: 760px; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.6rem; margin-top: var(--s-6); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: var(--s-3); max-width: 70ch; }
.id-block { margin-top: var(--s-5); padding: var(--s-4); background: var(--c-white); border-radius: var(--r-md); border-left: 6px solid var(--c-teal); overflow-wrap: anywhere; }
.page-404 { min-height: 60vh; }
.nf-code { font-family: var(--f-display); font-weight: 700; font-size: clamp(4.5rem, 26vw, 10rem); line-height: 0.9; color: var(--c-teal-dark); }

/* Footer */
.site-footer { background: var(--c-graphite); color: var(--c-on-dark); padding-bottom: var(--s-5); }
.site-footer .container { padding-top: var(--s-7); }
.site-footer a { color: var(--c-white); }
.site-footer a:hover { color: var(--c-yellow); }
.footer-top { display: grid; gap: var(--s-5); padding-bottom: var(--s-5); border-bottom: 1px solid rgba(201, 214, 220, 0.25); }
.footer-brand { display: flex; align-items: center; gap: var(--s-3); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer-nav a { font-weight: 600; text-decoration: none; display: inline-block; padding: var(--s-1) 0; }
.legal { padding-top: var(--s-5); font-size: 0.8125rem; line-height: 1.6; color: var(--c-on-dark); overflow-wrap: anywhere; }
.legal-bottom { margin-top: var(--s-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.legal-links { display: flex; gap: var(--s-4); }

@media (min-width: 480px) {
  .container { padding: 0 var(--s-5); }
  .brand-name { font-size: 1.2rem; }
  .field-pair { grid-template-columns: 1fr 1fr; }
  .form-wrap { padding: var(--s-6) var(--s-5); }
  .service-group { padding: var(--s-6) var(--s-5); }
  .hero-actions .btn { flex: 0 0 auto; }
  .rig-label-cam { max-width: none; }
}

@media (min-width: 768px) {
  :root { --tape-h: 16px; }
  .section { padding: var(--s-9) 0; }
  .hero { padding: var(--s-8) 0 var(--s-9); }
  .rig-bay { height: 420px; }
  .windshield { height: 130px; width: 76%; }
  .laser { height: 200px; }
  .target { top: 170px; width: 156px; height: 156px; }
  .target-board { background-size: 35px 35px; }
  .stand { top: 326px; height: 40px; }
  .rig-label-cam { top: 160px; }
  .rig-label-target { top: 378px; }
  .service-groups { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .calib-points { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
  .checklist { grid-template-columns: 1fr 1fr; }
  .details div { grid-template-columns: 200px 1fr; gap: var(--s-4); align-items: baseline; }
  .contact-list li { grid-template-columns: 120px 1fr; gap: var(--s-4); align-items: baseline; }
  .footer-top { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 1024px) {
  :root { --header-h: 80px; }
  .burger { display: none; }
  .site-nav { position: static; opacity: 1; transform: none; visibility: visible; background: transparent; border: 0; box-shadow: none; transition: none; }
  .nav-list { display: flex; align-items: center; gap: var(--s-5); padding: 0; }
  .nav-list a { border: 0; padding: var(--s-2) 0; }
  .nav-list .nav-cta { margin: 0; padding: var(--s-2) var(--s-5); }
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: var(--s-8); }
  .calib-grid .section-head { max-width: 760px; }
  .prepare-grid, .company-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-7); }
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
