/* ==========================================================================
   BB&W — Advertising & Branding Agency
   Table of contents:
   1. Reset & base
   2. Design tokens
   3. Typography helpers
   4. Layout utilities
   5. Buttons
   6. Header / navigation
   7. Hero
   8. Trusted logos strip
   9. Who we are
   10. What we do
   11. Our work
   12. Our process
   13. CTA
   14. Footer
   15. Reveal animation
   16. Responsive
   ========================================================================== */

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body, h1, h2, h3, h4, p, ul, ol, li, figure, figcaption {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* colors */
  --cream:        #faf9f6;
  --cream-deep:   #f2efe9;
  --black:        #0a0a0a;
  --black-soft:   #111110;
  --gold:         #c0995f;  /* vivid accent — used on dark backgrounds (contrast 7.5:1 on black) */
  --gold-deep:    #966a2a;  /* deepened accent — used on light backgrounds (contrast 4.7:1 on cream) */
  --gold-soft:    #d8b686;
  --ink:          #171614;
  --ink-70:       rgba(23, 22, 20, 0.7);
  --ink-60:       rgba(23, 22, 20, 0.62);
  --ink-border:   rgba(23, 22, 20, 0.12);
  --white:        #fdfcfa;
  --white-85:     rgba(253, 252, 250, 0.85);
  --white-70:     rgba(253, 252, 250, 0.68);
  --white-50:     rgba(253, 252, 250, 0.52);
  --white-border: rgba(253, 252, 250, 0.16);

  /* type */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans:  'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;

  /* layout */
  --container: 1320px;
  --pad: clamp(24px, 5vw, 80px);
  --section-pad: clamp(56px, 7vw, 100px);
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 1000;
  background: var(--black);
  color: var(--cream);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- 3. Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.eyebrow.center { text-align: center; }

/* dark-background sections get the brighter gold for AA contrast */
.who-we-are .eyebrow,
.our-work .eyebrow,
.cta-section .eyebrow {
  color: var(--gold);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-title.center { text-align: center; }
.who-we-are .section-title,
.cta-section .section-title { color: var(--white); }

.text-gold { color: var(--gold); font-style: italic; }
/* on the light hero background, use the deeper gold shade for AA contrast */
.hero-title .text-gold { color: var(--gold-deep); }

.body-text {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-70);
  max-width: 46ch;
}
.who-we-are .body-text,
.our-work .body-text,
.cta-section .body-text { color: var(--white-70); }

/* ---------- 4. Layout utilities ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { position: relative; }

.section-head { margin-bottom: clamp(40px, 6vw, 64px); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 34px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--black);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-border);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white-border);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn-link {
  padding: 0;
  border: none;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.btn-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.35s ease;
  opacity: 0.5;
}
.btn-link:hover::after { transform: scaleX(1); }
.btn-link-light { color: var(--white); }

.btn-link .arrow,
.hero-actions .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.btn-link:hover .arrow { transform: translateX(4px); }

.header-cta { padding: 14px 28px; }

/* ---------- 6. Header / navigation ---------- */
.scroll-anchor {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
}

.main-nav a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 7. Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(48px, 7vw, 90px); }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-text {
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-70);
  max-width: 42ch;
}

/* small accent divider preceding intro paragraphs, matching source design */
.hero-text::before,
.body-text::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 22px;
}
.hero-text::before { background: var(--gold-deep); }
.body-text::before { background: var(--gold); }

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

.hero-visual {
  position: relative;
  aspect-ratio: 620 / 420;
  width: 100%;
}
.building-graphic {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 30px 50px rgba(10,10,10,0.18));
}

/* ---------- 8. Trusted logos strip ---------- */
.logos-strip {
  padding-block: clamp(40px, 5vw, 56px);
  background: var(--cream-deep);
  border-top: 1px solid var(--ink-border);
  border-bottom: 1px solid var(--ink-border);
}

.logos-row {
  margin-top: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.logos-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}
.logos-row li:hover { opacity: 1; }
.logo-name {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 22px);
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--ink);
}
.logo-sub {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* ---------- 9. Who we are ---------- */
.who-we-are {
  background: var(--black);
  padding-block: var(--section-pad);
  overflow: hidden;
}

.giant-amp {
  position: absolute;
  right: clamp(-40px, 4vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(220px, 26vw, 420px);
  color: rgba(255,255,255,0.045);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.who-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.who-copy .section-title { margin-bottom: 24px; }

.who-features {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(16px, 2.5vw, 32px);
}

.feature {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: clamp(16px, 2.2vw, 28px);
  border-left: 1px solid var(--white-border);
}
.feature:first-child { padding-left: 0; border-left: none; }

.feature-icon {
  color: var(--gold);
  width: 38px;
  height: 38px;
}
.feature-icon svg { width: 100%; height: 100%; }

.feature-label {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--white-85);
}

/* ---------- 10. What we do ---------- */
.what-we-do { padding-block: var(--section-pad); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}

.service-card {
  padding-left: clamp(18px, 2.2vw, 28px);
  border-left: 1px solid var(--ink-border);
  text-align: left;
}
.service-card:first-child {
  padding-left: 0;
  border-left: none;
}

.service-icon {
  display: inline-flex;
  color: var(--ink);
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--ink);
}

.service-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-60);
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 5vw, 56px);
}

/* ---------- 11. Our work ---------- */
.our-work {
  background: var(--black);
  padding-block: var(--section-pad);
}

.work-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.work-copy .section-title { margin: 8px 0 20px; }
.work-copy .body-text { margin-bottom: 28px; }

