/* ==========================================================================
   PLAINSMAN.AI — landing page styles
   Tokens mirror brand/brand-guidelines.html so the two stay in visual sync.
   ========================================================================== */

:root {
  --rust:      #C45828;
  --rust-lt:   #E06535;
  --rust-dk:   #8C3B18;
  --blue:      #4D86B8;
  --blue-lt:   #62A0D8;
  --blue-dk:   #2D5E8A;
  --charcoal:  #232321;
  --charcoal2: #1E1E1C;
  --stone:     #857E78;
  --stone-lt:  #B0A9A2;
  --cream:     #F5F4F2;
  --cream-dk:  #ECEAE6;
  --white:     #FFFFFF;

  --body: 'Barlow', 'Arial', sans-serif;
  --page-max: 1180px;
  --section-gap: 84px;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --ease: cubic-bezier(.2, .6, .2, 1);
  --shadow-sm: 0 2px 8px rgba(35, 35, 33, .06);
  --shadow:    0 18px 40px -18px rgba(35, 35, 33, .22);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 28px); }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--stone);
}

.section-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 8px 0 14px;
  color: var(--charcoal);
}

.section-lede {
  font-size: 17px;
  color: #4A4845;
  max-width: 680px;
}
.section-lede abbr,
p abbr {
  text-decoration: underline dotted rgba(35, 35, 33, .35);
  text-underline-offset: 3px;
  cursor: help;
  font-weight: 600;
  color: var(--charcoal);
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--blue-lt); outline-offset: 3px; }
.btn-primary {
  background: var(--charcoal);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--rust-dk); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { color: var(--charcoal); border: 1.5px solid rgba(35, 35, 33, .18); }
.btn-ghost:hover { border-color: var(--charcoal); background: rgba(35, 35, 33, .04); }
.btn-arrow::after { content: '\2192'; font-size: 18px; line-height: 1; }

