/* JB Developments: one dark room, lit work, brand yellow on the action only. */
:root {
  --bg: #0c0b09;
  --surface: #17150f;
  --ink: #edebe6;
  --muted: #bdb6a8;
  --accent: #ffd801;
  --on-accent: #0c0b09;

  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Onest", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 0.95rem + 1.1vw, 2rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: calc((100vw - 2 * var(--margin)) / 12.1);

  --margin: clamp(16px, 2vw, 32px);
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.55 var(--text);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { padding-inline: var(--margin); }
.soft { color: var(--muted); }
.section-title {
  font: 800 var(--step-head)/1 var(--display);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--on-accent);
  font: 500 var(--step-body)/1 var(--text);
  text-decoration: none; border: 0; border-radius: 0;
  transition: transform .2s var(--ease), background-color .2s;
}
.button:hover { background: var(--ink); }
.button:active { transform: scale(.97); }
.text-link { text-decoration-thickness: 2px; text-underline-offset: 5px; transition: color .2s; }
.text-link:hover { color: var(--accent); }

/* Hero: name under a photograph */
.hero-stage { position: relative; min-height: 100svh; display: grid; grid-template-rows: 58svh 1fr; overflow: hidden; }
.house-canvas, .explode-title, .house-labels { display: none; }

/* With the 3D house running (js/house.js): the hero pins for a few screens while the house lifts apart. */
.has-house { height: 340svh; }
.has-house .hero-stage { position: sticky; top: 0; height: 100svh; display: block; }
.has-house .hero-photo { display: none; }
.has-house .house-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.has-house .hero-band { position: absolute; left: 0; right: 0; bottom: 0; gap: 24px; }
.has-house .hero-name { animation: none; }
.has-house .explode-title { display: block; position: absolute; left: var(--margin); top: 50%; transform: translateY(-50%); max-width: 9.5em; opacity: 0; }
.has-house .house-labels { display: block; }
.house-labels li { position: absolute; left: 0; top: 0; opacity: 0; padding-left: 22px; white-space: nowrap; }
.house-labels li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; background: var(--accent); }
.house-labels strong { display: block; font-weight: 500; font-size: var(--step-lead); line-height: 1.2; }
.house-labels span { color: var(--muted); font-size: var(--step-small); }
.hero-photo {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  filter: brightness(.85) contrast(1.05);
  animation: drift 24s var(--ease) both;
}
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-band { display: flex; flex-direction: column; justify-content: space-between; padding: 24px var(--margin) 28px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.hero-lead { max-width: 34ch; font-size: max(18px, var(--step-body)); }
.hero-name {
  font: 800 var(--step-display)/.85 var(--display);
  letter-spacing: -0.05em; text-transform: uppercase;
  white-space: nowrap; transform-origin: 0 100%;
}
.hero-name span:first-child { color: var(--accent); }

.nav { position: absolute; top: 24px; right: var(--margin); }
.nav ul { display: flex; gap: 28px; }
.nav a {
  font-size: var(--step-small); text-decoration: none; color: var(--ink);
  background: rgba(12, 11, 9, .72); padding: 8px 10px;
  transition: background-color .2s, color .2s;
}
.nav a:hover { background: var(--accent); color: var(--on-accent); }
.nav-toggle { display: none; }

/* Work: full panels, one midline row */
.work { padding-top: var(--section); }
.work .section-title { margin-bottom: 48px; }
.panel { position: relative; height: 100svh; overflow: hidden; background: var(--bg); }
.panel img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.85) contrast(1.05); }
.panel-row {
  position: absolute; left: 0; right: 0; top: calc(50% - 45px); height: 90px;
  display: grid; grid-template-columns: 10% 1fr auto; align-items: center; gap: 16px;
  padding-inline: var(--margin);
  background: rgba(12, 11, 9, .78); font-size: var(--step-small);
}
.panel-row h3 { font: 800 var(--step-lead)/1.05 var(--display); letter-spacing: -0.03em; text-transform: uppercase; }

