/* Phone first, about 375px. Wider layouts start at 48em.
   Ground is flat char. Two lights remain, tuned on :root.
   prefers-reduced-motion makes each one static or absent.
   --jh-laser-name: none          hide the hero scan
   --jh-laser-duration            scan length (6.8s)
   --jh-heading-light: 0          no traveling heading glow
   --jh-word-name: none           same, if the spans are already there
   --jh-word-duration / --jh-word-step / --jh-word-delay
   --jh-link-name: none           links do not grow an underline */

:root {
  --jh-laser-name: laser-scan;
  --jh-laser-duration: 6.8s;
  --jh-laser-delay: 0.55s;
  --jh-heading-light: 1;
  --jh-word-name: word-light;
  --jh-word-duration: 0.85s;
  --jh-word-step: 0.28s;
  --jh-word-delay: 1.05s;
  --jh-link-name: link-grow;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background-color: var(--jh-bg);
  background-image: none;
}

body {
  margin: 0;
  background-color: var(--jh-bg);
  background-image: none;
  color: var(--jh-ivory);
  font-family: var(--jh-font);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  padding: 12px 14px;
  background: var(--jh-ivory);
  color: var(--jh-charcoal);
  text-decoration: none;
  z-index: 5;
  transform: translateY(-140%);
}

.skip:focus { transform: none; }

.site-header {
  position: relative;
  padding: 8px var(--jh-edge) 0;
  border-bottom: 1px solid var(--jh-line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 28%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(168, 188, 180, 0.28) 16%,
    rgba(243, 238, 228, 0.72) 34%,
    rgba(198, 165, 110, 0.9) 52%,
    rgba(198, 165, 110, 0.2) 74%,
    transparent 100%
  );
  box-shadow:
    0 0 10px 1px rgba(198, 165, 110, 0.42),
    0 7px 16px rgba(198, 165, 110, 0.14);
  animation: strip 9s ease-in-out infinite;
  pointer-events: none;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.brand .mark,
.hero-mark {
  display: block;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(243, 238, 228, 0.22));
}

.brand .mark { width: 32px; }

.brand:hover .mark,
.brand:focus-visible .mark {
  filter:
    drop-shadow(0 0 7px rgba(243, 238, 228, 0.55))
    drop-shadow(0 0 14px rgba(198, 165, 110, 0.32));
}

.domain {
  font-size: 13px;
  letter-spacing: var(--jh-tracking);
  font-weight: 500;
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--jh-line);
  background: transparent;
  color: var(--jh-ivory);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: rgba(198, 165, 110, 0.85);
  box-shadow: 0 0 14px rgba(198, 165, 110, 0.28);
}

.site-nav {
  display: none;
  flex-direction: column;
  padding: 4px 0 8px;
}

.site-nav.is-open {
  display: flex;
  background: rgba(22, 18, 16, 0.94);
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 2px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  border-top: 1px solid rgba(198, 165, 110, 0.22);
}

.site-nav a[aria-current="page"] {
  text-decoration: none;
}

.page {
  padding: 48px var(--jh-edge) 0;
  max-width: calc(var(--jh-content) + var(--jh-edge));
  background-image: none;
}

h1 {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 12em;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.kicker {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 1.125rem;
  line-height: 1.45;
}

.prose { max-width: 36em; }

.prose p,
.prose li { margin: 0 0 16px; }

.prose p:last-child { margin-bottom: 0; }

.prose a,
.frame a,
.site-footer a,
.section a,
.project a {
  text-underline-offset: 3px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.status {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section,
.project,
.path,
.site-footer {
  --jh-rule: 2rem;
  margin-top: var(--jh-rule);
  border-top: 1px solid rgba(198, 165, 110, 0.22);
}

.section,
.project {
  max-width: 36em;
  padding: var(--jh-rule) 0 0;
}

.section p,
.project p {
  margin: 0;
  max-width: 36em;
}

.paths {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  background-image: none;
}

.path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: var(--jh-rule) 0 0;
  color: inherit;
  text-decoration: none;
}

.path strong {
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.path span {
  max-width: 32em;
}

.frame {
  margin: 48px 0 0;
  max-width: 36em;
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame figcaption {
  margin-top: 10px;
  max-width: 36em;
  font-size: 14px;
}

.site-footer {
  padding: var(--jh-rule) var(--jh-edge) 2rem;
  background-image: none;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 4.25rem);
  min-height: calc(100svh - 4.25rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #161210;
}

/* Sits over the photograph and under the scrim. One pass, then the script removes it. */
.laser {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1.35rem;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(168, 188, 180, 0.2) 40%,
    rgba(243, 238, 228, 0.95) 50%,
    rgba(198, 165, 110, 0.62) 57%,
    transparent 78%
  );
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 76%, transparent 100%);
  opacity: 0;
  transform: translate3d(-1.35rem, 0, 0);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(1.36);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #161210 0%,
    rgba(22, 18, 16, 0.92) 18%,
    rgba(22, 18, 16, 0.76) 34%,
    rgba(22, 18, 16, 0.5) 48%,
    rgba(22, 18, 16, 0.08) 62%,
    rgba(22, 18, 16, 0.36) 100%
  );
}

.slats {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 7px,
    rgba(243, 238, 228, 0.16) 7px 8px
  );
  pointer-events: none;
}