/* ---------- Nav ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 244, 242, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav.is-scrolled { border-bottom-color: #DDD9D4; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(20px, 4vw, 28px);
  max-width: var(--page-max);
  margin: 0 auto;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  transition: opacity .2s var(--ease);
}
.nav-brand:hover { opacity: .88; }
/* Full transparent lockup — shared by header and footer */
.site-lockup {
  height: 68px;
  width: auto;
  display: block;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--charcoal);
  padding: 6px 2px; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--rust); transition: right .25s var(--ease);
}
.nav-links a:hover::after { right: 0; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(36px, 6vw, 80px) 0 clamp(20px, 3vw, 44px);
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute; inset: auto; pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.hero::before {
  width: 520px; height: 520px; top: -180px; left: -160px;
  background: radial-gradient(circle, rgba(196,88,40,.45), transparent 60%);
}
.hero::after {
  width: 620px; height: 620px; bottom: -260px; right: -200px;
  background: radial-gradient(circle, rgba(77,134,184,.40), transparent 60%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 48px);
  align-items: start;
}
.hero-copy h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin: 10px 0 14px;
}
.hero-copy h1 .grad {
  background: linear-gradient(90deg, var(--rust) 0%, var(--rust-lt) 40%, var(--blue) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p.lede {
  font-size: 19px; color: #4A4845; max-width: 540px; margin-bottom: 22px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
/* Full content width under the two-column hero (not trapped in the copy column) */
.hero-meta-row {
  width: 100%;
  margin-top: 28px;
  padding-top: 4px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(14px, 2.2vw, 28px);
  row-gap: 0;
  align-items: start;
  color: var(--stone);
  font-size: clamp(11.5px, 1.05vw, 13px);
  letter-spacing: .25px;
}
.hero-meta > span { min-width: 0; }
.hero-meta strong { color: var(--charcoal); font-weight: 700; }

@media (max-width: 820px) {
  .hero-meta {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Hero terminal (right column) --------------------------------
   Stylized IDE-looking panel that types out a Plainsman engagement. It is
   nudged down a bit on desktop so the top of the window sits roughly at the
   baseline of the headline (looks more composed next to a tall h1). */
.hero-terminal {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-top: clamp(32px, 5vw, 72px);
  background: #1C1B1A;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2A2927;
  box-shadow:
    0 24px 60px -24px rgba(0,0,0,.35),
    0 4px 18px -6px rgba(0,0,0,.25);
}
.term-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: #25231F;
  border-bottom: 1px solid #2A2927;
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.term-dot-red    { background: #E66B5B; }
.term-dot-yellow { background: #E6B94F; }
.term-dot-green  { background: #6FC36A; }
.term-title {
  margin-left: 10px;
  color: #A8A49D;
  font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .3px;
}
.term-body {
  margin: 0;
  padding: 18px 18px 22px;
  font: 500 13px/1.65 "JetBrains Mono", ui-monospace, monospace;
  color: #E8E6E2;
  overflow: hidden;
}
.term-body .tl {
  display: block;
  white-space: pre;
  overflow: hidden;
  opacity: 0;
  animation: termType .5s cubic-bezier(.4,0,.2,1) forwards;
}
.term-body .tl:nth-child(1)  { animation-delay: .25s; }
.term-body .tl:nth-child(2)  { animation-delay: .65s; }
.term-body .tl:nth-child(3)  { animation-delay: .95s; }
.term-body .tl:nth-child(4)  { animation-delay: 1.25s; }
.term-body .tl:nth-child(5)  { animation-delay: 1.55s; }
.term-body .tl:nth-child(6)  { animation-delay: 1.85s; }
.term-body .tl:nth-child(7)  { animation-delay: 2.20s; }
.term-body .tl:nth-child(8)  { animation-delay: 2.55s; }
.term-body .tl:nth-child(9)  { animation-delay: 2.90s; }
.term-body .tl:nth-child(10) { animation-delay: 3.25s; }
.term-body .tl:nth-child(11) { animation-delay: 3.60s; }
@keyframes termType {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
.term-kw   { color: #C76FBE; }
.term-str  { color: #E6B94F; }
.term-fn   { color: #7AB4E0; }
.term-var  { color: #E8E6E2; }
.term-com  { color: #8A867F; font-style: italic; }
.term-out  { color: #A8E0B4; }
.term-caret {
  display: inline-block; width: 8px; height: 15px;
  background: #E8E6E2; vertical-align: -2px; margin-left: 2px;
  opacity: 0;
  animation: termBlink 1s steps(2, start) 3.9s infinite;
  animation-fill-mode: both;
}
@keyframes termBlink {
  0%   { opacity: 0; }
  1%   { opacity: 1; }
  50%  { opacity: 1; }
  51%  { opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 960px) {
  .hero-terminal { max-width: none; margin-left: 0; margin-top: 0; }
}

/* ---------- Marquee / Logo row (placeholder trust row) ------------------- */
.trust {
  padding: 20px 0 0;
  border-top: 1px solid #E3DED8;
}
.trust-label {
  text-align: center; color: var(--stone); font-size: 12px;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px;
}
.trust-bridge {
  max-width: 520px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: #4A4845;
}
.trust-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  align-items: center; opacity: .75;
}
.trust-chip {
  border: 1px solid #E3DED8; border-radius: 10px; padding: 12px 14px;
  text-align: center; color: var(--charcoal); font-weight: 600; letter-spacing: .5px;
  background: var(--white);
}
@media (max-width: 760px) { .trust-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Section layout ----------------------------------------------- */
section.block { padding: var(--section-gap) 0; }
/* First content section sits right under the hero + trust — avoid double “hero” padding */
section.block#services {
  padding-top: clamp(28px, 4vw, 56px);
}
section.block + section.block { border-top: 1px solid #E3DED8; }

/* ---------- Services grid ------------------------------------------------- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 26px;
}
.service {
  background: var(--white);
  border: 1px solid #E3DED8;
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  scroll-margin-top: 88px;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D1CBC3; }
.service-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rust) 0%, var(--blue) 100%);
  color: var(--white);
  margin-bottom: 14px;
  font-weight: 800; font-size: 18px;
}
.service h3 {
  font-size: 20px; font-weight: 800; color: var(--charcoal);
  margin-bottom: 8px; letter-spacing: -.01em;
}
.service p { font-size: 15px; color: #4A4845; }
.service ul {
  list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 8px;
}
.service ul li {
  font-size: 14px; color: #4A4845; padding-left: 18px; position: relative;
}
.service ul li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 2px;
  background: var(--rust);
}

@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Process ------------------------------------------------------- */
.process {
  margin-top: 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 22px 20px; border-radius: var(--radius);
  background: var(--cream-dk); border: 1px solid #E3DED8;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--rust);
  display: block; margin-bottom: 8px;
}
.step h4 { font-size: 17px; font-weight: 800; margin-bottom: 6px; color: var(--charcoal); }
.step p  { font-size: 14px; color: #4A4845; }

@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .process { grid-template-columns: 1fr; } }

/* ---------- Promise / guarantees ---------------------------------------- */
.promise {
  margin-top: 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.promise-card {
  padding: 22px; border-radius: var(--radius);
  background: var(--charcoal); color: var(--cream);
  border: 1px solid #2b2b28;
}
.promise-card h4 { font-size: 16px; font-weight: 800; color: var(--white); margin-bottom: 8px; letter-spacing: .5px; text-transform: uppercase; }
.promise-card p { font-size: 14px; color: var(--stone-lt); }
.promise-card .tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--rust-lt); margin-bottom: 14px;
}

@media (max-width: 900px) { .promise { grid-template-columns: 1fr; } }

/* ---------- FAQ ----------------------------------------------------------- */
.faq-list {
  margin-top: 32px;
  border-top: 1px solid #E3DED8;
}
.faq-item {
  border-bottom: 1px solid #E3DED8;
}
.faq-item summary.faq-q {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  gap: 16px;
  user-select: none;
  letter-spacing: -.01em;
}
.faq-item summary.faq-q::-webkit-details-marker { display: none; }
.faq-item summary.faq-q:focus-visible { outline: 3px solid var(--blue-lt); outline-offset: 2px; border-radius: 2px; }
.faq-item summary.faq-q::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--stone);
  flex-shrink: 0;
  transition: transform .25s var(--ease), color .2s var(--ease);
  line-height: 1;
}
.faq-item[open] summary.faq-q::after {
  transform: rotate(45deg);
  color: var(--rust);
}
.faq-item .faq-a {
  padding: 0 0 22px;
  max-width: 800px;
}
.faq-item .faq-a p {
  font-size: 15.5px;
  color: #4A4845;
  line-height: 1.7;
}
.faq-item .faq-a p + p { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .faq-item summary.faq-q::after { transition: none; }
}

/* ---------- CTA ---------------------------------------------------------- */
.cta {
  position: relative;
  margin: 0 clamp(16px, 4vw, 28px);
  padding: clamp(32px, 5vw, 64px) clamp(22px, 4vw, 48px);
  background: linear-gradient(120deg, var(--charcoal) 0%, #2c2c29 60%, var(--blue-dk) 140%);
  border-radius: var(--radius-lg);
  color: var(--cream);
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(196,88,40,.30), transparent 55%),
    radial-gradient(circle at 90% 85%, rgba(77,134,184,.35), transparent 55%);
  pointer-events: none;
}
.cta h2 {
  position: relative;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; letter-spacing: -.01em; margin-bottom: 10px; color: var(--white);
}
.cta p { position: relative; color: var(--stone-lt); max-width: 640px; margin: 0 auto 20px; font-size: 17px; }
.cta .btn-primary {
  position: relative;
  background: var(--cream); color: var(--charcoal);
}
.cta .btn-primary:hover { background: var(--white); color: var(--rust-dk); }

/* ---------- Contact form ------------------------------------------------- */
.contact-form {
  margin-top: 28px;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(245,244,242,.75);
}
.form-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: .7;
}
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--white);
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245,244,242,.38);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.13);
}
.form-honeypot { display: none !important; }
.form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.form-status {
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}
.form-status.is-success { color: #7dd4a0; }
.form-status.is-error   { color: #f5a28a; }
#cf-submit:disabled { opacity: .6; cursor: not-allowed; }
.form-legal {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--stone);
  flex: 1 1 100%;
}
.form-legal a { color: #4A4845; text-decoration: underline; text-underline-offset: 2px; }
.form-legal a:hover { color: var(--rust-dk); }
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .form-footer { flex-wrap: wrap; }
}

/* ---------- Footer ------------------------------------------------------- */
footer {
  padding: 40px 0 28px;
  border-top: 1px solid #E3DED8;
  margin-top: var(--section-gap);
  color: var(--stone);
  font-size: 13px;
}
footer .wrap {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr; gap: 28px;
}
footer h5 {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--charcoal); margin-bottom: 14px;
}
footer a { color: #4A4845; display: block; margin-bottom: 8px; }
footer a:hover { color: var(--rust-dk); }
footer .footer-brand {
  display: inline-block;
  margin-bottom: 14px;
  transition: opacity .2s var(--ease);
}
footer .footer-brand:hover { opacity: .88; }
footer .legal {
  grid-column: 1 / -1; padding-top: 20px; margin-top: 14px;
  border-top: 1px solid #E3DED8;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}

@media (max-width: 760px) {
  footer .wrap { grid-template-columns: 1fr 1fr; }
}

/* ---------- Legal pages -------------------------------------------------- */
.legal-page {
  padding-top: 48px;
  padding-bottom: 24px;
}
.legal-page .section-title {
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 14px;
  color: var(--stone);
  margin-bottom: 32px;
}
.legal-prose {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.75;
  color: #4A4845;
}
.legal-prose > p {
  margin-bottom: 16px;
}
.legal-prose h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--charcoal);
  margin: 36px 0 12px;
  line-height: 1.25;
}
.legal-prose h2:first-child {
  margin-top: 0;
}
.legal-prose h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 24px 0 8px;
}
.legal-prose ul,
.legal-prose ol {
  margin: 0 0 16px 1.25em;
  padding: 0;
}
.legal-prose li {
  margin-bottom: 8px;
}
.legal-prose a {
  color: var(--rust-dk);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-prose a:hover {
  color: var(--rust);
}
.legal-prose strong {
  color: var(--charcoal);
  font-weight: 700;
}

/* ---------- Reveal animations (script-driven) ---------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service { transition: none; }
  /* Hero terminal: reveal every line at once, kill the typing + caret blink. */
  .term-body .tl {
    animation: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
  .term-caret { animation: none !important; opacity: 1 !important; }
}