/* How a job runs: drag row of moments */
.process { padding-top: var(--section); }
.process-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.process-buttons { display: flex; gap: 8px; }
.square {
  width: 48px; height: 48px; border: 0; border-radius: 0;
  background: var(--surface); color: var(--ink); font-size: 1.25rem; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.square:hover { background: var(--accent); color: var(--on-accent); }
.square:active { transform: scale(.94); }
.progress { height: 6px; background: var(--surface); margin-bottom: 40px; }
.progress span { display: block; height: 100%; width: 20%; background: var(--ink); transform-origin: 0 50%; }
.moments {
  display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 24px;
  scrollbar-width: none; cursor: grab;
}
.moments::-webkit-scrollbar { display: none; }
.moments.dragging { cursor: grabbing; scroll-snap-type: none; }
.moments li { flex: 0 0 clamp(260px, 26vw, 380px); scroll-snap-align: start; display: flex; flex-direction: column; }
.moments h3 { font: 500 var(--step-lead)/1.2 var(--text); margin-bottom: 8px; }
.moments p { color: var(--muted); }
.moments img { margin-top: var(--gap); aspect-ratio: 4 / 5; width: 100%; object-fit: cover; pointer-events: none; user-select: none; }

/* Services: line-up at one size */
.services { padding-top: var(--section); }
.lineup { margin-top: 24px; font-size: var(--step-lead); line-height: 1.5; }
.lineup h3 { font: inherit; color: var(--accent); margin: 72px 0 20px; position: sticky; top: 0; background: var(--bg); padding-block: 8px; z-index: 1; }
.lineup li { display: grid; grid-template-columns: 50% 1fr; }
.lineup li span:last-child { color: var(--muted); }

/* About: logo as drop cap */
.about { padding-top: var(--section); display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.about-facts { grid-column: 1 / 3; font-size: var(--step-small); color: var(--muted); display: grid; gap: 8px; align-content: start; padding-top: calc(var(--step-head) + 32px); }
.about-text { grid-column: 3 / 13; }
.about-text .section-title { margin-bottom: 32px; }
.about-text p { font-size: var(--step-lead); line-height: 1.25; max-width: 48ch; }
.about-text .about-more { font-size: var(--step-body); line-height: 1.55; color: var(--ink); margin-top: 32px; max-width: 52ch; clear: left; }
.about-text p:first-of-type { color: var(--muted); }
.about-text strong { color: var(--ink); font-weight: 500; }
.about-text p img { float: left; width: 3.75em; height: 3.75em; margin: .2em .5em 0 0; }

/* FAQ: questions beside a tall photograph */
.faq { margin-top: var(--section); background: var(--surface); padding-bottom: 80px; }
.faq-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.faq-text { grid-column: 1 / 6; padding-top: 96px; }
.faq-facts { margin: 24px 0 40px; display: grid; gap: 4px; }
.faq details { margin-bottom: 28px; }
.faq summary {
  font-size: 1.25rem; font-weight: 500; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none; margin-right: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); padding-top: 8px; max-width: 46ch; }
.faq-actions { display: flex; gap: 24px; align-items: center; margin-top: 40px; }
.faq-photos { grid-column: 7 / 13; position: relative; margin-top: -64px; }
.faq-photos .tall { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.faq-photos .square { position: absolute; width: 34%; aspect-ratio: 1; object-fit: cover; left: -40px; bottom: -40px; }

/* Contact: the number as display type, on the brand yellow */
.contact { background: var(--accent); color: var(--on-accent); }
.contact-inner { display: grid; gap: clamp(56px, 12vh, 140px); padding-block: 96px 32px; }
.contact-ask { font: 500 var(--step-lead)/1.2 var(--text); max-width: 22ch; }
.contact-phone {
  text-decoration: none;
  font: 800 calc((100vw - 2 * var(--margin)) / 8.8)/1 var(--display); letter-spacing: -0.04em;
  white-space: nowrap; font-variant-numeric: tabular-nums; transition: opacity .2s;
}
.contact-phone:hover { opacity: .75; }
.contact-foot { display: flex; justify-content: space-between; font-size: var(--step-small); }

/* Footer: a single quiet line */
.footer {
  margin-top: 96px; padding-bottom: 30px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; font-size: var(--step-small);
}
.footer > :last-child { text-align: right; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* Phone composition */
@media (max-width: 760px) {
  .hero-stage { grid-template-rows: 50svh 1fr; }
  .has-house .explode-title { top: 76px; transform: none; font-size: 1.5rem; max-width: none; }
  .house-labels strong { font-size: 1rem; }
  .house-labels span { display: none; }
  .hero-band { padding: 20px var(--margin) 16px; gap: 24px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-name { font-size: calc((100vw - 2 * var(--margin)) / 10.4); line-height: .9; white-space: normal; }
  .hero-name span { display: block; }
  .nav { top: 16px; }
  .nav-toggle {
    display: block; min-height: 44px; padding: 0 14px; border: 0; border-radius: 0;
    background: rgba(12, 11, 9, .8); color: var(--ink); font: 500 var(--step-small) var(--text); margin-left: auto;
  }
  .nav ul { display: none; flex-direction: column; gap: 4px; margin-top: 8px; align-items: flex-end; }
  .nav.open ul { display: flex; }
  .nav a { display: block; padding: 12px 14px; }
  .panel { height: 82svh; }
  .panel-row {
    top: auto; bottom: 20px; height: auto; padding-block: 12px;
    grid-template-columns: 1fr auto; grid-template-areas: "t t" "a b"; row-gap: 4px;
  }
  .panel-row h3 { grid-area: t; font-size: 1.375rem; }
  .panel-row span { font-size: .8125rem; }
  .process-buttons { display: none; }
  .moments { gap: 16px; }
  .moments li { flex-basis: 72vw; }
  .moments img { margin-top: calc(var(--gap) / 2.5); }
  .lineup li { grid-template-columns: 1fr; margin-bottom: 18px; line-height: 1.3; }
  .lineup li span:last-child { font-size: .875rem; }
  .about-text p:first-of-type { font-size: 1.375rem; }
  .about-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 32px; }
  .about { display: flex; flex-direction: column-reverse; }
  .faq-grid { display: flex; flex-direction: column-reverse; }
  .faq-text { padding-top: 48px; }
  .faq-photos { margin-top: 0; margin-inline: calc(-1 * var(--margin)); }
  .faq-photos .tall { aspect-ratio: 4 / 5; }
  .faq-photos .square { width: 38%; left: auto; right: var(--margin); bottom: -32px; }
  .faq-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-foot { flex-direction: column; gap: 12px; }
  .footer { margin-top: 64px; grid-template-columns: 1fr; gap: 8px; }
  .footer > :last-child { text-align: left; }
}

/* Motion: signature scaling wordmark, entrances; nothing travels for reduced motion */
@supports (animation-timeline: view()) {
  .hero-name { animation: settle linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes settle { to { transform: scale(.93); } }
}
.js [data-rise] > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-rise].in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .js [data-rise] > * { transform: none; transition: opacity .3s; }
}
