/* ==========================================================================
   Canadian Info Tech — styles.css
   Modern corporate-tech design · brand red #D6001C · charcoal · white
   ========================================================================== */

:root {
  --red: #D6001C;
  --red-dark: #A80016;
  --charcoal: #141417;
  --charcoal-2: #1D1D21;
  --ink: #232327;
  --gray: #5C5C63;
  --gray-light: #8A8A92;
  --line: #E7E7EB;
  --bg: #FFFFFF;
  --bg-soft: #F6F6F8;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(20, 20, 23, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 20, 23, 0.10);
  --shadow-lg: 0 18px 48px rgba(20, 20, 23, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
  --header-h: 76px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.18;
  color: var(--charcoal);
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

p { margin: 0 0 1.1em; }

ul { margin: 0 0 1.1em; padding-left: 1.3em; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.8rem; color: var(--white); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--charcoal); color: #C9C9CF; }
.section--dark h2, .section--dark h3 { color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 2.6rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.7rem;
}

.lead { font-size: 1.15rem; color: var(--gray); }
.section--dark .lead { color: #B9B9C0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(214, 0, 28, 0.28);
}
.btn--primary:hover {
  background: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(214, 0, 28, 0.34);
}
.btn--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); border-color: var(--white); }
.btn--outline-dark { border-color: var(--charcoal); color: var(--charcoal); }
.btn--outline-dark:hover { background: var(--charcoal); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(20, 20, 23, 0.07);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand img { width: 118px; height: auto; }
.brand span {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span em { font-style: normal; color: var(--red); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.35rem 0;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }
.main-nav a[aria-current="page"] { color: var(--charcoal); }
.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: var(--radius-sm);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--charcoal);
}
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  color: var(--white);
  background: var(--charcoal) url("../assets/hero-city-skyline.jpg") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 15, 0.68);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: var(--red);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; padding: 5rem 0; }
.hero h1 { color: var(--white); }
.hero p { font-size: 1.2rem; color: #D9D9DE; max-width: 620px; }
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--charcoal);
  color: var(--white);
  padding: clamp(3.2rem, 7vw, 5rem) 0;
  border-bottom: 5px solid var(--red);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.35em; }
.page-hero p { color: #C4C4CB; max-width: 640px; margin-bottom: 0; font-size: 1.12rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.88rem;
  color: #9A9AA2;
  margin-bottom: 1.1rem;
}
.breadcrumb a { color: #C9C9CF; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb .sep { margin: 0 0.5rem; color: #6A6A72; }
.breadcrumb [aria-current] { color: var(--white); }

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.facts {
  display: flex;
  gap: 2.2rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.fact strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1.1;
}
.fact span { font-size: 0.9rem; color: var(--gray); }

/* ---------- Mission band ---------- */
.mission {
  border-left: 5px solid var(--red);
  background: var(--white);
  padding: clamp(1.8rem, 4vw, 3rem);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}
.mission p { font-size: 1.14rem; color: var(--gray); margin-bottom: 0; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(214, 0, 28, 0.35);
}
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 0.45em; }
.card-body h3 a { color: var(--charcoal); }
.card-body h3 a:hover { color: var(--red); }
.card-body p { color: var(--gray); font-size: 0.98rem; flex: 1; }

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(214, 0, 28, 0.08);
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 0.9rem;
  align-self: flex-start;
}

.card-link {
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card-link svg { transition: transform 0.2s ease; }
.card-link:hover svg { transform: translateX(4px); }

/* ---------- Expertise grid ---------- */
.expertise-item {
  background: var(--charcoal-2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.expertise-item:hover {
  transform: translateY(-6px);
  border-color: rgba(214, 0, 28, 0.6);
  background: #222228;
}
.expertise-item .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(214, 0, 28, 0.14);
  border-radius: 11px;
  margin-bottom: 1.1rem;
  color: var(--red);
}
.expertise-item h3 { color: var(--white); font-size: 1.12rem; margin-bottom: 0.4em; }
.expertise-item p { color: #A9A9B1; font-size: 0.95rem; margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal);
  color: var(--white);
  text-align: center;
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 5px;
  background: var(--red);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #BDBDC5; max-width: 640px; margin-inline: auto; }
.cta-band .btn { margin-top: 1.2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0E0E11;
  color: #9C9CA4;
  padding: 3.6rem 0 0;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.6rem;
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-brand img { width: 120px; margin-bottom: 1rem; }
.footer-brand p { max-width: 340px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a { color: #9C9CA4; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #77777F;
}

/* ---------- Listing pages (news / success stories) ---------- */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.84rem;
  color: var(--gray-light);
  margin-bottom: 0.7rem;
}
.post-card-meta .dot::before { content: "·"; }

/* Text-based card for posts without covers */
.card--text { padding: 0; }
.card--text .card-body { padding: 2rem 2rem 2.1rem; }
.card--text .quote-mark {
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 0.6rem;
}

/* ---------- Article (post pages) ---------- */
.article-hero { background: var(--charcoal); color: var(--white); padding: clamp(2.6rem, 6vw, 4.2rem) 0; border-bottom: 5px solid var(--red); }
.article-hero h1 { color: var(--white); font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 900px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  color: #A9A9B1;
  font-size: 0.92rem;
  margin-top: 1rem;
}
.article-meta .card-tag { margin-bottom: 0; background: var(--red); color: var(--white); }

.article-cover {
  margin: -0.5rem auto 2.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
}
.article-cover img { width: 100%; }

.article-body { max-width: 760px; margin-inline: auto; font-size: 1.08rem; }
.article-body h3 { margin-top: 2.2em; }
.article-body p { color: #3A3A40; }
.article-body ul { padding-left: 0; list-style: none; margin-bottom: 1.4em; }
.article-body ul li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
  color: #3A3A40;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 2px;
}
.article-body a { font-weight: 600; }

.article-cta {
  max-width: 760px;
  margin: 3rem auto 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
}
.article-cta h3 { margin-bottom: 0.4em; }
.article-cta p { color: var(--gray); margin-bottom: 1.1rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  margin-top: 2.8rem;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { margin-bottom: 1.15rem; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  color: var(--charcoal);
}
.form-field label .req { color: var(--red); }
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(214, 0, 28, 0.12);
}
.form-field textarea { min-height: 150px; resize: vertical; }

.contact-card {
  background: var(--charcoal);
  color: #C6C6CD;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.4rem;
}
.contact-card h3 { color: var(--white); font-size: 1.15rem; }
.contact-card a { color: var(--white); font-weight: 700; font-size: 1.1rem; word-break: break-all; }
.contact-card a:hover { color: var(--red); }
.contact-card .icon-line { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.3rem; }
.contact-card .icon-line:last-child { margin-bottom: 0; }
.contact-card .icon-line svg { flex: none; margin-top: 0.2rem; color: var(--red); }
.contact-card p { margin-bottom: 0; font-size: 0.95rem; }

.form-status {
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 1.3rem;
  font-weight: 600;
}
.form-status--ok { background: #E9F7EE; color: #177245; border: 1px solid #BDE5C9; }
.form-status--err { background: #FDECEE; color: #A80016; border: 1px solid #F5C2C9; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card-media img, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-115%);
    transition: transform 0.3s ease;
    visibility: hidden;
  }
  .main-nav.is-open { transform: translateY(0); visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav li:last-child { border-bottom: 0; }
  .main-nav a { display: block; padding: 0.9rem 0.2rem; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
  .nav-cta { text-align: center; margin-top: 0.8rem; padding: 0.85rem 1rem !important; }

  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .facts { gap: 1.4rem; }
  .hero-inner { padding: 3.5rem 0; }
}
