/* 27 Dots Agency — black, white and electric blue #0033FF. No web fonts, no trackers. */
:root {
  --blue: #0033ff;
  --blue-deep: #0029cc;
  --ink: #0a0a0a;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --paper: #ffffff;
  --soft: #f4f5f7;
  --radius: 18px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* header */
.top { background: var(--blue); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand img { width: 132px; }
.nav { display: flex; gap: 22px; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; opacity: .92; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; color: #fff; }

/* hero */
.hero { background: var(--blue); color: #fff; padding: 72px 0 96px; overflow: hidden; position: relative; }
.hero-field { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,.35) 20%, #000 65%); mask-image: linear-gradient(100deg, rgba(0,0,0,.35) 20%, #000 65%); }
.hero-inner { position: relative; z-index: 1; }
.hero .eyebrow { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .85; margin: 0 0 18px; }
.hero h1 { font-size: clamp(40px, 7.2vw, 92px); line-height: .98; letter-spacing: -.035em; margin: 0 0 26px; font-weight: 800; max-width: 13ch; }
.hero p.lead { font-size: clamp(18px, 2.1vw, 22px); max-width: 40ch; margin: 0 0 34px; opacity: .95; }
.dots { display: flex; gap: 10px; margin-top: 56px; flex-wrap: wrap; }
.dots span { width: 14px; height: 14px; border-radius: 50%; background: #fff; opacity: .9; }
.dots span:nth-child(3n) { opacity: .45; }
.dots span:nth-child(5n) { background: var(--ink); opacity: 1; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 16px; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { color: #fff; border-color: #fff; }

/* sections */
section.block { padding: 88px 0; }
section.block.alt { background: var(--soft); }
section.block.dark { background: var(--ink); color: #fff; }
.kicker { color: var(--blue); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.dark .kicker { color: #8fa6ff; }
h2.title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 800; max-width: 20ch; }
.intro { font-size: 19px; color: var(--ink-2); max-width: 58ch; margin: 0 0 44px; }
.dark .intro { color: #c9c9c9; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.card .num { font-weight: 800; color: var(--blue); font-size: 14px; letter-spacing: .1em; }
.card h3 { font-size: 24px; letter-spacing: -.015em; margin: 8px 0 10px; line-height: 1.2; }
.card p { margin: 0 0 14px; color: var(--ink-2); }
.card ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.card li { margin: 4px 0; }

.who { display: flex; flex-wrap: wrap; gap: 10px; }
.who span { border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 18px; font-weight: 600; background: #fff; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { border-top: 3px solid var(--blue); padding-top: 18px; }
.step h3 { margin: 0 0 8px; font-size: 20px; }
.step h3::before { counter-increment: step; content: "0" counter(step) "  "; color: #8fa6ff; }
.step p { margin: 0; color: #c9c9c9; }

.cta { background: var(--blue); color: #fff; border-radius: 28px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.cta h2 { margin: 0; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.03em; line-height: 1.05; max-width: 18ch; }

/* work / cases */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-logo { height: 168px; display: flex; align-items: center; justify-content: center; padding: 28px 36px; }
.case-logo img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.case-logo img[src*="freight-union"] { max-height: 104px; }
.case-logo img[src*="pegasi"] { max-height: 112px; }
.case-logo img[src*="titan"] { max-width: 210px; }
.case-logo img[src*="fleet-pro"] { max-width: 230px; }
.case-logo img[src*="htc"] { max-width: 190px; }
.case-logo { background: #000; }
.case-body { padding: 26px 28px 30px; }
.case-tag { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.case h3 { font-size: 24px; letter-spacing: -.015em; margin: 0 0 8px; line-height: 1.2; }
.case p { margin: 0 0 14px; color: var(--ink-2); }
.case ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.case li { margin: 5px 0; }
a.case-you { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; justify-content: flex-end; min-height: 280px; }
a.case-you .case-tag, a.case-you p { color: rgba(255,255,255,.85); }
a.case-you h3 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.03em; }
a.case-you .btn { margin-top: 10px; }
a.case-you:hover { background: var(--blue-deep); color: #fff; }

/* hero intro */
.hero h1 span { display: inline-block; }
.js .rise, .js .rise-words span { opacity: 0; transform: translateY(26px); animation: rise .9s cubic-bezier(.2,.75,.2,1) forwards; animation-delay: calc(var(--d) * 85ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .dots span { transform: scale(0); animation: pop .5s cubic-bezier(.3,1.6,.5,1) forwards, blink 4.5s ease-in-out infinite; }
.js .dots span:nth-child(n) { animation-delay: calc(var(--i, 0) * 1ms), 2s; }
@keyframes pop { to { transform: scale(1); } }
@keyframes blink { 0%, 100% { filter: none; } 50% { filter: brightness(.7); } }

/* sections rise in on scroll */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.75,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .cases .reveal:nth-child(3n+2), .ai-cards .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .cases .reveal:nth-child(3n), .ai-cards .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(4), .ai-cards .reveal:nth-child(4), .steps .reveal:nth-child(4) { transition-delay: .24s; }

/* client logo strip */
.logo-strip { background: #000; padding: 30px 0; overflow: hidden; border-bottom: 1px solid #161616; }
.marquee { display: flex; width: max-content; }
.marquee-track { display: flex; align-items: center; gap: 84px; padding-right: 84px; animation: slide 32s linear infinite; }
.marquee-track img { height: 40px; width: auto; opacity: .9; }
.marquee-track img[src*="freight-union"], .marquee-track img[src*="pegasi"] { height: 58px; }
.marquee-track img[src*="htc"], .marquee-track img[src*="titan"] { height: 30px; }
.marquee-track img[src*="fleet-pro"] { height: 26px; }
.logo-strip:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-100%); } }

/* AI section */
section.ai { background: #000; color: #fff; padding: 100px 0 96px; overflow: hidden; }
.ai .kicker { color: #8fa6ff; }
.ai .intro { color: #bdbdc4; }
.ai-head { max-width: 760px; }
.ai-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin: 8px 0 56px; }
.vega { position: relative; max-width: 520px; justify-self: center; width: 100%; -webkit-mask-image: linear-gradient(#000 78%, transparent 99%); mask-image: linear-gradient(#000 78%, transparent 99%); }
.vega img { position: relative; z-index: 1; width: 100%; }
.vega-glow { position: absolute; inset: 12% 6% 0; background: radial-gradient(closest-side, rgba(0,51,255,.55), rgba(0,51,255,0)); filter: blur(10px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .75; } }
.vega-video { position: absolute; z-index: 2; left: 3.65%; top: -.49%; width: 88.08%; height: auto; aspect-ratio: 1; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.vega-video.on { opacity: 1; }
.chat { background: linear-gradient(180deg, #0d1222, #070910); border: 1px solid #1f2640; border-radius: 26px; padding: 18px; box-shadow: 0 30px 80px rgba(0,51,255,.18); }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; border-bottom: 1px solid #1c2236; }
.chat-top img { width: 36px; height: 36px; border-radius: 50%; }
.chat-top b { display: block; font-size: 15px; }
.chat-top small { display: block; color: #8d93a8; font-size: 12.5px; }
.live { margin-left: auto; font-size: 12px; color: #6be39a; display: flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ccf7a; box-shadow: 0 0 0 0 rgba(60,207,122,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(60,207,122,0); } 100% { box-shadow: 0 0 0 0 rgba(60,207,122,0); } }
.chat-body { display: flex; flex-direction: column; gap: 9px; padding: 16px 4px 6px; min-height: 392px; }
.msg { margin: 0; max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--blue); border-bottom-right-radius: 5px; }
.msg.file { font-weight: 600; }
.msg.ai { align-self: flex-start; background: #1a2033; color: #e8eaf2; border-bottom-left-radius: 5px; }
.msg.drv { align-self: flex-start; background: #2a2a2e; color: #e8e8ea; border-bottom-left-radius: 5px; }
.msg.drv b { display: block; font-size: 12px; color: #a6a6ad; margin-bottom: 2px; }
.js .chat .msg { display: none; }
.js .chat .msg.show { display: block; animation: msg .35s cubic-bezier(.2,.8,.2,1); }
@keyframes msg { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.typing { display: none; align-self: flex-start; gap: 5px; background: #1a2033; padding: 13px 16px; border-radius: 16px; margin: 0; }
.typing.show { display: flex; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #8d93a8; animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .5; } }
.chat-note { margin: 10px 6px 0; font-size: 12.5px; color: #7c8296; }
.ai-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ai-card { background: #0b0b0e; border: 1px solid #222228; border-radius: var(--radius); padding: 26px; transition: border-color .2s, transform .2s; }
.ai-card:hover { border-color: #3d5bff; transform: translateY(-3px); }
.ai-card img, .ai-icon { width: 56px; height: 56px; border-radius: 15px; margin-bottom: 16px; }
.ai-icon { display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.03em; }
.ai-card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.ai-card ul { margin: 0; padding-left: 18px; color: #bdbdc4; font-size: 15.5px; }
.ai-card li { margin: 5px 0; }
.ai-card p { color: rgba(255,255,255,.9); margin: 0 0 16px; font-size: 15.5px; }
a.ai-yours { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
a.ai-yours .ai-icon { background: #fff; color: var(--blue); }
a.ai-yours:hover { color: #fff; border-color: #fff; }
.card-ai { background: var(--blue); border-color: var(--blue); color: #fff; }
.card-ai .num { color: #fff; opacity: .8; }
.card-ai p, .card-ai ul { color: rgba(255,255,255,.92); }

/* lead form */
.form-block { background: var(--soft); }
.form-wrap { max-width: 820px; }
.form-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.form-side .intro { margin-bottom: 0; }
.lead-form { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.lead-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.field { display: grid; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field span, .needs legend { font-weight: 700; font-size: 15px; }
.field input, .field textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cfcfd4; border-radius: 12px; padding: 13px 14px; width: 100%; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,51,255,.18); }
.field input[aria-invalid] { border-color: #d12c1f; }
.field input::placeholder, .field textarea::placeholder { color: #9a9aa0; }
.needs { border: 0; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.needs legend { padding: 0; margin-bottom: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; border: 1.5px solid #cfcfd4; border-radius: 999px; padding: 8px 15px; font-size: 15px; font-weight: 600; background: #fff; transition: background .12s, border-color .12s, color .12s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.send-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.send-row .btn { border: 0; cursor: pointer; font-family: inherit; padding: 16px 34px; }
.send-row .btn:disabled { opacity: .6; cursor: wait; }
.fine { margin: 0; font-size: 14px; color: var(--muted); max-width: 36ch; }
.status { margin: 14px 0 0; font-weight: 600; min-height: 1em; }
.status:empty { display: none; }
.status.good { color: #157a3c; }
.status.bad { color: #c0261b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { color: var(--ink); }

/* page head for inner pages */
.page-head { background: var(--blue); color: #fff; padding: 56px 0 64px; }
.page-head h1 { font-size: clamp(36px, 6vw, 68px); letter-spacing: -.035em; line-height: 1; margin: 0 0 14px; font-weight: 800; }
.page-head p { margin: 0; opacity: .9; font-size: 18px; max-width: 56ch; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.contact-mail { font-size: clamp(24px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.02em; word-break: break-word; color: var(--ink); text-decoration: none; border-bottom: 4px solid var(--blue); }
.contact-mail:hover { color: var(--blue); }

/* legal */
.legal { padding: 56px 0 88px; }
.legal .doc { max-width: 760px; }
.legal h2 { font-size: 24px; letter-spacing: -.015em; margin: 44px 0 10px; line-height: 1.25; }
.legal h3 { font-size: 18px; margin: 26px 0 6px; }
.legal p, .legal li { color: var(--ink-2); }
.legal li { margin: 6px 0; }
.legal .updated { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.legal .note { background: var(--soft); border-left: 4px solid var(--blue); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 22px 0; }
.legal .note p { margin: 0; }
.legal ol.howto { padding-left: 22px; }
.legal ol.howto > li { margin: 10px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); }
.toc a:hover { border-color: var(--blue); color: var(--blue); }

/* footer */
.foot { background: var(--ink); color: #cfcfcf; padding: 56px 0 28px; font-size: 15px; }
.foot-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-mark { width: 120px; margin-bottom: 14px; }
.foot p { margin: 0; max-width: 40ch; }
.foot-links { display: grid; gap: 8px; align-content: start; }
.foot-links a { color: #fff; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; color: #fff; }
.foot-small { margin-top: 40px; padding-top: 20px; border-top: 1px solid #262626; color: #8a8a8a; font-size: 13px; }

@media (max-width: 1000px) {
  .cases, .ai-cards { grid-template-columns: 1fr 1fr; }
  .ai-stage { grid-template-columns: 1fr; }
  .vega { max-width: 440px; }
  .form-split { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  .cards, .contact-grid { grid-template-columns: 1fr; }
  section.ai { padding: 72px 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  section.block { padding: 64px 0; }
  .cta { padding: 36px 26px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 14px; }
  .nav a[href="/#how"], .nav a[href="/#services"] { display: none; }
  .brand img { width: 108px; }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .cases, .lead-form .fields, .ai-cards { grid-template-columns: 1fr; }
  .chat-body { min-height: 430px; }
  .msg { max-width: 90%; }
  .marquee-track { gap: 56px; padding-right: 56px; }
  .case-logo { height: 140px; }
  .lead-form { padding: 22px 18px; border-radius: 20px; }
  .send-row .btn { width: 100%; justify-content: center; }
  .hero { padding: 52px 0 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip span { transition: none; }
  .js .rise, .js .rise-words span, .js .dots span { animation: none; opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .vega-glow, .live::before, .typing span { animation: none; }
}
