/* =========================================================
   Black Pines Creative Services — stylesheet
   Font: Jost (free Google Font substitute for Gill Sans)
   ========================================================= */

:root {
  --navy: #204e81;
  --teal: #00accb;
  --orange: #f05235;
  --black: #000000;
  --white: #ffffff;
  --gray-about: #b2b2b2;
  --font: 'Jost', 'Gill Sans', 'Gill Sans MT', Arial, sans-serif;

  /* pt-to-px sizes from spec (1pt = 1px design intent) */
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-23: 1.4375rem;
  --fs-25: 1.5625rem;
  --fs-50: 3.125rem;

  --nav-height: 55px;
  --max-width: 1440px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: #1a1a1a;
  background: var(--white);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 28px;
}
.section-heading h2 {
  font-weight: 600;
  font-size: var(--fs-50);
  margin: 0;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.section-heading__line { flex: 1; height: 2px; }
.section-heading__line--white { background: var(--white); }
.section-heading__line--orange { background: var(--orange); }
.section-heading--white h2 { color: var(--white); }
.section-heading--orange h2 { color: var(--orange); }

/* ============ SECTION 1: NAV ============ */
.navbar {
  background: var(--navy);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.navbar__inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__contact {
  font-weight: 300;
  font-size: var(--fs-18);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.navbar__contact a:hover,
.navbar__contact a:focus-visible { text-decoration: underline; }
.navbar__divider { opacity: 0.6; }

.navbar__links {
  display: flex;
  gap: 28px;
  font-weight: 300;
  font-size: var(--fs-18);
}
.navbar__links a {
  color: var(--white);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms ease, opacity 200ms ease;
}
.navbar__links a:hover,
.navbar__links a:focus-visible {
  border-color: var(--white);
  outline: none;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
}

/* ============ SECTION 2: HERO ============ */
.hero {
  position: relative;
  min-height: 628px;
  background: #0c1428;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 40px 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  min-height: 628px;
}
.hero__left {
  flex: 1 1 560px;
  max-width: 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.hero__logo {
  width: 240px;
  align-self: center;
  margin: 0 0 18px;
}
.hero__headline {
  font-weight: 600;
  font-size: var(--fs-50);
  color: var(--white);
  text-align: center;
  width: 100%;
  margin: 0 0 20px;
  line-height: 1.15;
}
.hero__compass {
  width: 100%;
  max-width: 520px;
  align-self: center;
  margin: 0 0 24px;
}
.hero__copy {
  font-weight: 400;
  font-size: var(--fs-18);
  color: var(--white);
  text-align: left;
  max-width: 560px;
  margin: 0;
}
.hero__info-owl {
  position: absolute;
  bottom: 0;
  right: 190px;
  width: 560px;
  max-width: 44%;
}

/* ============ SECTION 3: BODY ============ */
.body-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.col-left {
  flex: 1 1 785px;
  max-width: 785px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.col-right {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- info strip --- */
.info-strip {
  background: var(--navy);
  height: 97px;
  display: flex;
}
.info-strip__box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.5);
  text-align: center;
  padding: 0 12px;
}
.info-strip__box:last-child { border-right: none; }
.info-strip__top {
  font-size: var(--fs-23);
  color: var(--teal);
  font-weight: 400;
  line-height: 1.3;
}
.info-strip__bottom {
  font-size: var(--fs-20);
  color: var(--teal);
  font-weight: 400;
  line-height: 1.3;
}

/* --- about block --- */
.about-block {
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-color: var(--gray-about);
  padding: 40px 40px 48px;
  min-height: 545px;
}
.about-block__copy {
  max-width: 700px;
}
.about-block__copy p {
  font-size: var(--fs-18);
  color: var(--white);
  font-weight: 400;
  margin: 0 0 18px;
}
.about-block__copy p:last-child { margin-bottom: 0; }

/* --- services block --- */
.services-block {
  background: var(--white);
  padding: 40px 40px 56px;
}
.accordion {
  list-style: none;
  margin: 0;
  padding: 0;
}
.accordion__item {
  border-bottom: 1px solid #d8d8d8;
}
.accordion__trigger {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  font-size: var(--fs-20);
  font-weight: 400;
  color: #1a1a1a;
  text-align: left;
  position: relative;
}
.accordion__trigger:hover,
.accordion__trigger:focus-visible {
  color: var(--orange);
  outline: none;
}
.accordion__trigger::after {
  content: '+';
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--orange);
  transition: transform 200ms ease;
}
.accordion__trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
.accordion__code {
  color: var(--orange);
  font-weight: 600;
  min-width: 32px;
  font-size: var(--fs-18);
}
.accordion__panel {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 68px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease, padding 260ms ease;
}
.accordion__item.is-open .accordion__panel {
  max-height: 400px;
  padding-bottom: 16px;
}
.accordion__panel li {
  padding: 6px 0;
  font-size: var(--fs-18);
  color: #444;
}

/* --- contact block --- */
.contact-block {
  background: var(--black);
  color: var(--white);
  padding: 40px 40px 32px;
  flex: 1;
}
.contact-block__headline {
  font-weight: 600;
  font-size: var(--fs-50);
  text-align: center;
  margin: 0 0 28px;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form__field {
  margin-bottom: 16px;
}
.contact-form__field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8b8b8;
  margin-bottom: 6px;
}
.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
  width: 100%;
  background: #141414;
  border: 1px solid #333;
  border-radius: 4px;
  color: var(--white);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: var(--fs-18);
}
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder { color: #6b6b6b; }
.contact-form__field input:focus,
.contact-form__field select:focus,
.contact-form__field textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange);
}
.contact-form__field select { appearance: auto; }
.contact-form__submit {
  display: block;
  width: fit-content;
  margin: 8px auto 0;
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  font-size: var(--fs-18);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 200ms ease, transform 200ms ease;
  min-height: 44px;
}
.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  background: #d8431f;
}
.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.contact-form__status {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--teal);
  min-height: 1.2em;
}
.contact-block__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #2a2a2a;
}
.contact-block__meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-18);
}
.contact-block__meta-item svg {
  width: 20px;
  height: 20px;
  fill: var(--orange);
  flex-shrink: 0;
}
.contact-block__meta-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
}
.contact-block__meta-item:hover,
.contact-block__meta-item:focus-visible { color: var(--orange); }

