/* YardFlow marketing site — shared styles.
   Base/desktop rules here; responsive @media breakpoints are appended in the
   "Mobile" section at the bottom. Design tokens mirror the original inline palette. */

/* Self-hosted fonts (latin subset, variable). No third-party font requests. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/archivo.woff2) format('woff2');
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/archivo-black.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono.woff2) format('woff2');
}

:root {
  --bg:#0E1620;
  --panel:#141E2A;
  --panel-2:#10171F;
  --panel-3:#1B2735;
  --border:#2A3645;
  --ink:#F4EFE6;
  --muted:#A6B2C2;
  --muted-2:#C9D2DD;
  --muted-3:#8B98A8;
  --accent:#F39B1A;
  --accent-hi:#FFB23A;
  --accent-lo:#C8740A;
  --sans:'Archivo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --black:'Archivo Black', var(--sans);
  --mono:'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page { background: var(--bg); color: var(--ink); min-height: 100vh; overflow-x: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
/* Inline text links carry an underline (not colour alone — WCAG 1.4.1) */
p a { text-decoration: underline; }
p a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: var(--bg); }

img { max-width: 100%; }

input, textarea, button, select { font-family: var(--sans); }

/* Visible keyboard focus everywhere (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }
.wrap-prose { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.section { padding: 92px 0 20px; }
.section-tight { padding: 72px 0 20px; }

/* ── Typography ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.h1 {
  font-family: var(--black);
  font-size: clamp(26px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.h1-46 { font-size: clamp(31px, 6vw, 46px); }
.h1-40 { font-size: clamp(28px, 5.5vw, 40px); }
.h2 {
  font-family: var(--black);
  font-size: clamp(27px, 4.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.h2-sm { font-size: clamp(24px, 4vw, 32px); line-height: 1.12; }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.lead-lg { font-size: 19px; line-height: 1.6; color: var(--muted); }
.muted { color: var(--muted); }
.mono-note { font-family: var(--mono); font-size: 12px; color: var(--muted-3); letter-spacing: 0.03em; }

/* ── Header / nav ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,22,32,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-static { position: static; background: var(--bg); }
.site-header .wrap {
  padding-top: 16px; padding-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo img { height: 40px; display: block; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav .nav-link { color: var(--muted-2); font-size: 15px; font-weight: 500; }
.nav .tel { font-family: var(--mono); color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }
.back-link { color: var(--muted-2); font-size: 15px; font-weight: 500; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--black);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 16px 28px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-sm { font-size: 13px; letter-spacing: 0.03em; padding: 12px 20px; border-radius: 8px; }
.btn-primary { color: var(--bg); background: var(--accent); box-shadow: 0 4px 0 var(--accent-lo); }
.btn-primary:hover { color: var(--bg); background: var(--accent-hi); }
.btn-primary.btn-sm { box-shadow: 0 3px 0 var(--accent-lo); }
.btn-secondary { color: var(--ink); border: 1px solid var(--border); background: transparent; }
.btn-secondary:hover { color: var(--ink); border-color: var(--muted-3); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding-top: 76px; text-align: center; }
.hero .h1 { max-width: 900px; margin: 0 auto; }
.hero .lead-lg { margin: 24px auto 0; max-width: 640px; }
.hero-eyebrow { text-align: center; margin-bottom: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }
.hero-sub { margin-top: 18px; }

/* Browser-frame shell for screenshots / placeholders */
.frame-shell { position: relative; margin: 56px auto 0; max-width: 1060px; }
.frame-deco {
  position: absolute; inset: auto -20px -20px auto; width: 160px; height: 160px;
  background-image: repeating-linear-gradient(45deg, #243142 0, #243142 12px, transparent 12px, transparent 24px);
  border-radius: 14px; z-index: 0;
}
.frame {
  position: relative; z-index: 1; border: 1px solid var(--border); border-radius: 16px;
  background: var(--panel); padding: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 6px 6px 12px; }
.frame-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.frame-dot.on { background: var(--accent-lo); }
.frame-title { font-family: var(--mono); font-size: 11px; color: var(--muted-3); margin-left: 10px; }
.frame-body { border-radius: 10px; overflow: hidden; background: var(--bg); }
.frame-caption {
  font-family: var(--mono); font-size: 12px; color: var(--muted-3); letter-spacing: 0.03em;
  text-align: center; padding: 12px 8px 4px;
}

/* Screenshot stack (real demo screens under "How it works").
   Centred column: New Job is a narrow form crop; the tables are shown wider so
   their text stays legible. */
.shots-stack { display: grid; gap: 26px; justify-items: center; margin-top: 52px; }
.shot-fig {
  margin: 0; width: 100%; max-width: 1000px;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--panel);
}
.shot-fig.shot-narrow { max-width: 500px; }
.shot-fig img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--border); }
.shot-fig figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.02em;
  padding: 11px 14px;
}

