:root {
  --bg: #0c0e14;
  --bg-alt: #15131d; /* content sections: a step lighter than the navy header and footer */
  --surface: #1e182a;
  --line: #2d223c;
  --gold: #e5a93c;
  --gold-hover: #f0b950;
  --text: #ffffff;
  --muted: #8b7b9e;
  --text-soft: #d9d3e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Button */
.btn {
  display: inline-block;
  padding: 18px 28px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: var(--bg);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Top bar */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
}

.nav__mark { display: block; height: 40px; width: auto; }

.nav__wordmark {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav__wordmark span { color: var(--gold); }

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}

.nav__links a { color: var(--text-soft); white-space: nowrap; transition: color 0.2s; }
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--gold); }

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 72% 45%, var(--surface) 0%, var(--bg) 65%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero__bg .traces use {
  fill: none;
  stroke: var(--muted);
  stroke-opacity: 0.22;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.hero__bg .joints circle { fill: var(--muted); opacity: 0.45; }
.hero__bg .terminals circle { fill: var(--gold); }
.hero__bg .pulses circle { fill: var(--gold); }
.hero__bg .pulses .glow { opacity: 0.18; }

/* Fade the traces behind the left-aligned headline */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12, 14, 20, 0.85) 0%, rgba(12, 14, 20, 0.45) 40%, transparent 65%);
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 10vh;
}

