/* ==========================================================================
   McMahon Web Design
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin subset, variable weight) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("/fonts/roboto.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("/fonts/roboto-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #0e2027;
  --teal: #2b5463;
  --charcoal: #293133;
  --green: #48c774;
  --green-dark: #36a95e;
  --link: #2bcb58;
  --sky: #5bc0de;
  --off-white: #f8feff;
  --heading: "Montserrat", system-ui, sans-serif;
  --body: "Roboto", system-ui, sans-serif;
  --container: 1140px;
  --gutter: 20px;
  --shadow: 0 0 10px 1px rgba(0, 0, 0, .5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--body);
  color: var(--charcoal);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p, ul { margin: 0; }
p + p, p + ul, ul + p { margin-top: 1rem; }
ul { padding-left: 1.25em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: calc(1092px + 2 * var(--gutter)); }

.section-title {
  font: 600 2rem/1 var(--heading);
  color: var(--teal);
  margin-bottom: 40px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 10px; top: -60px; z-index: 100;
  background: var(--green); color: #fff; padding: 10px 16px; border-radius: 3px;
}
.skip-link:focus { top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 0;
  border-radius: 3px;
  font: 500 15px/1 var(--body);
  color: #fff;
  background: var(--green);
  cursor: pointer;
  transition: background-color .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(.92); }
.btn--sky { background: var(--sky); }
.btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--navy);
  box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}
.site-header .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 85px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-header .logo img { width: 119px; height: 65px; }

.nav-toggle {
  display: none;
  align-self: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: inline; }

.site-nav ul { list-style: none; display: flex; padding: 0; }
.site-nav a {
  position: relative;
  display: block;
  padding: 8px 20px;
  font: 600 1rem/20px var(--heading);
  color: var(--off-white);
}
.site-nav a::after {
  content: "";
  position: absolute; left: 20px; right: 20px; bottom: 0;
  height: 3px;
  background: var(--green);
  opacity: 0;
  transition: opacity .2s ease;
}
.site-nav a:hover { text-decoration: none; }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--off-white);
  background: var(--navy) center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
}
.hero h1 { font: 600 2rem/1 var(--heading); margin-bottom: 20px; }

.hero--home {
  background-image: url("/images/hero-home.jpg");
  background-position: 0 100%;
  padding: 74px 0 82px;
}
.hero--home::before {
  background-image: linear-gradient(190deg, rgba(72, 199, 116, .43) 5%, var(--navy) 41%);
  opacity: .71;
}
.hero__wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 33px;
  overflow: hidden;
  transform: rotate(180deg);
  line-height: 0;
}
.hero__wave svg { width: calc(100% + 1.3px); height: 100%; fill: #fff; }

.hero--services {
  background-image: url("/images/hero-services.jpg");
  padding: 80px 0;
}
.hero--services::before {
  background-image: linear-gradient(var(--teal) 0%, var(--navy) 100%);
  opacity: .8;
}

/* ---------- Home: clients ---------- */
.clients { padding: 26px 0 32px; }
.clients .section-title { color: var(--navy); margin-left: 10px; }
.client-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 10px;
}
.client img { margin: 0 auto 20px; transition: transform .25s ease; }
.client a:hover img { transform: translateY(-3px); }
.client h3 { font: 500 1.5rem/1.2 var(--body); margin-bottom: 8px; padding: 0 10px; }
.client .location { font-weight: 500; line-height: 1.2; margin-bottom: 8px; }
.client p, .client > a { padding: 0 10px; }
.client > a { display: inline-block; margin-top: 16px; }

/* ---------- Home: solution cards ---------- */
.solutions { padding: 42px 0 32px; }
.solutions .section-title { margin-left: 10px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 10px;
}
.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 284px;
  padding: 32px;
  color: var(--off-white);
  background: var(--navy) center / cover no-repeat;
}
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--navy);
  opacity: .6;
}
.card--web { background-image: url("/images/cards/web-design.jpg"); }
.card--logo { background-image: url("/images/cards/logo-design.png"); }
.card--logo::before { opacity: .8; }
.card--it { background-image: url("/images/cards/managed-it.jpg"); }
.card h3 { font: 700 1.25rem/1.2 var(--body); margin-bottom: 8px; }

/* ---------- Home: intro ---------- */
.intro { padding: 42px 0 32px; }
.intro .container { max-width: 797px; }
.intro h2 { font: 700 1.25rem/1.2 var(--body); margin-bottom: 8px; }
.intro .emphasis { font-weight: 700; }

