/* ========================================
   4 Design, LLC - Demo Site
   Teal #2d6e6e | Orange #e07b2a
   Cream #f5f1ea | Charcoal #2c2824
   Fonts: Cormorant Garamond + DM Sans
   ======================================== */

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

:root {
  --teal: #2d6e6e;
  --teal-dark: #1d5454;
  --teal-light: #3a8a8a;
  --orange: #e07b2a;
  --orange-dark: #c06820;
  --cream: #f5f1ea;
  --offwhite: #faf8f5;
  --charcoal: #2c2824;
  --charcoal-muted: #6b6560;
  --charcoal-faint: #a09890;
  --border: #e0dbd4;
  --nav-h: 72px;
  --section-pad: 96px;
  --section-pad-m: 64px;
  --max-w: 1200px;
  --radius: 6px;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 0.925rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 48px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section Rules ---- */

.section-rule {
  border: none;
  height: 1px;
  background: var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  border: none;
  min-height: 44px;
}

.btn--lg {
  padding: 14px 32px;
  font-size: 0.9rem;
}

.btn--primary {
  background: var(--teal);
  color: #fff;
}

.btn--primary:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 110, 110, 0.25);
}

.btn--primary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}

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

.btn--full { width: 100%; }

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(250, 248, 245, 0.97);
  box-shadow: 0 2px 20px rgba(44, 40, 36, 0.06);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  flex-shrink: 0;
  margin-right: auto;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links a:not(.btn) {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal-muted);
  transition: color 0.2s;
}

.nav__links a:not(.btn):hover {
  color: var(--charcoal);
}

.nav__links a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav__cta {
  padding: 10px 22px;
  font-size: 0.8rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) 24px 96px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 40, 36, 0.55) 0%,
    rgba(44, 40, 36, 0.7) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero__content .eyebrow {
  color: var(--orange);
}

.hero__content h1 {
  color: #fff;
  margin-bottom: 20px;
}

.hero__sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Stats ---- */

.stats {
  background: var(--charcoal);
  padding: 48px 24px;
}

.stats__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stats__number {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.stats__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
}

.stats__divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ---- Services (editorial numbered list) ---- */

.services {
  padding: var(--section-pad) 0;
  background: var(--offwhite);
}

.services__list {
  max-width: 800px;
}

.services__item {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.services__item:first-child {
  border-top: 1px solid var(--border);
}

.services__num {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--charcoal-faint);
  flex-shrink: 0;
  width: 36px;
  font-style: italic;
}

.services__name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.services__desc {
  font-size: 0.875rem;
  color: var(--charcoal-muted);
  line-height: 1.6;
}

/* ---- Sectors ---- */

.sectors {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.sectors__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 64px;
  max-width: 640px;
}

.sectors__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--charcoal);
}

.sectors__dash {
  width: 24px;
  height: 2px;
  background: var(--teal);
  flex-shrink: 0;
}

/* ---- About ---- */

.about {
  padding: var(--section-pad) 0;
  background: var(--offwhite);
}

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

.about__photo img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

.about__text p {
  color: var(--charcoal-muted);
  margin-bottom: 16px;
  max-width: 560px;
  line-height: 1.75;
}

.about__creds {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.about__cred {
  display: flex;
  flex-direction: column;
}

.about__cred-abbr {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
}

.about__cred-full {
  font-size: 0.72rem;
  color: var(--charcoal-faint);
  margin-top: 2px;
}

/* ---- Portfolio ---- */

.portfolio {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio__item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.portfolio__item--wide {
  grid-column: span 2;
}

.portfolio__item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio__item:hover img {
  transform: scale(1.04);
}

.portfolio__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(44, 40, 36, 0.8) 100%);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
}

/* ---- CTA Band ---- */

.cta-band {
  padding: var(--section-pad) 0;
  background: var(--teal);
}

.cta-band__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-band__inner h2 {
  color: #fff;
  margin-bottom: 12px;
}

.cta-band__inner p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  font-size: 1rem;
}

.cta-band .btn--primary {
  background: #fff;
  color: var(--teal);
}

.cta-band .btn--primary:hover {
  background: var(--cream);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ---- Contact ---- */

.contact {
  padding: var(--section-pad) 0;
  background: var(--offwhite);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

.contact__detail h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--charcoal-faint);
  margin-bottom: 4px;
}

.contact__detail a {
  font-size: 0.95rem;
  color: var(--charcoal);
  transition: color 0.2s;
}

.contact__detail a:hover {
  color: var(--teal);
}

.contact__detail a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.contact__form-wrap {
  background: #fff;
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.875rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--offwhite);
  color: var(--charcoal);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 110, 110, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236b6560' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.contact__form .btn {
  margin-top: 8px;
}

/* ---- Footer ---- */

.footer {
  background: var(--charcoal);
  padding: 48px 24px 32px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer__logo {
  height: 32px;
  width: auto;
  opacity: 0.8;
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer__links a:hover { color: #fff; }

.footer__links a:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer__contact {
  display: flex;
  gap: 28px;
}

.footer__contact a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}

.footer__contact a:hover { color: var(--orange); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

/* ---- Scroll Animations ---- */

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__photo img {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: var(--section-pad-m);
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .nav__links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav__links a:not(.btn) {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--charcoal);
  }

  .nav__cta {
    padding: 14px 36px;
    font-size: 0.9rem;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: 80vh;
  }

  .hero h1 br { display: none; }

  .stats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .stats__divider { display: none; }

  .sectors__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .portfolio__item--wide {
    grid-column: span 1;
  }

  .portfolio__item img {
    height: 240px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-title br { display: none; }

  .about__creds {
    flex-direction: column;
    gap: 16px;
  }

  .footer__links,
  .footer__contact {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

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

@media (max-width: 375px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    text-align: center;
  }

  .stats__grid { gap: 20px; }
  .stats__number { font-size: 1.6rem; }
}
