/* Avelis Solutions — shared styles */
:root {
  --paper: #f3f0e8;
  --paper-2: #e9e5d9;
  --ink: #0f1c22;
  --ink-2: #1b2b33;
  --muted: #55646b;
  --line: #cfcabb;
  --signal: #d4412a;      /* vermilion */
  --signal-ink: #a92f1c;
  --teal: #1f6f6b;
  --radius: 4px;
  --max: 1160px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.9rem, 7.2vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.7rem; line-height: 1.15; }
h1 em, h2 em { font-style: italic; color: var(--signal); }
p { margin: 0 0 1em; }
.eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--signal); }
.lede { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--ink-2); max-width: 40em; }
.mono { font-family: var(--mono); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(243,240,232,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.7rem; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.brand small { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-left: 2px; padding-top: 6px; }
.nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a.link { text-decoration: none; font-size: .95rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a.link:hover, .nav a.link[aria-current="page"] { border-color: var(--signal); }
.menu-btn { display: none; background: none; border: 1px solid var(--ink); border-radius: var(--radius); padding: 8px 12px; font: 500 .85rem var(--mono); cursor: pointer; color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 14px 24px; border-radius: var(--radius); border: 1px solid var(--ink); cursor: pointer; font-family: var(--sans); transition: background .15s, transform .15s; }
.btn:hover { background: var(--signal); border-color: var(--signal); }
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 10px 18px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.on-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.on-dark:hover { background: var(--signal); color: #fff; border-color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

/* hero */
.hero { padding: clamp(64px, 11vw, 140px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 85% 10%, #000 0, transparent 60%); -webkit-mask-image: radial-gradient(ellipse at 85% 10%, #000 0, transparent 60%); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 12.5em; margin-bottom: 30px; }
.hero .lede { margin-bottom: 38px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.page-hero { padding: clamp(56px, 9vw, 108px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 14em; margin-bottom: 24px; }

/* sections */
section { padding: clamp(60px, 9vw, 112px) 0; }
.sec-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head p { color: var(--ink-2); font-size: 1.15rem; margin-top: 20px; }
.rule-top { border-top: 1px solid var(--line); }
.dark { background: var(--ink); color: var(--paper); }
.dark .eyebrow, .dark .muted { color: #9fb0b6; }
.dark h2 em, .dark h1 em { color: #ff7a5f; }
.alt { background: var(--paper-2); }

/* the wall (home) */
.wall { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); background: #fff8; }
.wall > div { padding: clamp(24px, 4vw, 44px); }
.wall .left { border-right: 2px dashed var(--signal); position: relative; }
.wall h3 { margin-bottom: 18px; }
.wall ul { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .88rem; }
.wall li { padding: 11px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.wall li span:last-child { color: var(--muted); text-align: right; }
.wall .right { background: var(--ink); color: var(--paper); }
.wall .right li { border-color: #2b3d46; }
.wall .right li span:last-child { color: #ff9a85; }
.wall .tag { position: absolute; top: -13px; right: -1px; transform: translateX(50%); background: var(--signal); color: #fff; font: 600 .68rem var(--mono); letter-spacing: .12em; padding: 5px 10px; text-transform: uppercase; z-index: 2; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid #2b3d46; margin-top: 56px; }
.stat { padding: 32px 28px 8px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid #2b3d46; }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 6vw, 4.8rem); line-height: 1; margin-bottom: 10px; }
.stat b i { color: #ff7a5f; font-style: normal; }
.stat span { color: #b7c4c9; font-size: .98rem; display: block; max-width: 22em; }
.fine { font-family: var(--mono); font-size: .72rem; color: #8b9ea5; margin-top: 30px; letter-spacing: .02em; }

/* service cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--ink); }
.card { padding: clamp(26px, 3.4vw, 42px); background: var(--paper); display: flex; flex-direction: column; gap: 14px; text-decoration: none; transition: background .2s; }
.card:nth-child(odd) { border-right: 1px solid var(--ink); }
.card:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
.card:hover { background: #fff; }
.card .idx { font-family: var(--mono); font-size: .76rem; color: var(--signal); letter-spacing: .12em; }
.card p { color: var(--ink-2); margin: 0; font-size: 1rem; }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: .92rem; }
.card:hover .more { color: var(--signal); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; counter-reset: s; }
.step { border-top: 2px solid var(--ink); padding-top: 22px; counter-increment: s; }
.step::before { content: "0" counter(s); font-family: var(--mono); font-size: .8rem; color: var(--signal); display: block; margin-bottom: 14px; }
.step h3 { margin-bottom: 12px; }
.step p { color: var(--ink-2); font-size: 1rem; }

/* two-up models */
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.model { border: 1px solid var(--ink); padding: clamp(26px, 3.6vw, 44px); background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.model.feature { background: var(--ink); color: var(--paper); }
.model .label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--signal); margin-bottom: 10px; }
.model.feature .label { color: #ff9a85; }
.model h3 { margin-bottom: 12px; }
.model ul { padding-left: 1.1em; margin: 8px 0 0; }
.model li { margin-bottom: 8px; font-size: 1rem; }
.model .price { margin-top: auto; padding-top: 22px; border-top: 1px solid currentColor; font-family: var(--mono); font-size: .85rem; opacity: .9; }
.model .price { border-color: color-mix(in srgb, currentColor 25%, transparent); }

/* role table */
.roles { width: 100%; border-collapse: collapse; }
.roles th, .roles td { text-align: left; padding: 22px 20px 22px 0; vertical-align: top; border-top: 1px solid var(--line); font-size: 1rem; }
.roles th { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; width: 24%; line-height: 1.15; }
.roles td:nth-child(2) { color: var(--muted); width: 36%; }
.roles thead th { font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: 14px; }

/* service detail blocks */
.svc { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); padding: clamp(44px, 6vw, 76px) 0; border-top: 1px solid var(--line); }
.svc:first-of-type { border-top: 0; }
.svc .badge { font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; color: var(--signal); margin-bottom: 14px; display: block; }
.svc .offering { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--muted); display: inline-block; }
.svc .offering b { color: var(--ink); font-weight: 600; }
.trio { display: grid; gap: 0; border: 1px solid var(--ink); }
.trio > div { padding: 22px 26px; border-top: 1px solid var(--line); }
.trio > div:first-child { border-top: 0; }
.trio h4 { margin: 0 0 6px; font: 600 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.trio p { margin: 0; font-size: 1.02rem; }
.trio .deliver { background: var(--ink); color: var(--paper); }
.trio .deliver h4 { color: #ff9a85; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-family: var(--mono); font-size: .74rem; border: 1px solid var(--ink); padding: 4px 10px; border-radius: 99px; }

/* faq */
.faq details { border-top: 1px solid var(--line); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.55rem; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--signal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 14px 0 0; max-width: 44em; color: var(--ink-2); }

/* signals */
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.signal { border-left: 3px solid var(--signal); padding: 4px 0 4px 22px; }
.signal h3 { margin-bottom: 8px; font-size: 1.5rem; }
.signal p { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* cta band */
.cta-band { text-align: left; }
.cta-band h2 { max-width: 14em; margin-bottom: 28px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 90px); }
form .field { margin-bottom: 20px; }
label { display: block; font: 600 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
input, select, textarea { width: 100%; font: 1rem var(--sans); padding: 13px 14px; border: 1px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink); }
textarea { min-height: 150px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.note { font-size: .9rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* footer */
.site-footer { background: var(--ink); color: #b7c4c9; padding: 64px 0 36px; font-size: .95rem; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid #2b3d46; }
.site-footer .brand { color: var(--paper); margin-bottom: 14px; }
.site-footer h4 { font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8b9ea5; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.legal { padding-top: 26px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: .74rem; color: #8b9ea5; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* responsive */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .menu-btn { display: block; }
  .nav ul { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; display: none; }
  .nav ul.open { display: flex; }
  .nav ul li { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav ul li:last-child { border: 0; }
  .wall, .models, .signals, .contact-grid, .svc, .steps, .cards, .foot { grid-template-columns: 1fr; }
  .wall .left { border-right: 0; border-bottom: 2px dashed var(--signal); }
  .wall .tag { top: auto; bottom: -13px; right: auto; left: 24px; transform: none; }
  .card:nth-child(odd) { border-right: 0; }
  .card:not(:last-child) { border-bottom: 1px solid var(--ink); }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid #2b3d46; }
  .two { grid-template-columns: 1fr; }
  .roles thead { display: none; }
  .roles, .roles tbody, .roles tr, .roles th, .roles td { display: block; width: 100% !important; }
  .roles tr { border-top: 1px solid var(--line); padding: 18px 0; }
  .roles th, .roles td { border: 0; padding: 4px 0; }
  .roles td::before { content: attr(data-label); display: block; font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--signal); margin-top: 8px; }
}
