/* ==========================================================================
   Code Tonic — main stylesheet
   Recreated from the HubSpot (Sprout theme) site at www.codetonic.co.uk
   Design tokens captured from the live site's computed styles.
   ========================================================================== */

:root {
  --blue: #34b5e5;
  --purple: #c168c2;
  --dark: #1e2b33;
  --white: #ffffff;
  --grey-border: #dedede;
  --grey-bg: #f0f0f0;
  --body-font: "PT Sans Caption", sans-serif;
  --heading-font: "PT Sans Narrow", sans-serif;
  --content-width: 1300px;
}

/* ---------- Reset / base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 1.4rem;
}

h1 { font-size: 40px; line-height: 1.4; letter-spacing: 2px; text-transform: capitalize; }
h2 { font-size: 30px; line-height: 1.4; letter-spacing: 1.5px; text-transform: capitalize; }
h3 { font-size: 24px; line-height: 1.4; letter-spacing: 1px;   text-transform: capitalize; }
h4 { font-size: 18px; line-height: 1.4; letter-spacing: 1px;   text-transform: capitalize; }
h5 { font-size: 16px; }

p { margin: 0 0 1.4rem; }

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { padding-left: 1.4em; }
li { margin-bottom: .5em; }

blockquote {
  border-left: 4px solid var(--blue);
  margin: 1.5em 0;
  padding: .5em 0 .5em 1.5em;
  font-style: italic;
}

/* ---------- Layout helpers ---------- */

.content-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 90px 20px; }
.section--blue { background-color: var(--blue); color: var(--white); }
.section--blue h1, .section--blue h2, .section--blue h3,
.section--blue h4, .section--blue p, .section--blue li { color: var(--white); }
.section--blue a:not(.btn) { color: var(--white); text-decoration: underline; }

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

.two-col {
  display: flex;
  gap: 73px;
  align-items: center;
  max-width: var(--content-width);
  margin: 0 auto;
}
.two-col > * { flex: 1 1 0; min-width: 0; }
.two-col--top { align-items: flex-start; }

/* 1/3 image + 2/3 text split (services page sections, matches live span4/span8) */
.two-col--thirds > *:first-child { flex: 0 0 29.5%; }
.two-col--thirds > *:last-child { flex: 1 1 auto; }
.two-col--thirds-rev > *:first-child { flex: 1 1 auto; }
.two-col--thirds-rev > *:last-child { flex: 0 0 29.5%; }

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

