/* =========================================================
   JUNIPER PIXEL COMMERCE
   Digital shelf / merchandising board identity
   HTML5 + CSS3 only
   ========================================================= */

:root {
  --juniper: #233a34;
  --juniper-deep: #182c27;
  --ivory: #f5f1e8;
  --charcoal: #1b201e;
  --coral: #c76a4a;
  --coral-dark: #a65439;
  --sage: #a9bdb3;
  --gold: #d4a955;
  --violet: #625a78;
  --white: #ffffff;
  --muted: #68706c;
  --line: rgba(27,32,30,0.14);
  --light-line: rgba(255,255,255,0.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --shell: min(1240px, calc(100% - 64px));
  --section-space: 78px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a { color: inherit; }

button,
input,
select,
textarea { font: inherit; }

::selection {
  background: var(--coral);
  color: white;
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section { padding: var(--section-space) 0; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-170%);
  padding: 10px 14px;
  background: var(--charcoal);
  color: white;
  text-decoration: none;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,241,232,0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 34px;
  align-items: center;
}

.brand {
  display: inline-grid;
  line-height: 0.92;
  text-decoration: none;
}

.brand-main {
  color: var(--juniper);
  font: 700 1.12rem/1 var(--serif);
  letter-spacing: -0.035em;
}

.brand-sub {
  margin-top: 6px;
  color: var(--coral);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 28px);
}

.desktop-nav a {
  position: relative;
  color: #5e645f;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--coral);
  transition: right 160ms ease;
}

.desktop-nav a:hover::after { right: 0; }
.mobile-nav { display: none; }

/* Typography + controls */
.eyebrow {
  margin: 0 0 16px;
  color: var(--coral);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow-light { color: #efb29c; }

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2 {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 820px;
  font-size: clamp(4rem, 7vw, 7.2rem);
}

h2 { font-size: clamp(2.4rem, 4.4vw, 4.5rem); }

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.15;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--coral);
  color: white;
}

.button-primary:hover { background: var(--coral-dark); }

.button-outline {
  border-color: var(--charcoal);
  background: transparent;
}

.button-outline:hover {
  background: var(--charcoal);
  color: white;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
  font-weight: 900;
  text-underline-offset: 5px;
}

.text-link span { transition: transform 160ms ease; }
.text-link:hover span { transform: translateX(4px); }
.text-link-light { color: white; }

/* Hero */
.hero {
  padding: 54px 0 72px;
  background:
    linear-gradient(rgba(35,58,52,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,58,52,0.03) 1px, transparent 1px),
    var(--ivory);
  background-size: 46px 46px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 58px;
  align-items: center;
}

.hero-lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.4vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.hero-tags span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.48);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-board {
  position: relative;
  min-height: 620px;
  padding: 0 0 78px 78px;
}

.hero-image {
  height: 560px;
  margin: 0;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 5%, 94% 100%, 6% 94%);
}

.shelf-map {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(390px, 76%);
  background: var(--juniper);
  color: white;
  box-shadow: 0 18px 38px rgba(35,58,52,0.14);
}

.map-kicker {
  display: block;
  padding: 15px 18px;
  border-bottom: 1px solid var(--light-line);
  color: #efb29c;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.map-row {
  display: grid;
  grid-template-columns: 38px 1fr 72px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--light-line);
}

.map-row:last-child { border-bottom: 0; }

.map-row b {
  color: #efb29c;
  font-size: 0.62rem;
}

.map-row span {
  font-size: 0.81rem;
  font-weight: 800;
}

.map-row i {
  height: 2px;
  background: linear-gradient(90deg, var(--sage), transparent);
}

/* Intro + services */
.intro-services { background: white; }

.intro-services-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 70px;
  align-items: start;
}

.intro-column {
  position: sticky;
  top: 118px;
}

.intro-column .lead { color: var(--muted); }

.service-board { border-top: 1px solid var(--line); }

