/* John Rand — studio site */

:root {
  --ink: #17191b;
  --ink-muted: #4a5056;
  --paper: #f2f3f4;
  --paper-deep: #e6e8ea;
  --forest: #2a433c;
  --forest-deep: #1e332e;
  --brass: #8a7355;
  --line: rgba(23, 25, 27, 0.14);
  --line-strong: rgba(23, 25, 27, 0.28);
  --white: #fafbfb;
  --max: 1120px;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Syne", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(42, 67, 60, 0.07), transparent 50%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(138, 115, 85, 0.06), transparent 45%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--forest);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
}

/* —— Nav —— */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.site-header.is-solid,
.site-header.page-header {
  background: rgba(242, 243, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header.hero-over {
  color: var(--white);
}

.site-header.hero-over.is-solid {
  color: var(--ink);
}

.nav-inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: inherit;
  opacity: 0.8;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  opacity: 1;
  color: inherit;
}

.nav-links a[aria-current="page"] {
  box-shadow: inset 0 -1.5px 0 currentColor;
}

/* —— Layout —— */

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.section .lede {
  max-width: 38rem;
  color: var(--ink-muted);
  margin: 0 0 2.5rem;
  font-size: 1.2rem;
}

/* —— Hero —— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  animation: hero-drift 28s var(--ease) forwards;
}

@keyframes hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(14, 16, 17, 0.9) 0%, rgba(14, 16, 17, 0.62) 42%, rgba(14, 16, 17, 0.28) 72%, rgba(14, 16, 17, 0.18) 100%),
    linear-gradient(0deg, rgba(14, 16, 17, 0.55) 0%, transparent 40%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 1.5rem;
  max-width: 12ch;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 1rem;
  max-width: 22ch;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.35s forwards;
}

.hero-support {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: rgba(250, 251, 251, 0.82);
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.5s forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.9s var(--ease) 0.65s forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-media img,
  .hero-brand,
  .hero h1,
  .hero-support,
  .hero-cta,
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 0.95rem 1.6rem;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}

.btn:hover {
  color: inherit;
}

.btn-primary {
  background: var(--white);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--paper-deep);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--forest);
  color: var(--white);
}

.btn-solid:hover {
  background: var(--forest-deep);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.9;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

/* —— Capability index (home) —— */

.capability-index {
  border-top: 1px solid var(--line);
}

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.capability-list li {
  border-bottom: 1px solid var(--line);
}

.capability-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.75rem 0;
  text-decoration: none;
  transition: padding-left 0.35s var(--ease);
}

.capability-list a:hover {
  padding-left: 0.5rem;
  color: var(--ink);
}

.capability-list h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.capability-list p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.capability-list .arrow {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brass);
  align-self: center;
  transition: transform 0.3s var(--ease);
}

.capability-list a:hover .arrow {
  transform: translateX(4px);
}

/* —— Split media —— */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .split.reverse {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .split.reverse .split-media {
    order: 2;
  }

  .split.reverse .split-copy {
    order: 1;
  }
}

.split-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-copy h2 {
  max-width: 14ch;
}

/* —— Page hero (inner) —— */

.page-hero {
  padding: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem)) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}

.page-hero .lede {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-muted);
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

/* —— Prose —— */

.prose {
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
}

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

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.detail-grid {
  display: grid;
  gap: 2rem 3rem;
  margin-top: 3rem;
}

@media (min-width: 700px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-grid h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.detail-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.fit-block {
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.fit-block .section-label {
  margin-bottom: 0.75rem;
}

.fit-block + .steps {
  margin-top: 2.5rem;
}

.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--brass);
  padding-top: 0.2rem;
}

.steps h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

/* —— CTA band —— */

.cta-band {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  max-width: 18ch;
  color: var(--white);
}

.cta-band p {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  color: rgba(250, 251, 251, 0.72);
}

/* —— Contact —— */

.contact-panel {
  max-width: 40rem;
  padding: 2.5rem 0 1rem;
}

.contact-panel > p {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.contact-expect {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.contact-expect li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.contact-expect li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-expect h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.contact-expect p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.contact-email {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-email a {
  color: var(--forest);
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}

/* —— Footer —— */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.footer-inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  text-decoration: none;
}

/* —— Reveal —— */

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Mobile nav —— */

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
    z-index: 60;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(242, 243, 244, 0.98);
    color: var(--ink);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
  }

  .nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .site-header.hero-over.nav-open {
    color: var(--ink);
  }

  .capability-list a {
    grid-template-columns: 1fr;
  }

  .capability-list .arrow {
    display: none;
  }
}
