/* Bedrock Apex — site styles */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jbmono-latin.woff2") format("woff2-variations"),
       url("../fonts/jbmono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #08080a;
  --bg-2: #0e0e10;
  --bg-3: #161618;
  --bone: #efe9df;
  --muted: #a39d93;
  --dim: #857f76;
  --line: rgba(239, 233, 223, 0.1);
  --line-2: rgba(239, 233, 223, 0.2);
  --rust: #b05010;          /* the logo's orange */
  --rust-deep: #8a3f0d;
  --ember: #e67123;         /* same hue, lighter, for small text and thin lines on black */
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: clamp(20px, 4.4vw, 72px);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--bone); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--display); font-size: 17px; line-height: 1.6; font-weight: 400;
  background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--rust); color: var(--bone); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--rust); color: var(--bone); font-weight: 700; }
.skip:focus { top: 12px; }

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 80; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--rust); }

.wrap { max-width: 1240px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.tick { width: 24px; height: 1px; background: var(--rust); }

/* buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 17px 28px; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; isolation: isolate; cursor: pointer; background: none;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  transition: color .45s var(--ease), border-color .45s var(--ease), background-color .45s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bone); transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--bg); border-color: var(--bone); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .5s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--rust); border-color: var(--rust); color: var(--bone); }
.btn--ghost { background: rgba(8, 8, 10, 0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--small { padding: 11px 18px; font-size: 11.5px; }
.btn--wide { width: 100%; }
.btn .wa { width: 20px; height: 20px; }
.btn:hover .wa { transform: none; }
.wa path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.wa .wa__ph { fill: currentColor; stroke: none; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad); border-bottom: 1px solid transparent; transition: background-color .5s var(--ease), padding .5s var(--ease), border-color .5s;
}
.nav.is-scrolled { background: rgba(8, 8, 10, 0.78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); padding-top: 12px; padding-bottom: 12px; border-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__mark { position: relative; width: 44px; height: 25px; overflow: hidden; }
.nav__mark img { position: absolute; top: 0; left: 0; width: 44px; height: auto; }
.nav__name { font-weight: 800; font-stretch: 80%; font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase; }
.nav__links { display: flex; gap: 36px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.nav__links a { position: relative; padding: 6px 0; transition: color .3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rust); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover { color: var(--bone); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* the hero copy waits for the intro (or shows anyway after 3s if scripts never run) */
.js .hero [data-reveal] { opacity: 0; animation: pre-show .6s 3s forwards; }
.is-static .hero [data-reveal] { opacity: 1; animation: none; }
@keyframes pre-show { to { opacity: 1; } }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__haze {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 44% at 74% 36%, rgba(176, 80, 16, 0.26), transparent 70%),
    radial-gradient(70% 55% at 50% 42%, rgba(176, 80, 16, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.55) 0%, rgba(8, 8, 10, 0) 26%, rgba(8, 8, 10, 0) 52%, rgba(8, 8, 10, 0.9) 86%, var(--bg) 100%);
}
.hero__ridge { position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; z-index: -1; pointer-events: none; opacity: 0; }
.hero__ridge svg { width: 100%; height: 100%; }
.hero__ridge path { fill: #0d0d0f; }
.no-webgl .hero__ridge { opacity: 1; }
.no-webgl .hero__haze { background: radial-gradient(70% 55% at 60% 60%, rgba(176, 80, 16, 0.28), transparent 70%), linear-gradient(180deg, #08080a 0%, #130e0b 60%, var(--bg) 100%); }

.hero__inner { position: relative; padding: 0 var(--pad) clamp(72px, 13vh, 140px); max-width: 1440px; }
.hero__eyebrow { margin-bottom: clamp(18px, 2.4vw, 28px); }
.hero__title { margin: 0; font-weight: 800; font-stretch: 84%; font-size: clamp(44px, min(7.4vw, 13vh), 128px); line-height: 0.98; letter-spacing: -0.022em; }
.hero__line { display: block; }
.hero__model { display: block; margin-bottom: 0.22em; font-size: max(0.34em, 19px); font-weight: 700; font-stretch: 96%; letter-spacing: 0.04em; }
.hero__accent { color: var(--rust); }
.hero__sub { max-width: 32ch; margin: clamp(20px, 2.4vw, 30px) 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; color: var(--muted); font-stretch: 94%; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(28px, 3.4vw, 44px); }

/* sections */
.section { padding: clamp(96px, 15vh, 190px) var(--pad); border-top: 1px solid var(--line); }
.head { display: grid; gap: 18px; max-width: 760px; }
.head__title { margin: 0; font-weight: 800; font-stretch: 84%; font-size: clamp(34px, 4.6vw, 68px); line-height: 1; letter-spacing: -0.02em; word-spacing: 0.06em; }
.head__text { margin: 0; max-width: 46ch; color: var(--muted); font-size: clamp(17px, 1.35vw, 19px); }

/* the CASE 570V at work */
.specs { margin: 2px 0 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.specs i { font-style: normal; color: var(--rust); margin: 0 0.9em; }
.jobs__stage { margin-top: clamp(40px, 6vw, 80px); }
.jobs__inner { display: grid; gap: clamp(28px, 4vw, 48px); }
.jobs__steps { display: none; }
.jobs__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 32px; }
.job__n, .jobs__steps { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--ember); }
.job__word { margin: 10px 0 0; font-weight: 800; font-stretch: 84%; font-size: clamp(28px, 2.8vw, 40px); line-height: 1; letter-spacing: -0.02em; }
.job__line { margin: 10px 0 0; max-width: 32ch; color: var(--muted); }

.art { position: relative; }
.art__dirt { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.backhoe { display: block; width: 100%; height: auto; overflow: hidden; }
.jobs__art { -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.backhoe .draw { fill: none; stroke: rgba(239, 233, 223, 0.82); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.backhoe .draw.accent { stroke: var(--ember); }
.backhoe .draw.faint { stroke: rgba(239, 233, 223, 0.3); stroke-dasharray: 4 6; }
.backhoe .draw.glass { fill: rgba(176, 80, 16, 0.07); }
.backhoe .draw.tread { stroke: rgba(239, 233, 223, 0.35); stroke-dasharray: 3 7; }
.backhoe .draw.pin { fill: var(--bg); stroke: var(--ember); }
.backhoe .ground__line, .backhoe .ground__cut { stroke: var(--line-2); }
.backhoe .draw.trench { stroke: var(--ember); }
.backhoe .mound { fill: none; stroke: rgba(230, 113, 35, 0.6); stroke-width: 1.4; stroke-dasharray: 5 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.backhoe .cyl-barrel { stroke: rgba(239, 233, 223, 0.82); stroke-width: 10; stroke-linecap: round; fill: none; vector-effect: none; }
.backhoe .cyl-rod { stroke: var(--ember); stroke-width: 4; stroke-linecap: round; fill: none; vector-effect: none; }
.js .backhoe .draw[pathLength] { stroke-dasharray: 1 1; stroke-dashoffset: 0; }

/* larger screens: the stage pins while the four jobs play */
.jobs--pinned .jobs__stage { height: 100vh; height: 100svh; margin-top: clamp(24px, 4vw, 56px); display: grid; align-content: center; padding: 78px 0 28px; }
.jobs--pinned .jobs__inner { grid-template-columns: minmax(230px, 0.25fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 3vw, 56px); width: 100%; max-width: 1640px; margin: 0 auto; }
.jobs--pinned .jobs__steps { display: flex; gap: 14px; list-style: none; margin: 0 0 30px; padding: 0; color: var(--dim); }
.jobs--pinned .jobs__steps li { position: relative; padding-bottom: 9px; min-width: 34px; transition: color .4s; }
.jobs--pinned .jobs__steps li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-2); transition: background-color .4s; }
.jobs--pinned .jobs__steps li.is-on { color: var(--bone); }
.jobs--pinned .jobs__steps li.is-on::after { background: var(--rust); }
.jobs--pinned .jobs__list { display: grid; grid-template-columns: 1fr; }
.jobs--pinned .job { grid-area: 1 / 1; }
.jobs--pinned .job__n { display: none; }
.jobs--pinned .job__word { margin: 0; font-size: clamp(48px, 5.2vw, 88px); }
.jobs--pinned .job__line { margin-top: 16px; font-size: clamp(17px, 1.35vw, 21px); }

/* small screens, and reduced motion: one frame per job */
.jobs--frames .jobs__inner { display: none; }
.jobs__frames { display: grid; gap: clamp(44px, 6vw, 72px); }
.jobs__frame { margin: 0; }
.jobs__frame figcaption { margin-top: 18px; }
.jobs__fart { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* how it works */
.steps { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line-2); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 1px; background: var(--rust); }
.step__n { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--ember); }
.step h3 { margin: 14px 0 0; font-weight: 700; font-stretch: 90%; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.step p { margin: 10px 0 0; color: var(--muted); max-width: 30ch; }

/* request */
.request { background: radial-gradient(50% 60% at 12% 18%, rgba(176, 80, 16, 0.1), transparent 70%), var(--bg); }
.request__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.request__intro { display: grid; gap: 18px; align-content: start; }
.request__alt { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 12px; }
.request__mail { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.request__mail:hover { color: var(--bone); border-color: var(--ember); }

.form { display: grid; gap: 22px; padding: clamp(24px, 3vw, 44px); border: 1px solid var(--line); background: rgba(14, 14, 16, 0.75); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; }
.form label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.form label i { font-style: normal; color: var(--dim); letter-spacing: 0.06em; text-transform: none; margin-left: 6px; }
.form input, .form textarea {
  width: 100%; min-width: 0; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: transparent;
  font-size: 17px; transition: border-color .3s; appearance: none; -webkit-appearance: none;
}
.form input[type="date"] { color-scheme: dark; }
.form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.form input[type="number"]::-webkit-inner-spin-button, .form input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--ember); }
.form .is-invalid { border-bottom-color: #ff5a4d; }
.form ::placeholder { color: var(--dim); }
.form button[disabled] { opacity: 0.6; cursor: progress; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: -8px 0 0; min-height: 1.4em; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.form__note { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line-2); }
.form__note strong { font-weight: 700; }
.form__note span { color: var(--muted); }
.form__note--ok { border-color: rgba(230, 113, 35, 0.6); }
.form__note--fallback { border-color: rgba(230, 113, 35, 0.6); }
.form__note-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.form { position: relative; }

/* footer */
.footer { padding: clamp(56px, 8vh, 96px) var(--pad) 34px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 20px 40px; align-items: center; }
.footer__brand img { width: clamp(88px, 8vw, 116px); height: auto; }
.footer__brand { grid-row: 1 / span 2; }
.footer__line { margin: 0; font-weight: 700; font-stretch: 90%; font-size: clamp(18px, 1.6vw, 22px); }
.footer__line span { display: block; margin-top: 4px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.footer__mail { justify-self: end; font-family: var(--mono); font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.footer__mail:hover { color: var(--bone); border-color: var(--ember); }
.footer__legal { grid-column: 2 / -1; margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--dim); }

/* WhatsApp button for small screens */
.fab { display: none; }

/* responsive */
@media (max-width: 1100px) {
  .jobs--pinned .jobs__inner { grid-template-columns: 1fr; gap: 18px; }
  .jobs--pinned .jobs__art { width: min(100%, calc((100svh - 300px) * 2.41)); margin: 0 auto; }
  .jobs--pinned .jobs__steps { margin-bottom: 18px; }
  .jobs--pinned .job__word { font-size: clamp(36px, 5.6vw, 56px); }
  .jobs--pinned .job__line { margin-top: 10px; }
}
@media (min-width: 761px) {
  .jobs__frames { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .nav__links { display: none; }
  .request__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .nav__name { font-size: 17px; }
  .hero__inner { padding-bottom: 64px; }
  .hero__title { font-size: clamp(38px, 11.4vw, 72px); }
  .hero__cta .btn { flex: 1 1 auto; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 18px; }
  .footer__brand { grid-row: auto; }
  .footer__mail { justify-self: start; }
  .footer__legal { grid-column: auto; }
  .fab {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 75;
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
    background: var(--rust); color: var(--bone); box-shadow: 0 10px 30px -8px rgba(176, 80, 16, 0.75);
    transform: translateY(160%); transition: transform .6s var(--ease);
  }
  .fab.is-visible { transform: translateY(0); }
  .fab .wa { width: 26px; height: 26px; }
}
@media (max-width: 420px) {
  .nav__cta-more { display: none; }
}
@media (max-width: 380px) {
  .nav .btn--small { padding: 10px 14px; letter-spacing: 0.08em; }
}

/* reduced motion: calm and complete */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn::before, .btn svg, .fab { transition: none; }
}