/* ── Trust strip ────────────────────────────────────────── */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 72px; }
.trust .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; gap: 14px 36px; align-items: center; justify-content: space-between; }
.trust span { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--muted-3); text-transform: uppercase; }

/* ── Generic panel / section intro ──────────────────────── */
.panel { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }
.section-intro { max-width: 680px; margin-bottom: 44px; }
.section-intro .lead { margin-top: 16px; }

/* ── "Local & proven" ───────────────────────────────────── */
.proven { padding: 44px 46px 48px; }

/* ── Workflow steps (How it works) ──────────────────────── */
.steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.steps-line { position: absolute; top: 24px; left: 4%; right: 4%; height: 2px; background: var(--border); }
.step { position: relative; }
.step-num {
  width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--black); font-size: 20px; position: relative; z-index: 1;
  box-shadow: 0 3px 0 var(--accent-lo); margin: 0 auto;
}
.step h3 { font-family: var(--sans); font-weight: 800; font-size: 18px; color: var(--ink); margin: 24px 0 8px; text-align: center; }
.step p { font-size: 14px; line-height: 1.55; color: var(--muted-3); text-align: center; }

/* ── Pains grid ─────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pain { border-top: 2px solid var(--accent-lo); padding: 20px 4px 0; }
.pain h3 { font-family: var(--sans); font-weight: 800; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.pain p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ── Outcome pillars ────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pillar { background: var(--bg); padding: 32px 28px 36px; }
.pillar .mark { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); box-shadow: 0 2px 0 var(--accent-lo); margin-bottom: 18px; }
.pillar h3 { font-family: var(--sans); font-weight: 800; font-size: 21px; color: var(--ink); margin-bottom: 10px; }
.pillar p { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.supporting { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; margin-top: 26px; }
.supporting li { display: flex; gap: 11px; font-size: 15px; line-height: 1.5; color: var(--muted-2); }
.supporting li::before { content: "✓"; color: var(--accent); font-family: var(--black); flex-shrink: 0; }

/* ── Pricing ────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; }
.price-card { border: 1px solid var(--accent); border-radius: 16px; background: var(--panel-3); padding: 38px 40px; }
.price-card .amount { font-family: var(--black); font-size: 46px; color: var(--ink); line-height: 1; }
.price-card .per { font-family: var(--mono); font-size: 14px; color: var(--muted-3); }
.price-card .exgst { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bg); background: var(--accent); padding: 3px 8px; border-radius: 5px; margin-left: 8px; vertical-align: middle; }
.price-card ul { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.price-card li { display: flex; gap: 11px; font-size: 15.5px; line-height: 1.5; color: var(--muted-2); }
.price-card li::before { content: "✓"; color: var(--accent); font-family: var(--black); flex-shrink: 0; }
.price-side { display: flex; flex-direction: column; gap: 14px; }
.price-note { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 22px 24px; }
.price-note h3 { font-family: var(--sans); font-weight: 800; font-size: 16px; color: var(--ink); margin-bottom: 7px; }
.price-note p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.getting-started { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 34px; }
.gs-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 24px; counter-reset: gs; }
.gs-step { counter-increment: gs; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 20px 18px; }
.gs-step::before { content: counter(gs); display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--panel-3); color: var(--accent); font-family: var(--black); font-size: 15px; margin-bottom: 12px; }
.gs-step p { font-size: 14px; line-height: 1.5; color: var(--muted-2); }

/* ── Video section (demo-video) ─────────────────────────── */
#demo-video[hidden], .watch-link[hidden] { display: none !important; }
.video-shell { position: relative; max-width: 900px; margin: 40px auto 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.video-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer; display: block; background-size: cover; background-position: center; }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--accent); box-shadow: 0 6px 0 var(--accent-lo); display: flex; align-items: center; justify-content: center; }
.video-facade .play::after { content: ""; border-left: 22px solid var(--bg); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 5px; }
.video-shell iframe, .video-shell video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Demo / contact split ───────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split > *, .pillar, .price-card, .price-side, .form, .contact-card, .contact-card > div { min-width: 0; }
.contact-card a.email, .form-fineprint a { overflow-wrap: anywhere; }
.contact-cards { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.contact-card { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.contact-card .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--black); color: var(--accent); font-size: 18px; flex-shrink: 0; }
.contact-card .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-3); margin-bottom: 4px; }
.contact-card a { font-family: var(--black); font-size: 20px; color: var(--ink); }
.contact-card a.email { font-family: var(--sans); font-weight: 700; font-size: 16px; }

