/* Juniper Development Group - public site */
:root {
  --midnight: #1C2340;
  --midnight-deep: #151A31;
  --forest: #1E3D2F;
  --brass: #B8975A;
  --brass-light: #D6BF92;
  --brass-text: #856530;
  --sage: #7A9E8C;
  --dew: #C4D4CA;
  --chalk: #F0F1F5;
  --slate: #3D4C7A;
  --mist: #C8D0E8;
  --ink: #39465A;
  --body: #48504C;
  --muted: #808894;
  --hair: #D3D6CE;
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 12vw, 168px);
  color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--midnight); margin: 0; line-height: 1.12; letter-spacing: -0.005em; }
h2 { font-size: clamp(34px, 4.4vw, 56px); text-wrap: balance; }
h3 { font-size: 28px; }
p { margin: 0 0 1.1em; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin: 0 0 22px;
}
.eyebrow-light { color: var(--brass-light); }
.rule { display: block; width: 56px; height: 1px; background: var(--brass); margin: 0 0 32px; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 30px;
  border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-brass { background: var(--brass); color: var(--midnight); }
.btn-brass:hover { background: var(--brass-light); }
.btn-text {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(255,255,255,.35);
  transition: border-color .25s ease;
}
.btn-text:hover { border-color: var(--brass-light); }
.btn-text span { display: inline-block; transition: transform .25s ease; }
.btn-text:hover span { transform: translateX(4px); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
  padding: 28px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; display: block; height: 26px; }
.brand img { height: 26px; width: auto; transition: opacity .35s ease; }
.brand .logo-dark { position: absolute; top: 0; left: 0; height: 32px; top: -3px; opacity: 0; }
.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.site-nav a:hover { border-color: var(--brass-light); }

.site-header.is-solid {
  background: rgba(240,241,245,.96);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--hair);
  padding: 16px 0;
}
.site-header.is-solid .logo-light { opacity: 0; }
.site-header.is-solid .logo-dark { opacity: 1; }
.site-header.is-solid .site-nav a { color: var(--midnight); }
.site-header.is-solid .site-nav a:hover { border-color: var(--brass); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 1px; background: #fff; transition: transform .3s ease, background .3s ease; }
.nav-toggle span + span { margin-top: 8px; }
.site-header.is-solid .nav-toggle span { background: var(--midnight); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: max(100svh, 600px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--midnight);
  color: #fff;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  filter: saturate(.95) contrast(1.03);
  transform: scale(1.04);
  animation: hero-settle 2.4s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes hero-settle { to { transform: scale(1); } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(28,35,64,.72) 0%, rgba(28,35,64,.42) 40%, rgba(28,35,64,0) 68%),
    linear-gradient(180deg, rgba(28,35,64,.7) 0%, rgba(28,35,64,.2) 15%, rgba(28,35,64,0) 28%, rgba(28,35,64,.45) 46%, rgba(28,35,64,.88) 70%, rgba(28,35,64,.97) 100%);
}
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(52px, 7vh, 96px); }
.hero h1 {
  color: #fff;
  font-size: clamp(46px, min(6.4vw, 9.5svh), 96px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.hero .eyebrow, .hero-lede { text-shadow: 0 1px 14px rgba(28,35,64,.55); }
.hero-lede { max-width: 640px; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.55; color: var(--mist); margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 36px; }
.hero-scroll {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 48px;
  width: 1px; height: 64px; background: rgba(255,255,255,.25); overflow: hidden;
}
.hero-scroll span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--brass-light); animation: scroll-line 2.2s ease-in-out infinite; }
@keyframes scroll-line { to { top: 100%; } }

/* About */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(48px, 8vw, 128px); align-items: start; }
.statement { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.14; }
.about-body { padding-top: 46px; font-size: 21px; line-height: 1.7; }
.about-body p:last-child { margin-bottom: 0; }

/* Design */
.design { background: var(--chalk); }
.design .about-grid { grid-template-columns: 1fr 1.15fr; row-gap: 0; }
.design .design-eyebrow { grid-column: 1; grid-row: 1; margin: 0; }
.design .about-body { grid-column: 1; grid-row: 2; padding-top: 38px; }
.design .design-statement { grid-column: 2; grid-row: 1 / span 2; margin-top: 34px; }
.principles { list-style: none; margin: clamp(64px, 8vw, 104px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(32px, 4vw, 56px); }
.principles li { border-top: 1px solid rgba(28,35,64,.18); padding-top: 30px; }
.principles h3 { font-size: 26px; margin-bottom: 14px; }
.principles p { font-size: 18px; line-height: 1.65; margin: 0; }
.js .principles li.reveal:nth-child(2) { transition-delay: .08s; }
.js .principles li.reveal:nth-child(3) { transition-delay: .16s; }

/* Approach */
.approach { background: #fff; }
.section-head { max-width: 760px; margin-bottom: clamp(56px, 7vw, 88px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(28,35,64,.16); }
.steps li { padding: 40px 32px 8px 0; position: relative; }
.steps li + li { padding-left: 32px; border-left: 1px solid rgba(28,35,64,.10); }
.step-num { display: block; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--brass-text); margin-bottom: 26px; }
.steps h3 { margin-bottom: 16px; }
.steps p { font-size: 18px; line-height: 1.65; margin: 0; }

/* Place band */
.place { position: relative; min-height: clamp(420px, 56vw, 680px); display: flex; align-items: center; overflow: hidden; background: var(--midnight); }
.place-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.85); }
.place-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21,26,49,.9) 0%, rgba(21,26,49,.78) 38%, rgba(21,26,49,.3) 62%, rgba(21,26,49,.05) 85%); }
.place-content { position: relative; z-index: 2; }
.place h2 { color: #fff; font-size: clamp(36px, 4.8vw, 64px); max-width: 820px; }

/* Projects (populated from js/projects.js) */
.projects { background: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 56px 40px; }
.project-card { text-decoration: none; color: inherit; display: block; }
.project-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--chalk); margin-bottom: 22px; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project-card:hover .project-media img { transform: scale(1.035); }
.project-status { font-family: var(--sans); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass-text); margin: 0 0 10px; }
.project-card h3 { font-size: 30px; margin-bottom: 6px; }
.project-meta { color: var(--muted); font-size: 17px; margin: 0; }

