/* Wen Automation — shared stylesheet */
:root {
  --navy-950: #070e18;
  --navy-900: #0b1622;
  --navy-800: #122233;
  --navy-700: #1b3047;
  --slate-600: #475569;
  --slate-500: #5b6b80;
  --line-dark: rgba(148, 178, 214, 0.14);
  --line-light: #dfe5ec;
  --paper: #f5f7fa;
  --white: #ffffff;
  --ink: #0f1b2a;
  --ink-soft: #3d4b5c;
  --on-dark: #e8eef5;
  --on-dark-soft: #a9b7c8;
  --accent: #f5a524;        /* safety amber: on dark backgrounds / fills */
  --accent-hover: #ffb84a;
  --accent-ink: #9a5b00;    /* amber for text on light backgrounds (AA) */

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-4: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --step-5: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 42, 0.06), 0 8px 24px rgba(15, 27, 42, 0.06);
  --shadow-lg: 0 2px 4px rgba(15, 27, 42, 0.08), 0 18px 40px rgba(15, 27, 42, 0.14);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.section--light :focus-visible, .section--paper :focus-visible { outline-color: var(--navy-700); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--navy-950); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 14, 24, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); flex-shrink: 0; }
.brand img { width: auto; height: 40px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-name span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav ul { list-style: none; display: flex; gap: 2px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--on-dark-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { margin-left: 12px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  background: transparent; color: var(--white); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
  transition: transform .2s, background-color .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid var(--line-dark);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav ul { flex-direction: column; }
  .js .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-dark); border-radius: 0; font-size: 1rem; }
  .js .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
  .js .nav .btn { display: flex; margin: 16px 0 0; justify-content: center; border-bottom: 0; padding: 14px 16px; border-radius: var(--radius-sm); }
  /* no-JS fallback: let links wrap below brand */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; }
  html:not(.js) .nav ul { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: 0.975rem; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--navy-950); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: rgba(232, 238, 245, 0.35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); }
.btn--sm { padding: 9px 16px; font-size: 0.925rem; }
.nav .btn--primary, .nav .btn--primary:hover { color: var(--navy-950); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(245, 165, 36, 0.10), transparent 60%),
              radial-gradient(900px 500px at 0% 110%, rgba(56, 120, 200, 0.18), transparent 60%),
              linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: var(--on-dark);
}
.blueprint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 178, 214, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 214, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(148, 178, 214, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 214, 0.04) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 80%);
}
.hero .wrap { padding-top: clamp(72px, 12vw, 148px); padding-bottom: clamp(72px, 11vw, 136px); }
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section--light .eyebrow, .section--paper .eyebrow { color: var(--accent-ink); }
.hero h1 { color: var(--white); margin-bottom: 0.3em; }
.tagline {
  font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; color: var(--white);
  margin-bottom: 0.8em; letter-spacing: -0.01em;
}
.tagline span { color: var(--accent); }
.hero-lead { font-size: var(--step-1); color: var(--on-dark-soft); max-width: 620px; margin-bottom: 2em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-specs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(48px, 7vw, 80px); border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: var(--line-dark); overflow: hidden; list-style: none;
}
.hero-specs li { background: rgba(11, 22, 34, 0.85); padding: 18px 20px; font-size: 0.925rem; color: var(--on-dark-soft); }
.hero-specs strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--white); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 820px) { .hero-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .hero-specs { grid-template-columns: 1fr; } }

/* Page hero (subpages) */
.page-hero .wrap { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(56px, 8vw, 96px); }
.page-hero h1 { font-size: var(--step-5); max-width: 860px; }
.page-hero .hero-lead { margin-bottom: 0; max-width: 720px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.875rem; color: var(--on-dark-soft); margin-bottom: 20px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--light { background: var(--white); }
.section--paper { background: var(--paper); border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.section--dark { background: var(--navy-900); color: var(--on-dark); position: relative; isolation: isolate; overflow: hidden; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); }
.section--dark .section-head p { color: var(--on-dark-soft); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.prose p { color: var(--ink-soft); font-size: var(--step-1); }
.section--dark .prose p { color: var(--on-dark-soft); }

.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.media-frame img { width: 100%; }
.media-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); pointer-events: none; }

/* Mission panel */
.pillars { display: grid; gap: 14px; list-style: none; }
.pillars li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px; background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius);
}
.pillars h3 { font-size: var(--step-1); margin-bottom: 2px; }
.pillars p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.icon-badge {
  flex-shrink: 0; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--navy-900); color: var(--accent);
}
.icon-badge svg { width: 22px; height: 22px; }