.btn {
  display: inline-block;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  text-align: center;
  padding: 13px 20px;
  border-radius: 4px;
  border: 1px solid var(--purple);
  background-color: var(--purple);
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background-color: #a94faa; border-color: #a94faa; color: var(--white); text-decoration: none; }

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

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

/* ---------- Header ---------- */

.site-header {
  background-color: var(--blue);
  padding: 22px 40px;
}

.site-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo img { width: 250px; height: auto; display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 42px;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
}
.site-nav a:hover,
.site-nav a.active { border-bottom: 2px solid var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- Hero (homepage) ---------- */

.hero {
  background-image: url("../assets/images/home-banner.png");
  background-size: cover;
  background-position: 50% 50%;
  padding: 156px 20px 252px;
  text-align: center;
}
.hero h1 { margin-bottom: 22px; }
.hero p {
  max-width: 700px;
  margin: 0 auto 30px;
  font-size: 18px;
}
.hero__buttons { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; }
.hero__buttons .btn { min-width: 220px; }

/* ---------- Interior page banners ---------- */

.page-banner {
  position: relative;
  background-size: cover;
  background-position: 50% 50%;
  padding: 135px 20px;
  text-align: center;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}
.page-banner h1 { position: relative; color: var(--white); margin: 0; }
.page-banner p { position: relative; color: var(--white); margin: 12px 0 0; }

.page-banner--services { background-image: url("../assets/images/pillar-banner.jpg"); }
.page-banner--products { background-image: url("../assets/images/blank-banner.jpg"); }
.page-banner--about    { background-image: url("../assets/images/about-banner.jpg"); }
.page-banner--contact  { background-image: url("../assets/images/contact-banner.jpg"); }
.page-banner--blog     { background-image: url("../assets/images/blog-listing-banner.png"); }

/* ---------- Feature columns (homepage) ---------- */

.features { text-align: center; }
.features__grid {
  display: flex;
  gap: 60px;
  max-width: var(--content-width);
  margin: 40px auto 0;
}
.features__item { flex: 1 1 0; }
.features__item svg { width: 64px; height: 64px; fill: var(--blue); margin-bottom: 24px; }
.features__item h3 { margin-bottom: 18px; }

/* ---------- Icon columns (contact page, blue band) ---------- */

.info-cols {
  display: flex;
  gap: 60px;
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}
.info-cols__item { flex: 1 1 0; }
.info-cols__item svg { width: 56px; height: 56px; fill: var(--white); margin-bottom: 24px; }
.info-cols__item h3 { margin-bottom: 18px; }
.info-cols__item p { margin-bottom: .6em; }
.info-cols__item a { color: var(--white); }

/* ---------- Table of contents card ---------- */

.toc h4 { margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li {
  margin: 0;
  border-bottom: 1px solid var(--grey-border);
}
.toc li:last-child { border-bottom: 0; }
.toc a {
  display: block;
  padding: 14px 0;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 18px;
  color: var(--purple);
}

/* ---------- Accordions ---------- */

.accordion {
  border: 1px solid var(--grey-border);
  border-radius: 3px;
  background: var(--white);
  margin-bottom: 25px;
}
.accordion > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 24px 25px;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .5px;
  color: var(--purple);
}
.accordion__icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  position: relative;
}
.accordion__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--purple);
  border-radius: 50%;
}
.accordion__icon::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.accordion[aria-expanded="true"] .accordion__icon::after { content: "\2212"; }
.accordion__content { display: none; padding: 0 25px 24px; }
.accordion[aria-expanded="true"] .accordion__content { display: block; }

/* ---------- Image/text alternating sections ---------- */

.img-text { }
.img-text__img img { width: 100%; border-radius: 3px; }

/* ---------- Products ---------- */

.product { margin-bottom: 90px; }
.product:last-child { margin-bottom: 0; }
.product h2 { margin-top: 40px; }
.product h3 { color: var(--blue); }

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

.contact-form-card {
  background: var(--grey-bg);
  border: 1px solid var(--grey-border);
  border-radius: 3px;
  overflow: hidden;
}
.contact-form-card__header {
  background: var(--blue);
  color: var(--white);
  padding: 40px 45px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.contact-form-card form { padding: 35px 45px 45px; }
.contact-form-card .form-row { display: flex; gap: 25px; }
.contact-form-card .form-row > div { flex: 1 1 0; }
.contact-form-card label {
  display: block;
  margin: 22px 0 8px;
  font-size: 16px;
}
.contact-form-card input[type="text"],
.contact-form-card input[type="email"],
.contact-form-card textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--body-font);
  font-size: 16px;
  border: 1px solid var(--grey-border);
  border-radius: 3px;
  background: var(--white);
}
.contact-form-card textarea { min-height: 110px; resize: vertical; }
.contact-form-card .btn { width: 100%; margin-top: 30px; }

/* ---------- Blog ---------- */

