/* ============================================================
   Terra Marketing Partners — Main Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties / Brand Colors ---------- */
:root {
  --red:        #AF101F;
  --purple:     #4D4CC8;
  --black:      #000000;
  --dark-gray:  #1E1E1E;
  --mid-gray:   #333333;
  --light-gray: #F7F7F7;
  --white:      #FFFFFF;
  --grad-main:  linear-gradient(135deg, var(--red), var(--purple));
  --grad-hover: linear-gradient(135deg, var(--white), var(--purple));
  --font:       'Archivo', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-gray);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;900&display=swap');

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  max-width: 1200px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.site-header .logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.main-nav a:hover { opacity: 0.75; }

.nav-cta {
  background: var(--grad-main);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.08em;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85 !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

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

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-image: url('images/shutterstock_2436813039.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 100px;
  margin: 0 20px;
  margin-top: 100px;
  overflow: hidden;
  padding: 80px 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(77,76,200,0.6);
  border-radius: inherit;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--white);
  margin-bottom: 36px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 30px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-primary {
  background: var(--grad-main);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); opacity: 1; }

.brand-gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
section { padding: 80px 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--mid-gray);
}

.section-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--dark-gray);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  padding: 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

.about-image-col {
  position: relative;
  background-image: url('images/shutterstock_2472344231.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
}

.about-image-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.about-stat-box {
  position: absolute;
  bottom: 40px;
  left: 40px;
  background-image: url('images/red-box-bg.png');
  background-size: cover;
  background-color: var(--red);
  padding: 30px 36px;
  border-radius: 12px;
  z-index: 1;
}

.about-stat-box .stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.about-stat-box .stat-label {
  font-size: 14px;
  color: var(--white);
  margin-top: 6px;
  font-weight: 500;
}

.about-content-col {
  background: var(--black);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.about-decor {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 140px;
  opacity: 0.6;
}

.about-content-col .section-heading {
  color: var(--white);
  margin-bottom: 20px;
}

.about-content-col .section-body {
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
#services {
  background: var(--white);
}

.services-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 60px;
}

.services-intro .section-heading {
  margin-top: 12px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.service-card {
  background: var(--black);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.32);
}

/* Image area — centred with generous breathing room */
.service-card .service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 28px;
}

.service-card .service-icon {
  width: 100%;
  max-width: 220px;
  height: 200px;
  object-fit: contain;
  display: block;
}

/* Thin gradient divider between image and text */
.service-card .service-divider {
  height: 1px;
  margin: 0 36px;
  background: linear-gradient(90deg, transparent, rgba(175,16,31,0.6), rgba(77,76,200,0.6), transparent);
}

/* Text content */
.service-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 36px 40px;
  flex: 1;
}

.service-card .section-label {
  color: var(--red);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.service-card .section-heading {
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--white);
}

.service-card p {
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
  line-height: 1.75;
}

/* ============================================================
   TEAM SECTION
   ============================================================ */
#team {
  background: var(--black);
  padding: 90px 0;
}

/* Centred intro text */
.team-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.team-intro .section-label { color: var(--red); }

.team-intro .section-heading {
  color: var(--white);
  margin: 12px 0 20px;
}

.team-intro p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Mosaic: one large image left, two stacked right */
.team-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 242px 242px;
  gap: 16px;
}

/* Each cell clips the scaling image */
.team-mosaic-cell {
  overflow: hidden;
  border-radius: 20px;
}

.team-mosaic-cell:first-child {
  grid-row: 1 / 3;
}

.team-mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.85);
}
.team-mosaic-cell:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

/* ============================================================
   CAREERS SECTION
   ============================================================ */
#careers {
  background: var(--white);
  padding: 90px 0;
}

/* Centred header */
.careers-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  margin-bottom: 56px;
}

.careers-header-text .section-heading {
  color: var(--mid-gray);
  margin: 12px 0 16px;
}

.careers-header-text p {
  color: #666;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
}

/* 5-card benefit grid: 3 top row, 2 bottom row centred */
.careers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Last two cards sit in a centred 2-col sub-grid */
.careers-grid-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: calc(66.66% + 10px);
  margin: 0 auto;
  width: 100%;
}

.benefit-card {
  background: var(--black);
  border-radius: 20px;
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}

.benefit-number {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.benefit-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.benefit-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.75;
  flex: 1;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--white);
  padding-bottom: 100px;
}