/* --- brands block --- */
.brands-block {
  background: var(--white);
  padding: 32px 40px 48px;
  text-align: center;
}
.brands-block__headline {
  font-size: var(--fs-25);
  font-weight: 400;
  color: #000;
  margin: 0 0 24px;
}
.brands-block__logos {
  width: 100%;
  margin: 0 auto;
  max-width: 655px;
}

/* ============ SECTION 4: WORK ============ */
.work-section {
  margin-top: 56px;
}
.work-section__heading-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.work-section__heading { margin-bottom: 24px; }

.work-field {
  position: relative;
  background: var(--navy);
  min-height: 625px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(10, 137px);
  grid-template-rows: repeat(4, 137px);
  gap: 0;
  max-width: 100%;
  overflow: auto;
}
.work-grid__btn {
  position: relative;
  width: 137px;
  height: 137px;
  padding: 2px;
  border: none;
  background: var(--navy);
  overflow: hidden;
  min-width: 44px;
  min-height: 44px;
}
.work-grid__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease, opacity 200ms ease;
}
.work-grid__btn:hover img,
.work-grid__btn:focus-visible img {
  transform: scale(1.05);
}
.work-grid__btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -2px;
  z-index: 2;
}
.work-grid__btn.is-active img {
  opacity: 0.85;
}

.popup-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  padding: 24px;
}
.popup-layer--left { left: 0; }
.popup-layer--right { right: 0; }
.popup-layer.is-visible {
  opacity: 1;
}
.popup-layer img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border: 4px solid var(--white);
  border-radius: 4px;
  background: var(--white);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 28px 24px;
  margin-top: 56px;
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 8px; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer__meta a:hover,
.site-footer__meta a:focus-visible { color: var(--orange); }
.site-footer__divider { margin: 0 10px; opacity: 0.5; }

/* ============ SCROLL ANCHOR OFFSET ============ */
section[id], .about-block, .services-block, .contact-block {
  scroll-margin-top: var(--nav-height);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1160px) {
  .hero__inner { flex-direction: column; align-items: center; }
  .hero__info-owl { position: relative; width: 100%; max-width: 420px; right: auto; margin: 24px auto 0; display: block; }
  .col-left, .col-right { flex: 1 1 100%; max-width: 100%; }
  .about-block { background-size: cover; }
}

@media (max-width: 900px) {
  :root {
    --fs-50: 2.25rem;
    --fs-25: 1.3rem;
    --fs-23: 1.25rem;
  }
  .navbar__toggle { display: flex; }
  .navbar__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 250ms ease;
  }
  .navbar__links.is-open { max-height: 320px; }
  .navbar__links a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .navbar__contact { font-size: 0.95rem; }

  .contact-form__row { grid-template-columns: 1fr; }

  .work-grid {
    grid-template-columns: repeat(5, minmax(80px, 137px));
    grid-template-rows: repeat(8, minmax(80px, 137px));
  }
  .work-grid__btn { width: 100%; height: auto; aspect-ratio: 1/1; }
  .popup-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 16px;
    background: rgba(0,0,0,0.55);
    z-index: 60;
  }
}

@media (max-width: 560px) {
  .work-grid {
    grid-template-columns: repeat(3, minmax(60px, 1fr));
    grid-template-rows: repeat(14, minmax(60px, 1fr));
  }
  .hero__logo { width: 200px; }
  .about-block, .services-block, .contact-block, .brands-block { padding: 28px 20px; }
}