/* Contact */
.contact { background: var(--midnight); color: var(--mist); }
.contact h2 { color: #fff; margin-bottom: 26px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 128px); align-items: end; }
.contact-lede { font-size: 21px; max-width: 470px; margin: 0; }
.contact-email {
  display: inline-block;
  font-size: clamp(26px, 2.8vw, 38px);
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(205,179,131,.5);
  padding-bottom: 4px;
  margin-bottom: 36px;
  word-break: break-word;
  transition: color .25s ease, border-color .25s ease;
}
.contact-email:hover { color: var(--brass-light); border-color: var(--brass-light); }
.contact-card .contact-email { display: table; }
.contact-card .contact-phone { margin-top: -18px; }
.rule-brass { background: var(--brass); margin-bottom: 26px; }
.contact-meta { font-size: 19px; line-height: 1.6; margin: 0; }

/* Footer */
.site-footer { background: var(--midnight-deep); color: rgba(200,208,232,.6); padding: 44px 0 48px; font-family: var(--sans); font-size: 12px; letter-spacing: .04em; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; }
.footer-logo { height: 18px; width: auto; opacity: .9; margin-right: auto; }
.site-footer p { margin: 0; }
.site-footer a { color: rgba(200,208,232,.85); }
.site-footer .credit-link { color: rgba(200,208,232,.72); text-decoration: none; border-bottom: 1px solid rgba(200,208,232,.3); }
.site-footer .credit-link:hover { color: #fff; }

/* Credits page */
.credits-page { background: var(--chalk); min-height: 100vh; padding: 56px 0 96px; }
.credits-page .brand-link img { height: 34px; width: auto; margin-bottom: 64px; }
.credits-page h1 { font-size: 44px; margin-bottom: 40px; }
.credits-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.credits-list li { padding: 24px 0; border-top: 1px solid var(--hair); font-size: 18px; }
.credits-list img { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 14px; }
.credits-list a, .credits-back { color: var(--midnight); }
.credits-back { display: inline-block; margin-top: 40px; font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .steps li.reveal:nth-child(2) { transition-delay: .08s; }
.js .steps li.reveal:nth-child(3) { transition-delay: .16s; }
.js .steps li.reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { animation: none; transform: none; }
  .hero-scroll span { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet */
@media (max-width: 1020px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid rgba(28,35,64,.10); margin-top: 32px; }
}

/* Mobile */
@media (max-width: 820px) {
  body { font-size: 18px; }
  .site-header { padding: 20px 0; }
  .nav-toggle { display: block; position: relative; z-index: 3; }
  .site-nav {
    position: fixed; inset: 0; z-index: 2;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px; padding: 0 var(--gutter);
    background: var(--midnight);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
  }
  .site-nav a, .site-header.is-solid .site-nav a { color: #fff; font-family: var(--serif); font-size: 34px; letter-spacing: 0; text-transform: none; font-weight: 400; }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .nav-open .nav-toggle span { background: #fff !important; }
  .nav-open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav-open .brand { z-index: 3; }
  .nav-open .logo-light { opacity: 1 !important; }
  .nav-open .logo-dark { opacity: 0 !important; }
  .nav-open.site-header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  .hero-img { object-position: 50% 50%; }
  .hero { min-height: max(100svh, 640px); }
  .hero-shade { background:
    linear-gradient(0deg, rgba(28,35,64,.97) 0px, rgba(28,35,64,.9) 300px, rgba(28,35,64,.72) 470px, rgba(28,35,64,0) 640px),
    linear-gradient(180deg, rgba(28,35,64,.65) 0px, rgba(28,35,64,0) 140px); }
  .hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .hero-content { padding-bottom: 56px; }
  .hero-lede { margin-bottom: 36px; }
  .hero-actions { gap: 18px 28px; }
  .hero-scroll { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .design .about-grid { grid-template-columns: 1fr; }
  .design .design-eyebrow, .design .design-statement, .design .about-body { grid-column: auto; grid-row: auto; }
  .design .design-eyebrow { margin-bottom: 22px; }
  .design .design-statement { margin-top: 0; }
  .design .about-body { padding-top: 0; }
  .design .about-grid { row-gap: 0; }
  .design .design-statement { margin-bottom: 48px; }
  .principles { grid-template-columns: 1fr; gap: 36px; }
  .principles li { padding-top: 24px; }
  .about-body { padding-top: 0; font-size: 19px; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li, .steps li + li { padding: 32px 0 0; border-left: 0; border-top: 1px solid rgba(28,35,64,.14); margin-top: 0; }
  .steps li + li { margin-top: 36px; }
  .step-num { margin-bottom: 14px; }
  .place h2 { font-size: 34px; }
  .place h2 br { display: none; }
  .place { min-height: 580px; align-items: flex-start; }
  .place-content { padding-top: 64px; }
  .place-img { object-position: 45% 50%; }
  .place-shade { background: linear-gradient(180deg, rgba(21,26,49,.9) 0%, rgba(21,26,49,.82) 34%, rgba(21,26,49,.3) 56%, rgba(21,26,49,.05) 100%); }
  .project-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