.cta-box {
  background: var(--black);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.cta-text {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-text .section-label { color: var(--red); }
.cta-text .section-heading { color: var(--white); margin: 12px 0 20px; }
.cta-text p { color: rgba(255,255,255,0.75); line-height: 1.75; }
.cta-text .btn { margin-top: 32px; align-self: flex-start; }

.cta-image {
  position: relative;
  overflow: hidden;
}

.cta-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.82);
  transition: filter 0.4s ease, transform 0.4s ease;
}
.cta-box:hover .cta-image img {
  filter: brightness(0.95);
  transform: scale(1.03);
}

/* Gradient fade from black on the left edge into the photo */
.cta-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--black) 0%, transparent 35%);
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.page-hero {
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background-size: cover;
  background-position: center;
  border-radius: 100px;
  margin: 0 20px;
  margin-top: 100px;
  padding: 60px 70px;
  overflow: hidden;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  border-radius: inherit;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  max-width: 540px;
  line-height: 1.15;
}

.page-hero p {
  color: rgba(255,255,255,0.88);
  margin-top: 16px;
  max-width: 480px;
  font-size: 1.05rem;
}

/* Contact info cards */
.contact-info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 60px 0;
}

.contact-card {
  background: var(--light-gray);
  border-radius: 16px;
  padding: 36px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.contact-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin: 0 auto;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mid-gray);
}

.contact-card p, .contact-card a {
  font-size: 0.95rem;
  color: var(--dark-gray);
}

/* Contact form section */
.contact-form-section {
  background-image: url('images/shutterstock_2146238679.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  margin: 0 20px 80px;
  overflow: hidden;
  position: relative;
}

.contact-form-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(43,43,43,0.88);
}

.contact-form-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 70px 40px;
  text-align: center;
}

.contact-form-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 10px;
}

.contact-form-inner p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 40px;
}

/* Form styles */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  padding: 12px 0;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.5); }
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--red); }
.contact-form textarea { min-height: 120px; resize: vertical; }

.form-submit {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 10px;
}

.form-message {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}
.form-message.success { background: rgba(0,180,0,0.2); color: #90ee90; display: block; }
.form-message.error   { background: rgba(220,0,0,0.2); color: #ff8080; display: block; }

/* ============================================================
   LEGAL PAGES (Privacy / Terms)
   ============================================================ */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 140px 30px 80px;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--mid-gray);
  margin-bottom: 8px;
}

.legal-page .last-updated {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mid-gray);
  margin: 36px 0 12px;
}

.legal-page h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mid-gray);
  margin: 24px 0 8px;
}

.legal-page p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 16px;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page ul li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 6px;
}

.legal-page a { color: var(--red); text-decoration: underline; }

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 30px;
}

.page-404 h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.page-404 h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--mid-gray);
  margin-bottom: 16px;
}

.page-404 p {
  color: #777;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black);
  padding: 50px 30px 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo img { height: 44px; width: auto; }

.footer-tagline {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--white); }

.footer-social svg { width: 20px; height: 20px; fill: currentColor; }

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  width: 100%;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image-col { min-height: 320px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .cta-box { grid-template-columns: 1fr; }
  .cta-image { min-height: 300px; }
  .cta-image::before { background: linear-gradient(180deg, var(--black) 0%, transparent 40%); }
  .team-layout { grid-template-columns: 1fr; }
  .careers-grid { grid-template-columns: 1fr 1fr; }
  .careers-grid-bottom { max-width: 100%; }
}

@media (max-width: 768px) {
  .site-header { width: calc(100% - 30px); padding: 14px 20px; }

  .main-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 999;
  }
  .main-nav a { font-size: 18px; }
  .main-nav.open { display: flex; }

  .nav-toggle { display: flex; z-index: 1001; }

  .hero { border-radius: 30px; margin: 0 10px; margin-top: 90px; padding: 60px 20px; }

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

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

  .contact-form { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }

  .page-hero { border-radius: 30px; margin: 0 10px; margin-top: 90px; padding: 40px 30px; }

  .team-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px;
  }
  .team-mosaic-cell:first-child { grid-row: 1 / 2; }

  .contact-form-section { border-radius: 20px; margin: 0 10px 50px; }

  .about-content-col { padding: 40px 30px; }

  .cta-text { padding: 40px 32px; }

  .careers-grid { grid-template-columns: 1fr; }
  .careers-grid-bottom { grid-template-columns: 1fr; max-width: 100%; }

  section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .team-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 220px 220px;
  }
  .team-mosaic-cell:first-child { grid-row: 1 / 2; }
  .footer-links { flex-direction: column; gap: 14px; }
}