/* ---------- Home: features ---------- */
.features { padding: 64px 0 64px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 10px;
}
.feature svg { display: block; height: 50px; width: auto; margin: 0 auto 20px; fill: var(--green); }
.feature h3 {
  font: 600 1.25rem/1 var(--heading);
  color: var(--teal);
  text-align: center;
  margin-bottom: 20px;
}

/* ---------- Home: about ---------- */
.about {
  padding: 74px 0;
  background: var(--navy);
  color: var(--off-white);
}
.about .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: center;
}
.about .lead { font: 300 1.25rem/1.5 var(--body); padding: 0 10px; }
.profile { text-align: center; }
.profile img { width: 344px; border-radius: 50%; margin: 0 auto 20px; }
.profile .name { font-weight: 700; }
.profile p + p { margin-top: 0; }

/* ---------- Home: testimonials ---------- */
.testimonials { padding: 74px 0 64px; }
.testimonials .section-title { margin-left: 10px; margin-bottom: 20px; }
.carousel {
  position: relative;
  padding: 0 50px;
}
.carousel__viewport { overflow: hidden; }
.carousel__track {
  display: flex;
  margin: 0; padding: 0; list-style: none;
  transition: transform .5s ease;
}
.carousel__slide { flex: 0 0 100%; padding: 0 10px 10px; }
.quote {
  position: relative;
  margin: 0 0 30px;
  padding: 20px;
  background: #f9fafa;
  font: italic 400 1.3rem/1.5 var(--body);
  text-align: center;
}
.quote::after {
  content: "";
  position: absolute; left: 50%; bottom: -10px;
  width: 20px; height: 20px;
  background: #f9fafa;
  transform: translateX(-50%) rotate(45deg);
}
.cite {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  font: 400 14px/1.5 var(--heading);
}
.cite img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.cite strong { display: block; font-weight: 600; }
.cite span { color: var(--teal); }
.carousel__btn {
  position: absolute; top: 40%;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0; border: 0;
  background: none;
  color: rgba(0, 0, 0, .25);
  cursor: pointer;
  transform: translateY(-50%);
}
.carousel__btn:hover { color: var(--teal); }
.carousel__btn svg { width: 14px; height: 22px; fill: currentColor; }
.carousel__btn--prev { left: 0; }
.carousel__btn--next { right: 0; }
.carousel__dots { display: flex; justify-content: center; gap: 4px; margin-top: 30px; }
.carousel__dots button {
  width: 22px; height: 22px; padding: 0; border: 0;
  background: none; cursor: pointer;
}
.carousel__dots button::before {
  content: ""; display: block; margin: auto;
  width: 6px; height: 6px; border-radius: 50%;
  background: #000; opacity: .2;
}
.carousel__dots button[aria-current="true"]::before { opacity: 1; }

/* ---------- Services ---------- */
.service-list { padding: 64px 0; }
.service {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  padding: 0 10px;
}
.service + .service { margin-top: 80px; }
.service--flip { grid-template-columns: 1fr 2fr; }
.service--flip .service__media { order: -1; }
.service h2 { font: 600 2rem/1 var(--heading); color: var(--teal); margin-bottom: 20px; }
.service__media img { width: 100%; box-shadow: var(--shadow); }

/* ---------- Contact ---------- */
.contact-intro { padding: 58px 0 72px; }
.contact-intro .section-title { margin: 0 10px 30px; }
.contact-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 20px; }
.contact-methods h2 { font: 600 1rem/1 var(--heading); color: var(--teal); margin-bottom: 20px; }

/* ---------- Footer + contact card ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  padding-bottom: 25px;
  color: rgba(255, 255, 255, .5);
  background: url("/images/footer-pattern.png") 50% 100% / cover no-repeat;
}
.site-footer::before {   /* dark tint over the topo pattern */
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(40deg, var(--navy) 0%, var(--charcoal) 60%);
  opacity: .9;
}
.site-footer::after {    /* white band so the card straddles light/dark */
  content: "";
  position: absolute; left: 0; right: 0; top: 0; z-index: -1;
  height: 100px;
  background: #fff;
}

