/* Layout concept: an enclosure door. A navy nameplate band up top, content on a clean back panel,
   sections and project types marked with lamacoid-style engraved tags. */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #4a5668;
  --line: #d5dce5;
  --navy: #21437a;
  --navy-ink: #ffffff;
  --green: #2a7a3e;
  --link: #1d4f9a;
  --plate: #ffffff;
  --focus: #e0a100;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;

  --step-0: 1.125rem;   /* 18px body */
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 6vw, 3.6rem);
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1621; --surface: #172233; --ink: #e8edf4; --muted: #b3bfcf; --line: #2c3a4f;
    --navy: #1a3866; --navy-ink: #ffffff; --green: #6cc287; --link: #9cc0f2; --plate: #ffffff; --focus: #ffc83d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1621; --surface: #172233; --ink: #e8edf4; --muted: #b3bfcf; --line: #2c3a4f;
  --navy: #1a3866; --navy-ink: #ffffff; --green: #6cc287; --link: #9cc0f2; --plate: #ffffff; --focus: #ffc83d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
  letter-spacing: 0.005em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); font-weight: 600; }
p { margin: 0; max-width: var(--measure); }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 20; }

/* Header band */
.site-header { background: var(--navy); color: var(--navy-ink); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.logo-plate {
  background: var(--plate); border-radius: 6px; padding: 5px 7px; display: grid; place-items: center;
  width: 56px; height: 70px; flex: none;
}
.logo-plate img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: 0.01em; }
.brand-tag { font-size: 0.95rem; opacity: 0.92; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-nav a {
  display: block; color: var(--navy-ink); text-decoration: none; font-weight: 600;
  padding: 8px 12px; border-radius: 4px; font-size: 1.05rem;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,0.18); box-shadow: inset 0 -3px 0 var(--plate); }

/* Lamacoid tag */
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--navy); color: var(--navy-ink); padding: 3px 9px; border-radius: 2px;
  justify-self: start; width: fit-content;
}
.tag.green { background: var(--green); color: var(--bg); }

/* Sections */
main { display: block; }
.section { padding-block: clamp(40px, 7vw, 72px); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: grid; gap: 18px; }
.stack-lg { display: grid; gap: 32px; }
.lede { font-size: var(--step-1); color: var(--muted); }
.muted { color: var(--muted); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hero h1 { max-width: 16ch; }
.callcard {
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--green);
  padding: 22px 24px; display: grid; gap: 14px;
}
.callcard dl { margin: 0; display: grid; gap: 12px; }
.callcard dt { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.callcard dd { margin: 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.callcard dd a { color: var(--ink); text-decoration-color: var(--line); }

/* Reasons */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.reasons h3 { font-size: var(--step-1); font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; margin-bottom: 8px; }

/* Service list */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.service { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 3px solid var(--navy); }
.service h3 { font-size: 1.6rem; }

.linklist { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.linklist a { font-weight: 600; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project {
  background: var(--surface); border: 1px solid var(--line); padding: 24px; display: grid; gap: 12px; align-content: start;
}
.project h3 { font-size: 1.6rem; }
.systems { font-family: var(--font-mono); font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.systems b { color: var(--ink); font-weight: 600; }

/* Platforms table */
.table-wrap { overflow-x: auto; }
table.platforms { border-collapse: collapse; width: 100%; min-width: 30rem; }
.platforms th, .platforms td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.platforms th { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; width: 34%; }
.platforms td { color: var(--muted); }

/* Timeline (about) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: var(--measure); }
.timeline li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.timeline .yr { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timeline .yr { color: var(--link); } }
:root[data-theme="dark"] .timeline .yr { color: var(--link); }
.creds { display: flex; flex-wrap: wrap; gap: 10px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
form.contact { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); padding: 24px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp { position: absolute; left: -9999px; }
button.primary {
  font: inherit; font-weight: 700; background: var(--navy); color: var(--navy-ink); border: 0;
  border-radius: 4px; padding: 14px 22px; cursor: pointer; justify-self: start; font-size: 1.1rem;
}
button.primary:hover { filter: brightness(1.12); }
.form-note { font-size: 1rem; color: var(--muted); }

/* CTA strip */
.cta { background: var(--surface); border-block: 1px solid var(--line); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 32px; }
.cta p { font-size: var(--step-1); }
.cta strong { font-size: 1.35rem; }

/* Footer */
.site-footer { background: var(--navy); color: var(--navy-ink); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; padding-block: 28px; font-size: 1rem; }
.site-footer a { color: var(--navy-ink); }
.site-footer p { max-width: none; }

@media (max-width: 820px) {
  .hero .wrap, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .reasons, .services, .projects { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 1.6rem; }
  .site-nav a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Screens and photos */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.shot { margin: 0; display: grid; gap: 10px; align-content: start; }
.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--surface); }
.shot figcaption { font-size: 1rem; color: var(--muted); }
@media (max-width: 820px) { .shots { grid-template-columns: minmax(0, 1fr); } }