.hero__title {
  max-width: 14ch;
  font-size: clamp(2.5rem, 6.5vw, 5.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__title span { color: var(--gold); }

.hero__content .btn { align-self: flex-start; margin-top: 40px; }

/* Sections */
.section { padding: 120px 0; }
main > .section { background: var(--bg-alt); }
.section + .section { border-top: 1px solid var(--line); }

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section__intro {
  max-width: 46rem;
  margin-top: 24px;
  color: var(--text-soft);
  font-size: 19px;
}

.section__intro strong { color: var(--text); font-weight: 600; }

/* What we build */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.service {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.service h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.service ul { list-style: none; margin-top: 20px; }

.service li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 15.5px;
}

.service li + li { margin-top: 14px; }

.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.more {
  margin-top: 48px;
  color: var(--text-soft);
  font-size: 17px;
}

.text-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover { color: var(--gold-hover); }

/* About */
.people {
  display: grid;
  gap: 56px;
  margin-top: 56px;
}

.person {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.person img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.person h3,
.person__name { font-size: 24px; font-weight: 800; line-height: 1.2; }

.person__role {
  margin-top: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.person__lead {
  max-width: 44rem;
  margin-top: 20px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.person__bio {
  max-width: 44rem;
  margin-top: 12px;
  color: var(--text-soft);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact .btn { margin-top: 32px; }

.contact__alt {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.contact__alt p { color: var(--text-soft); }

.contact__alt dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  margin-top: 16px;
}

.contact__alt dt { color: var(--gold); font-weight: 700; }
.contact__alt dd a { color: var(--text); font-weight: 500; }
.contact__alt dd a:hover { color: var(--gold); }

.contact__note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* Footer: brand, links and contact columns, then the legal line */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer .nav__mark { height: 32px; }
.footer .nav__wordmark { font-size: 20px; }

.footer__tagline { max-width: 22rem; margin-top: 16px; color: var(--text-soft); font-size: 15px; }

.footer__heading {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer__col ul { display: grid; gap: 10px; margin-top: 16px; list-style: none; }
.footer__col a { color: var(--text-soft); transition: color 0.2s; }
.footer__col a:hover { color: var(--gold); }

.footer__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* Problem page */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 80% 0%, var(--surface) 0%, var(--bg) 60%);
}

.page main { flex: 1; padding: 64px 0 120px; }

.form-wrap { max-width: 44rem; }

.form { margin-top: 48px; }

.field + .field { margin-top: 28px; }

.field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.field label small { color: var(--muted); font-weight: 500; font-size: inherit; }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s;
}

.field textarea { min-height: 200px; resize: vertical; }

.field input:focus,
.field textarea:focus { outline: none; border-color: var(--gold); }

.form .btn { margin-top: 36px; min-width: 160px; }

.form__error { margin-top: 16px; color: #ff9b8a; }

.form__trap { position: absolute; left: -9999px; }

.done {
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 18px;
}

.done strong { display: block; margin-bottom: 8px; color: var(--text); font-size: 22px; }

/* Still circuits: inner page headers and the CTA band each have their own layout (the homepage hero has a third) */
.circuit { position: relative; isolation: isolate; overflow: hidden; }

.circuit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: right center / cover no-repeat;
  opacity: 0.45; /* dimmed so the text over it reads clearly */
}

/* Fixed size, pinned top-right: the header graphic sits in the same place on every page,
   and taller headers (What we build, Contact) reveal more of it */
.page-head.circuit::before { background: url("assets/circuit-head.svg") right top / 1600px 520px no-repeat; }
.cta.circuit::before { background-image: url("assets/circuit-cta.svg"); }

/* Inner page header */
.page-head {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 80% 0%, var(--surface) 0%, var(--bg) 60%);
}

.page-head__body { padding-top: 64px; padding-bottom: 96px; }

.page-head__btn { margin-top: 32px; }

.page-head + main > .section:first-child { padding-top: 72px; }

.contact__alt--page { max-width: 32rem; }

.page-head h1 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

/* Small interface illustrations in each What we build card, under the title */
.service__art {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

/* Principles */
.principles { display: grid; gap: 80px; }

.principle {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
}

.principle + .principle { padding-top: 80px; border-top: 1px solid var(--line); }

.principle h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.principle__body p {
  max-width: 44rem;
  color: var(--text-soft);
  font-size: 18px;
}

.principle__body p + p { margin-top: 16px; }

.principle__body .principle__quote {
  color: var(--text);
  font-size: 21px;
  font-style: italic;
  line-height: 1.5;
}

.principle__body .principle__statement {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

/* Home: copy below the hero. Desktop: heading on the left, text on the right */
.home-copy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 72px;
  align-items: start;
}

.home-copy .section__title { grid-column: 1; grid-row: 1 / span 5; max-width: 14ch; }
.home-copy > p { grid-column: 2; }
.home-copy > p:first-of-type { margin-top: 0; }

.home-copy p {
  max-width: 44rem;
  margin-top: 24px;
  color: var(--text-soft);
  font-size: 19px;
}

.home-copy .home-copy__close { margin-top: 40px; color: var(--text); font-weight: 600; }

/* Closing call to action, above the footer */
.cta {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.cta__body { padding-top: 96px; padding-bottom: 96px; }

.cta h2 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cta .btn { margin-top: 32px; }

/* Scroll fade-in (classes added by reveal.js) */
.reveal {
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal:not(.is-visible) { opacity: 0; transform: translateY(12px); }

/* Problem page: ease the confirmation in after sending */
.done:not([hidden]) { animation: done-in 0.45s ease both; }

@keyframes done-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .done:not([hidden]) { animation: none; }
}

/* Phone */
@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .home-copy { display: block; }
  .home-copy .section__title { max-width: 22ch; }
  .home-copy > p:first-of-type { margin-top: 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .principle { grid-template-columns: 1fr; gap: 20px; }
  .principles { gap: 56px; }
  .principle + .principle { padding-top: 56px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { padding-top: 20px; padding-bottom: 20px; }
  .nav__logo { gap: 8px; }
  .nav__mark { height: 30px; }
  .nav__wordmark { font-size: 19px; }
  .nav__links { gap: 18px; font-size: 14px; }
  .hero::after { background: rgba(12, 14, 20, 0.55); }
  .hero__content { padding-bottom: 8vh; }
  .hero__content .btn { align-self: stretch; text-align: center; }
  .btn { font-size: 16px; }
  .section { padding: 80px 0; }
  .section__intro { font-size: 17px; }
  .service, .contact__alt, .done { padding: 24px; }
  .person { grid-template-columns: 1fr; gap: 24px; }
  .person img { max-width: 220px; }
  .person__lead { font-size: 17px; }
  .page-head__body { padding-top: 40px; padding-bottom: 64px; }
  .home-copy p { font-size: 17px; }
  .cta__body { padding-top: 72px; padding-bottom: 72px; }
  .cta .btn, .page-head__btn { width: 100%; text-align: center; }
}

/* Narrow phones: links drop to their own row under the logo */
@media (max-width: 520px) {
  .nav { flex-wrap: wrap; row-gap: 14px; }
  .nav__links { width: 100%; gap: 22px; }
  .contact .btn, .form .btn { width: 100%; text-align: center; }
}