.blog-toolbar { background: var(--blue); padding: 18px 20px; }
.blog-toolbar__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.blog-toolbar label {
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.blog-toolbar select {
  font-family: var(--body-font);
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 3px;
  background: #2ea8d6;
  color: var(--white);
}
.blog-toolbar input[type="search"] {
  margin-left: auto;
  font-family: var(--body-font);
  font-size: 14px;
  padding: 8px 12px;
  border: 0;
  border-radius: 3px;
  min-width: 220px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px;
  max-width: var(--content-width);
  margin: 0 auto;
}
.post-card {
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.post-card h2 { font-size: 30px; margin-bottom: 16px; }
.post-card h2 a { color: var(--dark); }
.post-card h2 a:hover { color: var(--purple); text-decoration: none; }
.post-card .post-meta { margin-bottom: 14px; }
.post-card .read-more { margin-top: 10px; }
.post-card .comments { margin-top: auto; padding-top: 16px; color: #7a868d; font-size: 14px; }

.post-meta { font-size: 16px; color: var(--dark); }
.post-meta a { color: var(--dark); }
.post-tags { margin: 8px 0 0; }
.post-tags a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 6px 10px;
  font-size: 16px;
  border-radius: 4px;
  background: var(--blue);
  color: var(--white);
}
.post-tags a:hover { text-decoration: none; background: #2ea8d6; }

/* Read more button (blog cards) */
.read-more {
  display: inline-block;
  padding: 13px 20px;
  border-radius: 4px;
  background: var(--purple);
  border: 1px solid var(--purple);
  color: var(--white) !important;
  font-weight: 600;
  letter-spacing: 3.2px;
  text-transform: uppercase;
}
.read-more:hover { background: #a94faa; text-decoration: none; }

/* Blog post page */
.post-banner {
  position: relative;
  height: 233px;
  background-size: cover;
  background-position: 50% 50%;
}
.back-to-blog {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--purple);
  color: var(--white);
  padding: 13px 13px 13px 45px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 14px;
}
.back-to-blog::before {
  content: "\2039";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-54%);
  font-size: 22px;
  line-height: 1;
}
.back-to-blog:hover { text-decoration: none; background: #a94faa; }

.post-page { max-width: 760px; margin: 0 auto; padding: 60px 20px 90px; }
.post-page h1 { margin-bottom: 20px; }

.post-author { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.post-author .avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e3e6e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.post-author .avatar svg { width: 22px; height: 22px; fill: #aab3b9; }
.post-author .post-meta { margin: 0; line-height: 1.5; }
.post-body { margin-top: 40px; }
.post-body h2 { margin-top: 50px; }
.post-body h3 { margin-top: 40px; }
.post-body h5 { margin-top: 30px; }
.post-body a { text-decoration: underline; }

.share-links { margin: 50px 0 0; display: flex; gap: 24px; }
.share-links a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}
.share-links svg { width: 26px; height: 26px; fill: var(--dark); }
.share-links a:hover svg { fill: var(--purple); }

.related { border-top: 1px solid var(--grey-border); margin-top: 60px; padding-top: 50px; }
.related h2 { margin-bottom: 40px; }

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

.site-footer { background: var(--dark); color: var(--white); padding: 70px 40px 30px; }
.site-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.site-footer__brand { flex: 1 1 280px; }
.site-footer__brand img { width: 272px; margin-bottom: 25px; }
.site-footer__social { display: flex; gap: 34px; margin-top: 20px; }
.site-footer__social a { display: inline-flex; align-items: center; }
.site-footer__social svg { width: 16px; height: 16px; fill: var(--white); }
.site-footer__social a:hover svg { fill: var(--blue); }
.site-footer__col { flex: 1 1 160px; }
.site-footer__col h4 {
  color: var(--white);
  font-family: var(--body-font);
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin-bottom: 14px; }
.site-footer__col a { color: var(--white); }
.site-footer__bottom {
  max-width: 1400px;
  margin: 55px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  gap: 180px;
  flex-wrap: wrap;
  font-size: 16px;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--white); font-weight: 700; }

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

@media (max-width: 992px) {
  .two-col, .features__grid, .info-cols { flex-direction: column; gap: 40px; }
  .post-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 20px 160px; }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    z-index: 20;
    padding: 10px 20px 25px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 18px; }
  .site-header { position: relative; padding: 15px 20px; }
  .site-header__logo img { width: 110px; }

  .section { padding: 60px 20px; }
  .page-banner { padding: 90px 20px; }
  .contact-form-card .form-row { flex-direction: column; gap: 0; }
  .blog-toolbar input[type="search"] { margin-left: 0; width: 100%; }
}