/* ── Forms ──────────────────────────────────────────────── */
.form { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); padding: 32px; }
.form h2 { font-family: var(--black); font-size: 20px; color: var(--ink); margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-top: 16px; }
.field:first-child, .form-row .field { margin-top: 0; }
.form-row + .field { margin-top: 16px; }
.field > span { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field .req { color: var(--accent); }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; color: var(--ink); font-size: 15px; outline: none; min-height: 46px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.btn-block { width: 100%; margin-top: 22px; padding: 16px; border-radius: 9px; }
.form-fineprint { font-size: 12.5px; color: var(--muted-3); text-align: center; margin-top: 14px; }
.form-note { margin-top: 14px; padding: 13px 15px; border-radius: 8px; font-size: 14.5px; line-height: 1.5; display: none; }
.form-note.show { display: block; }
.form-note.ok { background: rgba(243,155,26,0.12); border: 1px solid var(--accent); color: var(--ink); }
.form-note.err { background: rgba(200,116,10,0.12); border: 1px solid var(--accent-lo); color: var(--ink); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-rule { height: 8px; background-image: repeating-linear-gradient(45deg, var(--accent) 0, var(--accent) 18px, var(--bg) 18px, var(--bg) 36px); }
.site-footer .wrap { padding-top: 44px; padding-bottom: 44px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand img { height: 32px; display: block; }
.footer-tag { font-family: var(--mono); font-size: 12px; color: var(--muted-3); letter-spacing: 0.03em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: var(--muted-2); font-size: 14px; }
.footer-position { font-family: var(--mono); font-size: 12px; color: var(--muted-3); letter-spacing: 0.04em; }

.top-rule { height: 8px; background-image: repeating-linear-gradient(45deg, var(--accent) 0, var(--accent) 18px, var(--bg) 18px, var(--bg) 36px); }

/* ════════════════════════════════════════════════════════
   Mobile — responsive breakpoints (~900px tablet, ~600px phone)
   ════════════════════════════════════════════════════════ */

/* Tablet and below */
@media (max-width: 900px) {
  .section { padding: 64px 0 16px; }
  .section-tight { padding: 52px 0 16px; }
  .hero { padding-top: 56px; }

  /* Multi-column grids collapse */
  .pillars { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; gap: 16px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .gs-steps { grid-template-columns: 1fr 1fr 1fr; }

  /* Workflow steps stack into a left-aligned list (drop the connector) */
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps-line { display: none; }
  .step { display: grid; grid-template-columns: 50px 1fr; column-gap: 16px; align-items: center; }
  .step-num { margin: 0; }
  .step h3 { grid-column: 2; margin: 0; text-align: left; }
  .step p { grid-column: 2; text-align: left; margin-top: 4px; }

  .proven { padding: 32px 28px 36px; }
  .price-card { padding: 30px 26px; }
}

/* Phone */
@media (max-width: 600px) {
  .wrap, .wrap-narrow, .wrap-prose { padding-left: 20px; padding-right: 20px; }
  .section { padding: 48px 0 12px; }
  .section-tight { padding: 40px 0 12px; }
  .hero { padding-top: 40px; }

  /* Headlines wrap naturally (avoid balance overflow at narrow widths) */
  .h1, .h2 { text-wrap: normal; }

  /* Header collapses to logo + "Try the demo" CTA */
  .nav .nav-link, .nav .tel { display: none; }
  .nav { gap: 0; }
  .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }

  /* Everything to a single column */
  .grid-4, .gs-steps, .form-row, .supporting { grid-template-columns: 1fr; }
  .supporting { gap: 10px; }

  /* Full-width actions + buttons, comfortable tap targets */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }

  .trust .wrap { justify-content: flex-start; gap: 10px 22px; }
  .price-card .amount { font-size: 38px; }

  /* Footer stacks */
  .site-header .wrap { gap: 14px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