.slats::after {
  content: "";
  position: absolute;
  top: 14%;
  bottom: 30%;
  left: 7px;
  width: 1px;
  background: rgba(198, 165, 110, 0.55);
  box-shadow: 0 0 8px rgba(198, 165, 110, 0.45);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  padding: 32px var(--jh-edge) 40px;
  animation: fade-up 800ms ease both;
}

.hero-mark {
  width: 72px;
  margin: 0 0 22px;
}

.hero h1 { margin-bottom: 12px; }

.hero .lede {
  margin: 0;
  max-width: 16em;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.site-nav a,
.prose a,
.section a,
.project a,
.site-footer a,
.contact-link,
.path strong,
.welcome-choice {
  position: relative;
  text-decoration: none;
}

.site-nav a::after,
.prose a::after,
.section a::after,
.project a::after,
.site-footer a::after,
.contact-link::after,
.path strong::after,
.welcome-choice::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15em;
  width: 100%;
  height: 1px;
  background: #c6a56e;
  box-shadow: 0 0 8px rgba(198, 165, 110, 0.8);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
}

.welcome-choice::after {
  left: 14px;
  right: 14px;
  bottom: 8px;
  width: auto;
}

.site-nav a::after,
.site-footer a::after,
.contact-link::after {
  bottom: 10px;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a:active::after,
.prose a:hover::after,
.prose a:focus-visible::after,
.prose a:active::after,
.section a:hover::after,
.section a:focus-visible::after,
.section a:active::after,
.project a:hover::after,
.project a:focus-visible::after,
.project a:active::after,
.site-footer a:hover::after,
.site-footer a:focus-visible::after,
.site-footer a:active::after,
.contact-link:hover::after,
.contact-link:focus-visible::after,
.contact-link:active::after,
.path:hover strong::after,
.path:focus-visible strong::after,
.path:active strong::after,
.welcome-choice:hover::after,
.welcome-choice:focus-visible::after,
.welcome-choice:active::after {
  animation-name: var(--jh-link-name);
  animation-duration: 0.35s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 0.45;
  animation: none;
}

.site-nav a[aria-current="page"]:hover::after,
.site-nav a[aria-current="page"]:focus-visible::after,
.site-nav a[aria-current="page"]:active::after {
  opacity: 1;
  animation: none;
}

a:focus-visible,
.nav-toggle:focus-visible {
  outline: 1px solid var(--jh-ivory);
  outline-offset: 3px;
  box-shadow:
    0 0 0 1px rgba(168, 188, 180, 0.45),
    0 0 14px rgba(198, 165, 110, 0.32);
}

::selection {
  background: #c6a56e;
  color: #161210;
}

@keyframes strip {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 48em) {
  :root { --jh-edge: 7vw; }

  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 72px;
  }

  .bar { min-height: 72px; }

  .nav-toggle { display: none; }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: transparent;
  }

  .site-nav a {
    min-height: 44px;
    padding: 8px 12px;
    border-top: 0;
  }

  .brand .mark { width: 36px; }

  .domain { font-size: 15px; letter-spacing: 0.22em; }

  .page { padding-top: 80px; padding-bottom: 0; }

  h1 { font-size: 3.15rem; }

  .lede { font-size: 1.3rem; }

  .hero { min-height: calc(100svh - 4.5rem); }

  .hero-copy { padding-top: 56px; padding-bottom: 72px; }

  .hero-mark { width: 104px; margin-bottom: 28px; }

  .slats { width: 36px; }

  .frame { max-width: 34rem; }

  .site-footer { padding-bottom: 2.5rem; }
}

/* Card welcome. Closed unless script opens it, so the page is intact without JS. */

.welcome {
  position: relative;
  width: min(100% - 2rem, 22rem);
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 8px 16px 16px;
  overflow: auto;
  border: 1px solid var(--jh-line);
  background-color: var(--jh-bg);
  background-image: none;
  color: var(--jh-ivory);
  box-shadow:
    0 0 0 1px rgba(198, 165, 110, 0.16),
    0 0 18px rgba(198, 165, 110, 0.22);
}