.chat-card {
  margin: 0 10px;
  padding: 32px;
  background: var(--off-white);
  color: var(--charcoal);
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, .5);
}
.chat-card h2 { font: 600 2rem/1 var(--heading); color: var(--teal); margin-bottom: 44px; }
.chat-card .confirmation {
  padding: 15px;
  background: #e0ffc7;
  border: 1px solid #b4d39b;
}
.chat-card .confirmation a { color: var(--teal); }

.form-field + .form-field { margin-top: 20px; }
.form-field label {
  display: block;
  margin-bottom: 4px;
  font: 700 1rem/1.3 var(--heading);
}
.form-field .req { color: #f00; font-weight: 400; }
.form-field input,
.form-field textarea {
  display: block;
  width: 60%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  font: 400 16px/1.3 var(--body);
  color: #333;
}
.form-field textarea { width: 100%; height: 70px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 2px rgba(72, 199, 116, .4); }
.chat-form .btn { margin-top: 24px; padding: 14px 32px; font: 600 16px/1 var(--heading); }
.honeypot { display: none; }

.social {
  display: flex; justify-content: center; gap: 10px;
  margin: 28px 0 0; padding: 0; list-style: none;
}
.social a {
  display: grid; place-items: center;
  width: 39px; height: 39px;
  border-radius: 50%;
  color: #fff;
  transition: opacity .15s ease;
}
.social a:hover { opacity: .85; }
.social svg { width: 14px; height: 14px; fill: currentColor; }
.social .facebook { background: #3b5998; }
.social .twitter { background: #1da1f2; }
.social .instagram { background: #e4405f; }

.copyright {
  margin: 45px 10px 0;
  padding-top: 30px;
  border-top: 1px dotted rgba(255, 255, 255, .5);
  font: 300 13px/1.5 var(--heading);
}

/* ---------- 404 ---------- */
.not-found { padding: 80px 0 120px; text-align: center; }
.not-found p { margin: 20px 0 30px; }

/* ==========================================================================
   Tablet (≤1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero h1, .section-title, .service h2, .chat-card h2 { font-size: 1.786rem; }
  .card { padding: 24px; }
  .about .container { grid-template-columns: 3fr 2fr; }
  .profile img { width: 100%; max-width: 344px; }
}

/* ==========================================================================
   Mobile (≤767px)
   ========================================================================== */
@media (max-width: 767px) {
  .hero h1, .section-title, .service h2, .chat-card h2 { font-size: 1.545rem; line-height: 1.05; }

  /* header / menu */
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 10px rgba(0, 0, 0, .3);
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 20px; font-weight: 400; font-size: 15px; }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--green); background: rgba(255, 255, 255, .05); }

  .hero--home { padding: 64px 0 95px; }
  .hero__wave { height: 30px; }
  .hero__wave svg { width: 180%; margin-left: -40%; }
  .hero--services { padding: 60px 0; }

  .client-grid, .card-grid, .feature-grid { grid-template-columns: 1fr; }
  .client-grid { gap: 0; }
  .client { padding: 20px 0 30px; }
  .client:first-child { padding-top: 0; }
  .clients .section-title { margin-bottom: 24px; }
  .client + .client { border-top: 1px solid #e5e5e5; }
  .client img { width: 100%; max-width: 302px; }
  .card { min-height: 220px; padding: 32px; }
  .feature-grid { gap: 40px; }

  .about { padding: 64px 0; }
  .about .container { grid-template-columns: 1fr; gap: 40px; }
  .about .lead { padding: 0; }

  .carousel { padding: 0 34px; }
  .carousel__btn { width: 40px; height: 44px; }
  .carousel__btn--prev { left: -6px; }
  .carousel__btn--next { right: -6px; }
  .carousel__dots button { width: 32px; height: 32px; }
  .quote { font-size: 1.15rem; }

  .service, .service--flip { grid-template-columns: 1fr; padding: 0; }
  .service--flip .service__media { order: 0; }
  .service + .service { margin-top: 64px; }

  .contact-intro { text-align: center; padding-bottom: 56px; }
  .contact-methods { grid-template-columns: 1fr; gap: 30px; padding: 0; }

  .site-footer::after { height: 80px; }
  .chat-card { margin: 0; padding: 32px 24px; }
  .form-field input { width: 100%; }
  .chat-form .btn { width: 100%; justify-content: center; }
  .social { gap: 12px; }
  .social a { width: 44px; height: 44px; }
  .social svg { width: 18px; height: 18px; }
  .copyright { margin: 40px 0 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