.service-board article {
  display: grid;
  grid-template-columns: 46px 1fr 170px;
  gap: 18px;
  align-items: center;
  min-height: 142px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.service-board article > span {
  color: var(--coral);
  font-size: 0.64rem;
  font-weight: 900;
}

.service-kicker {
  margin-bottom: 4px;
  color: var(--juniper);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.service-board h3 {
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.service-board p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.service-board figure {
  height: 106px;
  margin: 0;
  overflow: hidden;
}

/* Work */
.work { background: var(--ivory); }

.work-heading {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 54px;
  align-items: end;
  margin-bottom: 38px;
}

.work-heading > p { color: var(--muted); }

.project-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr 0.92fr;
  gap: 12px;
}

.project {
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
}

.project-large { grid-row: span 2; }
.project-wide { grid-column: 2 / 4; }

.project figure {
  height: 285px;
  margin: 0;
  overflow: hidden;
}

.project-large figure { height: 520px; }
.project-wide figure { height: 300px; }

.project-copy { padding: 18px; }

.project-copy > span {
  color: var(--coral);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 8px 0 5px;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.project-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.case-study {
  display: grid;
  grid-template-columns: 1.14fr 0.86fr;
  gap: 18px;
  margin-top: 22px;
  background: white;
  border: 1px solid var(--line);
}

.case-image {
  min-height: 560px;
  overflow: hidden;
}

.case-copy {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-copy > p:not(.eyebrow) { color: var(--muted); }

.case-points {
  margin: 26px 0;
  border-top: 1px solid var(--line);
}

.case-points article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.case-points article > span {
  color: var(--coral);
  font-size: 0.63rem;
  font-weight: 900;
}

.case-points h3 { margin-bottom: 4px; }

.case-points p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Process */
.process { background: var(--sage); }

.process-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 64px;
  align-items: start;
}

.process-copy > p:not(.eyebrow) { color: #55625d; }

.process-rail {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(35,58,52,0.18);
}

.process-rail li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(35,58,52,0.18);
}

.process-rail li > span {
  color: var(--coral);
  font-size: 0.64rem;
  font-weight: 900;
}

.process-rail strong {
  display: block;
  margin-bottom: 4px;
}

.process-rail p {
  margin: 0;
  color: #55625d;
  font-size: 0.82rem;
}

/* Principles + feature */
.principles-feature { background: white; }

.principles-feature-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.principles-panel {
  padding: 34px;
  border: 1px solid var(--line);
}

.principle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.principle-grid article {
  min-height: 178px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-grid span {
  color: var(--coral);
  font-size: 0.62rem;
  font-weight: 900;
}

.principle-grid h3 { margin: 26px 0 6px; }

.principle-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.visual-feature {
  display: grid;
  grid-template-rows: 1.08fr 0.92fr;
  background: var(--violet);
  color: white;
}

.visual-feature figure {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.visual-feature-copy { padding: 30px; }
.visual-feature-copy .eyebrow { color: #efb29c; }

.visual-feature-copy > p:not(.eyebrow) {
  color: rgba(255,255,255,0.66);
}

/* About */
.about { background: var(--ivory); }

.about-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 50px;
  align-items: stretch;
}

.about-copy > p:not(.eyebrow) { color: var(--muted); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.value-grid article {
  min-height: 175px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-grid span {
  color: var(--coral);
  font-size: 0.62rem;
  font-weight: 900;
}

.value-grid h3 { margin: 26px 0 5px; }

.value-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.about-image {
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  clip-path: polygon(0 0, 94% 0, 100% 92%, 7% 100%);
}

/* Contact */
.contact { background: var(--sage); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
}

.studio-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
  background:
    linear-gradient(rgba(35,58,52,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,58,52,0.05) 1px, transparent 1px),
    var(--gold);
  background-size: 40px 40px;
}

.studio-panel > p:not(.eyebrow) { color: #594c36; }

.studio-panel address {
  display: grid;
  gap: 5px;
  margin: 24px 0;
  padding-left: 16px;
  border-left: 3px solid var(--coral);
  font-style: normal;
}

.studio-panel address span { color: #594c36; }
.demo-note { font-size: 0.75rem; }

.form-panel {
  padding: 34px;
  background: white;
  box-shadow: 0 18px 38px rgba(27,32,30,0.07);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(27,32,30,0.22);
  border-radius: 0;
  background: white;
  color: var(--charcoal);
}

.field input,
.field select {
  min-height: 46px;
  padding: 0 11px;
}

.field textarea {
  min-height: 140px;
  padding: 10px 11px;
  resize: vertical;
}

/* Final CTA */
.final-cta {
  padding: 64px 0;
  background: var(--juniper);
  color: white;
}

.final-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: end;
}

.final-cta h2 { color: white; }

.final-cta p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255,255,255,0.65);
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

/* Footer */
.site-footer {
  padding: 46px 0 22px;
  background: #101513;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 0.84fr 1fr;
  gap: 52px;
}

.footer-brand {
  display: grid;
  align-content: start;
}

.footer-brand .brand-main { color: white; }
.footer-brand .brand-sub { color: #efb29c; }

.footer-brand p {
  margin: 20px 0 0;
  color: rgba(255,255,255,0.52);
  font-size: 0.82rem;
}

.footer-nav {
  display: grid;
  gap: 7px;
}

.footer-nav a {
  color: rgba(255,255,255,0.68);
  font-size: 0.78rem;
  text-decoration: none;
}

.footer-address {
  display: grid;
  gap: 4px;
  font-style: normal;
}

.footer-address strong { margin-bottom: 7px; }

.footer-address span {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--light-line);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,0.42);
  font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 1120px) {
  :root { --shell: min(100% - 42px, 1020px); }

  .hero-grid { grid-template-columns: 0.86fr 1.14fr; }

  .project-grid { grid-template-columns: 1fr 1fr; }

  .project-large { grid-row: auto; }
  .project-wide { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  :root {
    --shell: calc(100% - 34px);
    --section-space: 68px;
  }

  .desktop-nav { display: none; }

  .header-row { grid-template-columns: 1fr auto; }

  .mobile-nav {
    display: block;
    border-top: 1px solid var(--line);
  }

  .mobile-nav-track {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-nav-track::-webkit-scrollbar { display: none; }

  .mobile-nav a {
    flex: 0 0 auto;
    font-size: 0.67rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
  }

  .hero-grid,
  .intro-services-grid,
  .case-study,
  .process-grid,
  .principles-feature-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .intro-column { position: static; }
  .work-heading { grid-template-columns: 1fr; }

  .about-image {
    min-height: 460px;
    clip-path: none;
  }

  .final-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .footer-address {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--light-line);
  }
}

@media (max-width: 700px) {
  :root {
    --shell: calc(100% - 26px);
    --section-space: 56px;
  }

  .site-header {
    position: relative;
    backdrop-filter: none;
  }

  .header-row { min-height: 72px; }

  .header-row .button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.61rem;
  }

  h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  h2 { font-size: clamp(2.2rem, 11vw, 3.35rem); }

  .hero { padding-top: 28px; }

  .hero-board {
    min-height: 500px;
    padding-left: 0;
  }

  .hero-image {
    height: 410px;
    clip-path: none;
  }

  .shelf-map { width: min(350px, 94%); }

  .service-board article {
    grid-template-columns: 38px 1fr;
  }

  .service-board figure {
    grid-column: 2;
    width: 100%;
    height: 180px;
  }

  .project-grid,
  .principle-grid,
  .value-grid,
  .field-pair {
    grid-template-columns: 1fr;
  }

  .project-wide { grid-column: auto; }

  .project figure,
  .project-large figure,
  .project-wide figure { height: 310px; }

  .case-image { min-height: 380px; }

  .final-actions { align-items: stretch; }
  .final-actions .button { width: 100%; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-address { grid-column: auto; }
}

@media (max-width: 390px) {
  :root { --shell: calc(100% - 20px); }

  .brand-main { font-size: 0.95rem; }
  .brand-sub { font-size: 0.42rem; }

  .hero-board { min-height: 460px; }

  .map-row {
    grid-template-columns: 34px 1fr 48px;
    padding-inline: 14px;
  }

  .case-copy,
  .principles-panel,
  .visual-feature-copy,
  .studio-panel,
  .form-panel { padding: 26px; }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
