:root {
  --cobalt: #0047AB;
  --navy: #000080;
  --sky: #82C8E5;
  --slate: #6D8196;
  --ground: var(--cobalt);
  --surface: rgba(0, 0, 128, 0.35);
  --ink: #FFFFFF;
  --steel: #C3D3E2;
  --line: rgba(109, 129, 150, 0.55);
  --sky-soft: rgba(130, 200, 229, 0.3);
  --radius: 16px;
  --radius-sm: 11px;
  --display: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: linear-gradient(180deg, var(--cobalt) 0%, #002F9A 55%, var(--navy) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -3rem;
  padding: .5rem .75rem; background: var(--sky); color: var(--ground);
  font-family: var(--mono); font-size: .8rem; text-decoration: none; z-index: 10;
  border-radius: var(--radius-sm);
}
.skip:focus { top: var(--gutter); }

/* ---- signal field (canvas) ---- */
.field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ---- chrome: top and bottom rows ---- */
.top, .bottom {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: var(--gutter);
}
.bottom { border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 1.25rem; }

.wordmark {
  display: inline-flex; align-items: center; gap: .75rem;
  text-decoration: none;
}
.mark {
  width: .8rem; height: .8rem; background: var(--sky); border-radius: 4px;
}
.name {
  font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
}
.tag {
  font-family: var(--mono); font-size: .8rem; color: var(--sky);
  padding-left: .75rem; border-left: 1px solid var(--line);
}

.meta {
  margin: 0;
  font-family: var(--mono); font-weight: 500; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--steel);
  display: inline-flex; align-items: center; gap: .6rem;
}
.dot {
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--sky);
  animation: blink 2.2s steps(1, end) infinite;
}

.mail {
  font-family: var(--mono); font-weight: 500; font-size: .85rem;
  text-decoration: none; border-bottom: 1px solid var(--line);
  padding-bottom: .1rem; transition: border-color .2s, color .2s;
}
.mail:hover, .mail:focus-visible { border-color: var(--sky); color: var(--sky); }

/* ---- stage ---- */
.stage {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 3rem var(--gutter);
  padding: clamp(2rem, 6vh, 5rem) var(--gutter) clamp(2rem, 6vh, 4rem);
}

.copy { width: min(100%, 52rem); }

.eyebrow {
  margin: 0 0 1.5rem;
  font-family: var(--mono); font-weight: 600; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sky);
  display: inline-flex; align-items: center; gap: .75rem;
  opacity: 0; animation: rise .8s var(--ease) .15s forwards;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--sky); }

.headline {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 9rem);
  font-weight: 700; line-height: .95; letter-spacing: -.035em;
}
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: block; transform: translateY(105%); animation: lift 1s var(--ease) forwards; }
.line:nth-child(1) > span { animation-delay: .3s; }
.line:nth-child(2) > span { animation-delay: .42s; }
.line:nth-child(2) { color: var(--sky); }

.lede {
  margin: 2rem 0 2.5rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.5; color: var(--steel);
  text-wrap: pretty;
  opacity: 0; animation: rise .8s var(--ease) .6s forwards;
}

/* ---- form ---- */
.notify { width: min(100%, 32rem); opacity: 0; animation: rise .8s var(--ease) .75s forwards; }

.field-row {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: border-color .2s, box-shadow .2s;
}
.field-row:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }

.field-row input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--ink);
  font: inherit; font-size: 1rem;
  padding: .85rem 1rem;
}
.field-row input::placeholder { color: var(--steel); }

.field-row button {
  flex: none;
  border: 0; margin: .3rem; border-radius: var(--radius-sm);
  padding: .55rem 1.1rem;
  background: var(--sky); color: var(--ground);
  font: inherit; font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.field-row button:hover { background: var(--ink); }
.field-row button { color: var(--navy); }
.field-row button:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.field-row button:disabled { opacity: .6; cursor: default; }

.notify.is-done .field-row { border-color: var(--sky); }

.status {
  min-height: 1.4rem; margin: .75rem 0 0 .25rem;
  font-family: var(--mono); font-size: .82rem; color: var(--steel);
}
.status.is-error { color: var(--sky); }
.status.is-ok { color: var(--ink); }

/* ---- practice areas ---- */
.services {
  align-self: end;
  min-width: 16rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px);
  opacity: 0; animation: rise .8s var(--ease) .95s forwards;
}
.services-label {
  margin: 0 0 .5rem;
  font-family: var(--mono); font-weight: 600; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--steel);
}
.services ul { list-style: none; margin: 0; padding: 0; }
.services li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.services li:last-child { border-bottom: 0; padding-bottom: 0;
}
.code { font-family: var(--mono); font-weight: 600; font-size: .7rem; color: var(--sky); letter-spacing: .08em; min-width: 2.4em; }

/* ---- motion ---- */
@keyframes rise  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lift  { to { transform: none; } }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .lede, .notify, .services { opacity: 1; animation: none; }
  .line > span { transform: none; animation: none; }
  .dot { animation: none; }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; align-items: start; gap: 2.5rem; }
  .services { min-width: 0; width: min(100%, 26rem); }
}

@media (max-width: 640px) {
  .top, .bottom { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .wordmark { flex-wrap: wrap; gap: .5rem .75rem; }
  .tag { border: 0; padding: 0; flex-basis: 100%; }
  .headline { font-size: clamp(3rem, 16vw, 5rem); }
  .field-row { flex-direction: column; }
  .field-row button { margin: .3rem; padding: .85rem; }
}
