/* Arcalogic site. Values come from the Arcalogic design system tokens. */

@font-face { font-family: "Sora"; src: url("fonts/Sora-Variable.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Variable.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --brand-night: #0e1c26;
  --brand-arc: #e5541c;
  --brand-verdigris: #2f7f70;
  --brand-stone: #f2eee7;

  --surface: #f6f3ee;
  --surface-raised: #ffffff;
  --surface-sunken: #ece7df;
  --line: #d8d1c6;
  --line-strong: #8b8680;
  --ink: #0e1c26;
  --ink-muted: #4f5d66;
  --arc: #e5541c;
  --arc-text: #b53d0c;
  --on-arc: #0e1c26;
  --verdigris: #2f7f70;
  --link: #1f6a5c;
  --focus-ring: 0 0 0 2px #f6f3ee, 0 0 0 4px #2f7f70;

  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 8px;
  --layout-max: 1200px; --layout-gutter: 24px; --layout-text: 68ch;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Dark areas: header, hero, footer. */
[data-theme="dark"] {
  --surface: #0b1720;
  --surface-raised: #12222c;
  --surface-sunken: #07121a;
  --line: #243641;
  --line-strong: #62747e;
  --ink: #eef0ec;
  --ink-muted: #9eb0b8;
  --arc: #f26a33;
  --arc-text: #ff8a5c;
  --link: #6fd0bb;
  --focus-ring: 0 0 0 2px #0e1c26, 0 0 0 4px #5ec2ad;
  background: var(--brand-night);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.wrap { width: 100%; max-width: calc(var(--layout-max) + 2 * var(--gutter-side)); margin: 0 auto; padding-inline: var(--gutter-side); }
:root { --gutter-side: 80px; }
@media (max-width: 1024px) { :root { --gutter-side: 40px; } }
@media (max-width: 640px) { :root { --gutter-side: 20px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface-raised); color: var(--ink); padding: 8px 12px; }

/* Type */
.eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--arc-text); margin: 0; }
.eyebrow--muted { color: var(--ink-muted); }
.display { margin: 0; font-family: var(--font-display); font-size: clamp(34px, 4.2vw, 44px); line-height: 1.09; font-weight: 600; letter-spacing: -0.03em; }
.headline { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.title { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.lead { margin: 0; font-size: 19px; line-height: 30px; color: var(--ink-muted); max-width: var(--layout-text); }
.body { margin: 0; color: var(--ink-muted); max-width: var(--layout-text); }
.al-fullstop { display: inline-block; width: max(0.15em, 5px); height: max(0.15em, 5px); margin-left: 0.05em; background: var(--arc); }
.nowrap { white-space: nowrap; }

/* Buttons */
.al-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.005em; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.al-btn:focus-visible { border-radius: var(--radius-md); }
.al-btn--sm { height: 32px; padding: 0 var(--space-3); }
.al-btn--primary { background-color: var(--arc); color: var(--on-arc); border-color: var(--arc); }
.al-btn--primary:hover { background-image: linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)); }
.al-btn--secondary { background-color: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.al-btn--secondary:hover { border-color: var(--ink); }

/* Hero (header + hero share one dark field) */
.hero { position: relative; overflow: hidden; min-height: 640px; }
.hero__field { position: absolute; top: 0; left: max(0px, calc(50% - 720px)); height: 640px; display: block; pointer-events: none; }
.hero__field path { fill: none; stroke-width: 12; }
.hero__field .traces { stroke: var(--brand-verdigris); }
.hero__field .route { stroke: var(--brand-arc); }
.hero__field rect { fill: var(--brand-arc); }

.nav { position: relative; z-index: 1; height: 96px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.nav__logo img { display: block; height: 28px; width: auto; }
.nav__links { display: flex; align-items: center; gap: var(--space-8); }
.nav__links a:not(.al-btn) { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); text-decoration: none; }
.nav__links a:not(.al-btn):hover { text-decoration: underline; text-underline-offset: 4px; }

.hero__copy { position: relative; z-index: 1; width: min(620px, 100%); padding-top: 80px; padding-bottom: 96px; display: flex; flex-direction: column; gap: var(--space-6); }
.hero__headline { margin: 0; font-family: var(--font-display); font-size: clamp(56px, 7.4vw, 96px); line-height: 0.96; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.hero__lead { max-width: 520px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

@media (max-width: 1100px) {
  .hero__field { left: auto; right: -480px; opacity: 0.55; }
}
@media (max-width: 860px) {
  .nav__links a:not(.al-btn) { display: none; }
  .hero { min-height: 0; }
  .hero__field { position: relative; right: auto; left: 0; opacity: 1; width: 100%; height: 220px; }
  .hero__copy { padding-top: var(--space-8); padding-bottom: var(--space-12); }
}

/* Sections */
.section { padding-block: var(--space-24); }
.section + .section { border-top: 1px solid var(--line); }
.section--raised { background: var(--surface-raised); }
@media (max-width: 640px) { .section { padding-block: var(--space-16); } }

.section__head { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; }
.section__head .lead { margin-top: var(--space-2); }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12) var(--layout-gutter); margin-top: var(--space-16); }
.col { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.col__num { font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* Fractional CTO */
.cto { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-16) calc(var(--layout-gutter) * 3); align-items: start; }
.cto__intro { display: flex; flex-direction: column; gap: var(--space-6); position: sticky; top: var(--space-12); }
.cto__note { margin: 0; padding: var(--space-4) var(--space-6); background: var(--surface-sunken); border-radius: var(--radius-md); font-size: 15px; line-height: 24px; color: var(--ink); max-width: var(--layout-text); }
.cto__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cto__list li { display: grid; grid-template-columns: 14px 1fr; gap: 0 var(--space-4); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.cto__list .bit { width: 6px; height: 6px; background: var(--ink); margin-top: 11px; }
.cto__list h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; }
.cto__list p { margin: 0; color: var(--ink-muted); }
@media (max-width: 960px) { .cto { grid-template-columns: 1fr; } .cto__intro { position: static; } }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12) calc(var(--layout-gutter) * 3); align-items: start; }
.about__photo { margin: 0; max-width: 480px; }
.about__photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-sunken); }
.about__caption { margin-top: var(--space-3); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.about__body { display: flex; flex-direction: column; gap: var(--space-4); }
.about__body .lead { margin-bottom: var(--space-2); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about__photo { max-width: 360px; } }

/* Lab */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12) calc(var(--layout-gutter) * 3); align-items: end; }
.lab__body { display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 860px) { .lab { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-8); }
.contact .section__head { max-width: 640px; }

/* Footer */
.footer { padding-block: var(--space-16) var(--space-12); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-8); padding-bottom: var(--space-12); border-bottom: 1px solid var(--line); }
.footer__logo { display: block; height: 24px; width: auto; }
.footer__tag { margin: var(--space-4) 0 0; color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.footer__links a { color: var(--ink); text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 600; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__bottom { padding-top: var(--space-6); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
