/* ————————————————————————————————
   HALE GROUP · halegroup.ai
   bg #0a0a0a · ink #ECEAE4 · accent #FFB000 (used once: contact mail)
   Archivo (variable width) · IBM Plex Mono
———————————————————————————————— */

:root {
  --bg: #0a0a0a;
  --ink: #ECEAE4;
  --ink-dim: #8a877f;
  --ink-faint: #55534d;
  --line: rgba(236, 234, 228, 0.10);
  --accent: #FFB000;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(236, 234, 228, 0.9); color: #0a0a0a; }

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

/* ——— schematic canvas ——— */
#schematic {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, .site-head, .site-foot { position: relative; z-index: 1; }

/* ——— header ——— */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem var(--pad);
  mix-blend-mode: difference;
}

.wordmark {
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
}

.head-right {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.head-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ink-dim);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.head-link:hover { color: var(--ink); }

.status {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.status .cursor {
  display: inline-block;
  margin-left: 0.35em;
  animation: blink 1.1s steps(1) infinite;
  font-size: 0.6rem;
}

@keyframes blink { 50% { opacity: 0; } }

/* ——— hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--pad);
  max-width: 1280px;
  margin: 0 auto;
}

.hero-line {
  font-weight: 500;
  font-stretch: 92%;
  font-size: clamp(2.1rem, 6.5vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 15ch;
  text-wrap: balance;
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-sub {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.4vw, 0.9rem);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadein 1.5s ease 2.4s forwards;
}

.cue-tick {
  display: block;
  width: 1px;
  height: 44px;
  background: var(--ink-faint);
  overflow: hidden;
  position: relative;
}

.cue-tick::after {
  content: "";
  position: absolute;
  left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--ink);
  animation: cue-drop 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes cue-drop {
  0%   { top: -50%; }
  100% { top: 110%; }
}

@keyframes fadein { to { opacity: 1; } }

/* ——— shared section rhythm ——— */
section { padding: clamp(6rem, 14vh, 11rem) var(--pad); }

.capabilities, .work, .contact {
  max-width: 1280px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  margin-bottom: 3.5rem;
}

/* ——— capabilities ——— */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.cap {
  padding: 2.5rem 2rem 2.5rem 0;
  border-right: 1px solid var(--line);
}

.cap + .cap { padding-left: 2rem; }
/* two rows of four: no right border on row ends, fresh left edge on row starts */
.cap:nth-child(4n) { border-right: none; }
.cap:nth-child(4n+1) { padding-left: 0; }
.cap:nth-child(-n+4) { border-bottom: 1px solid var(--line); }

@media (max-width: 1100px) and (min-width: 861px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cap:nth-child(4n) { border-right: 1px solid var(--line); }
  .cap:nth-child(even) { border-right: none; }
  .cap:nth-child(odd) { padding-left: 0; }
  .cap:nth-child(even) { padding-left: 2rem; }
  .cap:nth-child(-n+6) { border-bottom: 1px solid var(--line); }
}

.cap-code {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 2.75rem;
}

.cap h2 {
  font-weight: 500;
  font-stretch: 95%;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

.cap p:last-child {
  color: var(--ink-dim);
  font-size: 0.925rem;
  line-height: 1.65;
  max-width: 34ch;
}

/* ——— work registry ——— */
.registry {
  list-style: none;
  border-top: 1px solid var(--line);
}

.entry {
  display: grid;
  grid-template-columns: 7rem 1fr 1fr;
  grid-template-areas: "code name domain" "code detail detail";
  align-items: baseline;
  padding: 1.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.35s ease;
}

.entry:hover { background: rgba(236, 234, 228, 0.035); }

.entry-code {
  grid-area: code;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.entry-name {
  grid-area: name;
  font-weight: 500;
  font-stretch: 95%;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.entry-domain {
  grid-area: domain;
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.entry-detail {
  grid-area: detail;
  color: var(--ink-dim);
  font-size: 0.875rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.45s ease,
              transform 0.45s ease,
              margin-top 0.45s ease;
}

.entry:hover .entry-detail,
.entry:focus-within .entry-detail {
  max-height: 8rem;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.6rem;
}

/* touch devices: no hover — show details statically */
@media (hover: none) {
  .entry-detail {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: 0.5rem;
  }
}

/* ——— the hint ——— */
.hint {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hint-line {
  font-weight: 500;
  font-stretch: 92%;
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  max-width: 24ch;
  text-wrap: balance;
}

/* ——— contact ——— */
.contact { padding-bottom: clamp(7rem, 18vh, 13rem); }

.contact-line {
  font-weight: 500;
  font-stretch: 92%;
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 2.25rem;
}

.contact-mail {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  letter-spacing: 0.06em;
  color: var(--accent);              /* the one accent use */
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
  transition: opacity 0.3s ease;
}

.contact-mail:hover { opacity: 0.72; }

/* ——— footer ——— */
.site-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.site-foot a {
  color: var(--ink-faint);
  transition: color 0.3s ease;
}

.site-foot a:hover { color: var(--ink-dim); }

/* ——— scroll reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ——— focus visibility ——— */
a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.entry:focus { outline: none; }

.entry:focus-visible {
  outline: 1px solid var(--ink-dim);
  outline-offset: -1px;
}

/* ——— responsive ——— */
@media (max-width: 860px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap,
  .cap + .cap,
  .cap:last-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 2rem 0;
  }
  .cap:last-child { border-bottom: none; }
  .cap-code { margin-bottom: 1.25rem; }

  .entry {
    grid-template-columns: 4.5rem 1fr;
    grid-template-areas: "code name" "code domain" "code detail";
    row-gap: 0.3rem;
  }
  .entry-domain { justify-self: start; }
}

@media (max-width: 560px) {
  .site-head { padding-top: 1.1rem; }
  .wordmark { font-size: 0.68rem; letter-spacing: 0.2em; }
  .status { font-size: 0.55rem; letter-spacing: 0.06em; }
  .head-right { gap: 0.9rem; }
  .head-link { font-size: 0.55rem; letter-spacing: 0.18em; }
}

/* decorative readout yields to navigation on very narrow screens */
@media (max-width: 400px) {
  .status { display: none; }
}

/* ——— reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-line, .hero-sub, .scroll-cue { animation: none; opacity: 1; }
  .cue-tick::after, .status .cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .entry-detail { transition: none; }
}