/* ---------- Service cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; list-style: none; }
.card-grid > li { grid-column: span 2; display: flex; }
.card-grid > li:nth-child(4), .card-grid > li:nth-child(5) { grid-column: span 3; }
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid > li, .card-grid > li:nth-child(4) { grid-column: span 1; }
  .card-grid > li:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-grid > li, .card-grid > li:nth-child(5) { grid-column: span 1; }
}
.service-card {
  position: relative; display: flex; flex-direction: column; width: 100%;
  background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.service-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-800); }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
@media (min-width: 961px) {
  .card-grid > li:nth-child(4) .thumb, .card-grid > li:nth-child(5) .thumb { aspect-ratio: 21 / 9; }
}
@media (min-width: 601px) and (max-width: 960px) {
  .card-grid > li:nth-child(5) .thumb { aspect-ratio: 21 / 9; }
}
.service-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { margin-bottom: 6px; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; }
.service-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.925rem; color: var(--accent-ink); }
.service-card .more svg { width: 16px; height: 16px; transition: transform .2s; }
.service-card .tag { margin-top: auto; font-size: 0.85rem; color: var(--slate-500); }
a.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c9d3de; }
a.service-card:hover .thumb img { transform: scale(1.04); }
a.service-card:hover .more svg { transform: translateX(3px); }

/* ---------- Checklist grid (services provided) ---------- */
.check-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); border-radius: var(--radius); overflow: hidden; }
.check-grid li { display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: var(--white); font-weight: 600; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.005em; }
.check-grid .icon-badge { width: 40px; height: 40px; }
.check-grid .icon-badge svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .check-grid { grid-template-columns: 1fr; } }

/* ---------- Feature cards ---------- */
.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } .feature-grid--2 { grid-template-columns: 1fr; } }
@media (min-width: 640px) and (max-width: 900px) { .feature-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature {
  position: relative; height: 100%;
  padding: 28px 26px; background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .icon-badge { margin-bottom: 18px; }
.feature p { color: var(--ink-soft); margin: 0; }
.feature .step {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--slate-500); letter-spacing: 0.08em;
}
.feature-grid > li { display: flex; }
.feature-grid > li > .feature { width: 100%; }

/* Applications grid (dark) */
.app-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.app {
  height: 100%; padding: 24px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-dark);
  transition: border-color .2s, background-color .2s, transform .2s;
}
.app:hover { border-color: rgba(245, 165, 36, 0.5); background: rgba(255, 255, 255, 0.05); transform: translateY(-3px); }
.app-grid > li { display: flex; }
.app-grid > li > .app { width: 100%; }
.app h3 { font-size: var(--step-1); display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.app h3 .icon-badge { width: 38px; height: 38px; background: rgba(245, 165, 36, 0.12); }
.app h3 .icon-badge svg { width: 20px; height: 20px; }
.app p { color: var(--on-dark-soft); margin: 0; font-size: 0.95rem; }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line-light); color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.callout {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 22px; max-width: 820px;
  font-size: var(--step-1); color: var(--ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-950); color: var(--on-dark); position: relative; isolation: isolate; overflow: hidden; }
.cta-band .wrap { padding-top: clamp(56px, 8vw, 88px); padding-bottom: clamp(56px, 8vw, 88px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } }
.cta-band h2 { color: var(--white); margin-bottom: 0.35em; }
.cta-band p { color: var(--on-dark-soft); font-size: var(--step-1); margin: 0; }
.contact-list { list-style: none; display: grid; gap: 12px; }
.contact-list a {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-dark); border-radius: var(--radius);
  text-decoration: none; color: var(--white); transition: border-color .2s, background-color .2s;
  min-width: 0;
}
.contact-list a:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.07); }
.contact-list .label { display: block; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-soft); }
.contact-list .value { display: block; font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.contact-list .icon-badge { background: var(--accent); color: var(--navy-950); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-soft); border-top: 1px solid var(--line-dark); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; font-family: var(--font-display); }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--on-dark-soft); }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .brand { margin-bottom: 14px; }
.footer-tag { max-width: 340px; margin: 0; }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.875rem; }
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .code { font-family: var(--font-display); font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 700; line-height: 1; color: var(--accent); margin-bottom: 12px; letter-spacing: -0.04em; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  a.service-card:hover, .feature:hover, .app:hover { transform: none; }
  a.service-card:hover .thumb img { transform: none; }
}