.welcome::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 36%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 188, 180, 0.35) 18%,
    rgba(243, 238, 228, 0.75) 42%,
    rgba(198, 165, 110, 0.9) 68%,
    transparent
  );
  box-shadow: 0 0 10px rgba(198, 165, 110, 0.45);
  pointer-events: none;
}

.welcome::backdrop {
  background: rgba(12, 10, 8, 0.78);
}

.welcome[open] {
  z-index: 6;
  animation: welcome-in 280ms ease both;
}

.welcome-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 48px;
  min-height: 48px;
  margin: 0 0 4px auto;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--jh-ivory);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.welcome h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: none;
}

.welcome p {
  margin: 0 0 16px;
  max-width: 28em;
}

.welcome-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-choice {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--jh-line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
}

.welcome-choice:hover,
.welcome-close:hover {
  text-shadow: 0 0 12px rgba(198, 165, 110, 0.45);
  border-color: rgba(198, 165, 110, 0.7);
}

.welcome .welcome-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(198, 165, 110, 0.22);
}

.welcome-soon-note {
  flex: 0 0 auto;
  color: var(--jh-taupe);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome :focus-visible {
  outline: 1px solid var(--jh-ivory);
  outline-offset: 3px;
  box-shadow:
    0 0 0 1px rgba(168, 188, 180, 0.45),
    0 0 14px rgba(198, 165, 110, 0.32);
}

@keyframes welcome-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1 .light-word {
  position: relative;
  z-index: 0;
}

h1 .light-word::after {
  content: attr(data-w);
  position: absolute;
  left: 0;
  top: 0;
  color: transparent;
  text-shadow:
    0 0 7px rgba(243, 238, 228, 1),
    0 0 16px rgba(198, 165, 110, 0.95),
    0 0 28px rgba(198, 165, 110, 0.4);
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

@keyframes laser-scan {
  0% { opacity: 0; transform: translate3d(-1.35rem, 0, 0); }
  8% { opacity: 0.9; }
  86% { opacity: 0.72; }
  100% { opacity: 0; transform: translate3d(100vw, 0, 0); }
}

@keyframes word-light {
  0% { opacity: 0; }
  36% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes link-grow {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .laser {
    animation-name: var(--jh-laser-name);
    animation-duration: var(--jh-laser-duration);
    animation-timing-function: linear;
    animation-delay: var(--jh-laser-delay);
    animation-iteration-count: 1;
    animation-fill-mode: both;
  }

  h1 .light-word::after {
    animation-name: var(--jh-word-name);
    animation-duration: var(--jh-word-duration);
    animation-timing-function: ease;
    animation-delay: calc(var(--jh-word-delay) + (var(--i) * var(--jh-word-step)));
    animation-iteration-count: 1;
    animation-fill-mode: both;
  }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-copy,
  .site-header::after,
  .welcome[open],
  .laser,
  h1 .light-word::after,
  .site-nav a:hover::after,
  .site-nav a:focus-visible::after,
  .site-nav a:active::after,
  .prose a:hover::after,
  .prose a:focus-visible::after,
  .prose a:active::after,
  .section a:hover::after,
  .section a:focus-visible::after,
  .section a:active::after,
  .project a:hover::after,
  .project a:focus-visible::after,
  .project a:active::after,
  .site-footer a:hover::after,
  .site-footer a:focus-visible::after,
  .site-footer a:active::after,
  .contact-link:hover::after,
  .contact-link:focus-visible::after,
  .contact-link:active::after,
  .path:hover strong::after,
  .path:focus-visible strong::after,
  .path:active strong::after,
  .welcome-choice:hover::after,
  .welcome-choice:focus-visible::after,
  .welcome-choice:active::after { animation: none; }

  .site-header::after { opacity: 0.75; }

  .laser { opacity: 0; }

  h1 .light-word::after { opacity: 0; }

  .site-nav a:hover::after,
  .site-nav a:focus-visible::after,
  .site-nav a:active::after,
  .prose a:hover::after,
  .prose a:focus-visible::after,
  .prose a:active::after,
  .section a:hover::after,
  .section a:focus-visible::after,
  .section a:active::after,
  .project a:hover::after,
  .project a:focus-visible::after,
  .project a:active::after,
  .site-footer a:hover::after,
  .site-footer a:focus-visible::after,
  .site-footer a:active::after,
  .contact-link:hover::after,
  .contact-link:focus-visible::after,
  .contact-link:active::after,
  .path:hover strong::after,
  .path:focus-visible strong::after,
  .path:active strong::after,
  .welcome-choice:hover::after,
  .welcome-choice:focus-visible::after,
  .welcome-choice:active::after {
    transform: scaleX(1);
    opacity: 1;
  }
}
