/* HJ Realtime — reserved, dark, editorial. */

:root {
  --bg: #12110f;
  --cream: #ece6d8;
  --cream-2: #c4bbab;
  --mute: #8f8778;
  --hair: rgba(236, 230, 216, 0.13);
  --focus: #ece6d8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: 64rem;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --header-h: 3.5rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  background: var(--bg);
  color: var(--cream);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--cream); }
p, h1, h2, h3, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.5rem;
  z-index: 100;
  padding: 0.4rem 0.75rem;
  background: var(--cream);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-150%);
}

.skip:focus { transform: translateY(0); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--hair);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--cream);
}

.site-nav ul {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--mute);
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--cream);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.nav-toggle-close { display: none; }
body.nav-open .nav-toggle-open { display: none; }
body.nav-open .nav-toggle-close { display: inline; }

body.nav-open { overflow: hidden; }

body.nav-open::after {
  content: "";
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(12, 11, 10, 0.55);
  z-index: 15;
}

/* Type helpers */

.label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.5rem;
}

/* Hero */

.hero {
  padding: clamp(3.25rem, 9vh, 5.5rem) 0 clamp(3rem, 8vh, 5rem);
  border-bottom: 1px solid var(--hair);
}

.hero h1 {
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  margin-bottom: 0.85rem;
}

.lede {
  max-width: 28rem;
  color: var(--cream-2);
  font-size: 1.08rem;
  line-height: 1.5;
}

.hero-cta {
  margin-top: 1.75rem;
}

.hero-cta a,
.contact-email a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.08rem;
}

.hero-cta a:hover,
.contact-email a:hover {
  border-bottom-color: var(--cream);
}

/* Sections */

.section {
  padding: clamp(2.75rem, 7vh, 4.5rem) 0;
  border-bottom: 1px solid var(--hair);
}

.section-lead {
  color: var(--cream-2);
  max-width: 36rem;
  margin: -0.6rem 0 1.75rem;
}

#work .label { margin-bottom: 0.65rem; }

#work h2 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  margin-bottom: 0.5rem;
}

/* Services */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.cards li {
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
}

.cards h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.cards p {
  color: var(--cream-2);
  font-size: 0.98rem;
}

/* Selected work */

.case-intro {
  max-width: 40rem;
  color: var(--cream-2);
  margin-bottom: 2rem;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.case-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.45rem;
}

.case-grid dd {
  color: var(--cream-2);
  font-size: 0.98rem;
}

.case-grid a {
  color: var(--cream);
  text-underline-offset: 0.15em;
}

/* Approach */

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 3rem;
}

.principles li {
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
}

.principles h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.principles p {
  color: var(--cream-2);
  max-width: 28rem;
}

/* Contact */

.section-contact { border-bottom: 0; }

.contact-email a {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hair);
  padding: 1.15rem 0 1.4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--mute);
  font-size: 0.86rem;
}

.footer-inner a {
  color: var(--mute);
  text-decoration: none;
}

.footer-inner a:hover { color: var(--cream); }

/* Breakpoints */

@media (max-width: 860px) {
  .cards,
  .case-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 720px) {
  .principles {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    z-index: 30;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 21;
    background: var(--bg);
    border-bottom: 1px solid var(--hair);
    padding: 0.35rem var(--gutter) 1.2rem;
    display: none;
  }

  body.nav-open .site-nav { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.8rem 0;
    border-top: 1px solid var(--hair);
    font-size: 1rem;
    color: var(--cream-2);
  }

  .site-nav li:last-child a {
    border-bottom: 1px solid var(--hair);
  }
}

@media (max-width: 520px) {
  .footer-inner { flex-direction: column; }
}

@media print {
  body { background: #fff; color: #111; }
  .site-header, .nav-toggle, .skip { display: none; }
  a { color: inherit; }
  .section, .hero { border-color: #ccc; }
}