.work-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.work-item {
  position: relative;
  border: 1px solid var(--white-border);
  overflow: hidden;
}

.work-media { width: 100%; height: 100%; }
.work-media svg { width: 100%; height: 100%; display: block; }

.work-item--tall { aspect-ratio: 260 / 400; }
.work-item--tall .work-media { position: absolute; inset: 0; }

.work-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}
.work-item--verity,
.work-item--aurora { aspect-ratio: 260 / 190; }

.work-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--white-50);
  text-transform: uppercase;
}
.work-item figcaption span {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--white);
}

.work-item {
  transition: transform 0.4s ease;
}
.work-item:hover { transform: translateY(-4px); }

/* ---------- 12. Our process ---------- */
.our-process { padding-block: var(--section-pad); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(16px, 2vw, 24px);
  position: relative;
}

.process-step {
  position: relative;
  padding-top: 28px;
}
.process-step::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  right: -100%;
  height: 1px;
  background-image: linear-gradient(to right, var(--gold) 0 6px, transparent 6px 12px);
  background-size: 14px 1px;
  background-repeat: repeat-x;
  opacity: 0.55;
  z-index: 0;
}
.process-step:last-child::before { display: none; }

.step-number {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-deep);
  background: var(--cream);
  padding-right: 14px;
  margin-bottom: 18px;
}

.process-step h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-60);
  max-width: 26ch;
}

/* ---------- 13. CTA ---------- */
.cta-section {
  background: var(--black);
  min-height: 480px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.cta-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cta-visual svg { width: 100%; height: 100%; object-fit: cover; }
.cta-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4,3,2,0.35) 0%, rgba(4,3,2,0.92) 62%, var(--black) 82%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 480px;
  width: 100%;
}

.cta-copy { max-width: 560px; margin-left: auto; text-align: left; padding-block: 64px; }
.cta-copy .section-title { margin: 6px 0 32px; }

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--white-border);
  padding-top: clamp(56px, 7vw, 88px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: clamp(32px, 4vw, 48px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.footer-logo {
  color: var(--white);
  display: inline-block;
  margin-bottom: 18px;
}

.footer-brand p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--white-50);
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 13px; }
.footer-col a {
  font-size: 14.5px;
  color: var(--white-70);
  transition: color 0.25s ease;
}
.footer-col a:hover { color: var(--white); }

.social-list {
  flex-direction: row !important;
  gap: 12px !important;
  margin-top: 22px;
}
.social-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--white-border);
  border-radius: 50%;
  color: var(--white-70);
  transition: all 0.25s ease;
}
.social-list a svg { width: 16px; height: 16px; }
.social-list a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 26px;
  border-top: 1px solid var(--white-border);
}
.footer-bottom p {
  font-size: 13px;
  color: var(--white-50);
}
.footer-legal { display: flex; gap: 28px; }
.footer-legal a {
  font-size: 13px;
  color: var(--white-50);
  transition: color 0.25s ease;
}
.footer-legal a:hover { color: var(--white); }

/* ---------- 15. Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .work-item, .btn, .arrow { transition: none !important; }
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1080px) {
  .who-inner { grid-template-columns: 1fr; }
  .who-features { margin-top: 12px; }
  .work-inner { grid-template-columns: 1fr; }
  .work-copy { max-width: 640px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .service-card:nth-child(4) { padding-left: 0; border-left: none; }
  .process-steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .process-step:nth-child(3)::before { display: none; }
  .cta-copy { margin-left: 0; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--ink-border);
    padding: 8px var(--pad) 28px;
  }
  .main-nav.is-open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .main-nav.is-open a { font-size: 14px; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin-inline: auto; }
  .hero-copy { text-align: left; }

  .logos-row { justify-content: center; gap: 32px 48px; }
  .logos-row li { width: 30%; }

  .work-gallery { grid-template-columns: 1fr 1fr; }
  .work-item--tall:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .work-item--tall:nth-child(2) { grid-column: 2; grid-row: 1; }
  .work-stack { grid-column: 2; grid-row: 2; }

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

@media (max-width: 640px) {
  :root { --pad: 22px; }

  .header-inner { padding-block: 16px; }
  .logo { font-size: 21px; }

  .hero { padding-block: 32px 48px; }
  .hero-title { font-size: clamp(38px, 11vw, 52px); }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 20px; }
  .btn-primary { width: 100%; }

  .who-inner { text-align: left; }
  .who-features { flex-direction: column; gap: 26px; }
  .feature { border-left: none; padding-left: 0; flex-direction: row; align-items: center; }
  .feature-label { text-align: left; }

  .services-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .service-card:nth-child(4) { padding-left: clamp(18px, 2.2vw, 28px); border-left: 1px solid var(--ink-border); }
  .service-card:nth-child(3) { padding-left: 0; border-left: none; }

  .work-gallery { grid-template-columns: 1fr; }
  .work-item--tall:nth-child(1),
  .work-item--tall:nth-child(2) { grid-column: 1; grid-row: auto; }
  .work-stack { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; }

  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-step::before { display: none !important; }

  .cta-copy { padding-block: 48px; }
  .cta-section { min-height: auto; }
  .cta-inner { min-height: auto; padding-block: 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding-left: 0; border-left: none; padding-top: 24px; border-top: 1px solid var(--ink-border); }
  .service-card:first-child { border-top: none; padding-top: 0; }
  .process-steps { grid-template-columns: 1fr; }
  .logos-row li { width: 40%; }
}
