/*
Theme Name: Northern Data
Theme URI: https://northerndata.ca
Author: Northern Data
Author URI: https://northerndata.ca
Description: Custom theme for Northern Data — IT services, data recovery, backup & ransomware protection, and hardware repair in Hamilton, Ontario.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: northern-data
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --navy:       #0f2940;
  --blue:       #1e5b8c;
  --blue-light: #2f7fb8;
  --gray-light: #f4f6f8;
  --gray-mid:   #5a6b7a;
  --text:       #1c2733;
  --white:      #ffffff;
  --radius:     8px;
  --max-width:  1100px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: var(--blue); }

h1, h2, h3 { font-weight: 700; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }
p  { color: var(--gray-mid); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--gray-mid);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 560px;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary  { background: var(--blue); color: var(--white); }
.btn-primary:hover  { background: var(--navy); color: var(--white); }
.btn-outline  { border-color: var(--white); color: var(--white); }
.btn-outline:hover  { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-small    { padding: 9px 20px; font-size: 0.88rem; background: var(--blue); color: var(--white); }
.btn-small:hover    { background: var(--navy); color: var(--white); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid #e5e9ed;
  z-index: 200;
  transition: box-shadow 0.25s ease;
}
.site-header.shrink { box-shadow: 0 2px 16px rgba(15,41,64,0.10); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  transition: padding 0.25s ease;
}
.site-header.shrink .header-inner { padding: 8px 0; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img {
  height: 42px;
  width: auto;
  transition: height 0.25s ease;
}
.site-header.shrink .logo-img { height: 32px; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.logo-text span { color: var(--blue-light); }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; transition: color 0.15s; }
.nav a:hover { color: var(--blue); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0;
}

/* ── Hero slider ──────────────────────────────────────── */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.hero-slide-media--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 27, 46, 0.92) 0%,
    rgba(15, 41, 64, 0.80) 55%,
    rgba(30, 91, 140, 0.55) 100%
  );
}
.hero-slide-logo {
  position: absolute;
  z-index: 1;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 42%;
  max-width: 460px;
  opacity: 0.16;
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-slide-logo { display: none; }
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  transition: opacity 0.28s ease;
}
.hero-inner.is-swapping { opacity: 0; }

.hero-slider-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot:hover { background: rgba(255,255,255,0.6); }
.hero-dot.is-active { background: var(--white); transform: scale(1.15); }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(15,41,64,0.35);
  color: var(--white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-arrow:hover { background: rgba(15,41,64,0.6); border-color: rgba(255,255,255,0.6); }
.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 20px; }

.hero h1 { color: var(--white); margin-bottom: 20px; }

.hero .section-label {
  color: #eaf6ff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 7px 16px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero-sub {
  color: #c8dff0;
  font-size: 1.15rem;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats {
  background: var(--navy);
  padding: 44px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  color: #aec4d6;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 96px 0;
  background: var(--gray-light);
}
.services-header { margin-bottom: 52px; }

/* A vertical stack of full-width horizontal rows — one service per
   row, no wrapping/scrolling involved. Each row: icon, then text,
   then the "Learn more" link, laid out left-to-right. */
.service-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--white);
  border-radius: 12px;
  padding: 28px 32px;
  border: 1px solid #e5e9ed;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 32px rgba(15,41,64,0.10);
}
.service-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--navy));
  border-radius: 16px;
  color: var(--white);
}
.service-icon svg { width: 32px; height: 32px; }
.service-card-body { flex: 1 1 auto; min-width: 0; }
.service-card h3 { color: var(--navy); margin-bottom: 6px; }
.service-card p  { font-size: 0.95rem; line-height: 1.65; margin: 0; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 96px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-logo-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 420px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 24px 60px -24px rgba(15, 41, 64, 0.55);
}
.about-logo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(15, 41, 64, 0.15) 0%, rgba(15, 41, 64, 0.72) 100%);
}
.about-logo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.about-logo-card img.about-logo-icon {
  position: relative;
  z-index: 1;
  width: 48%;
  max-width: 230px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.4));
}
.about-text p { margin-bottom: 18px; font-size: 1rem; line-height: 1.75; }
.about-text p:last-child { margin-bottom: 0; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 96px 0;
  background: var(--gray-light);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 56px;
  align-items: start;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-info p  { margin-bottom: 12px; font-size: 0.97rem; }
.contact-info a  { color: var(--blue); }

.contact-form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  border: 1px solid #e5e9ed;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form-card label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
  margin-top: 12px;
}
.contact-form-card label:first-child { margin-top: 0; }
.form-hint {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: 6px;
  line-height: 1.5;
}
.contact-form-card input,
.contact-form-card textarea {
  padding: 11px 14px;
  border: 1px solid #ccd5dc;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.97rem;
  transition: border-color 0.15s;
}
.contact-form-card input:focus,
.contact-form-card textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,91,140,0.10);
}
.contact-form-card button { margin-top: 20px; width: 100%; text-align: center; }

/* Honeypot field — off-screen rather than display:none, which more
   spam bots detect and skip. Real visitors never see or reach it. */
.nd-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success {
  color: #1b7a3d;
  background: rgba(27,122,61,0.08);
}
.form-status.is-error {
  color: #b3261e;
  background: rgba(179,38,30,0.08);
}
.contact-form-card button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: #b9c8d4;
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
}
.footer-inner a { color: #b9c8d4; transition: color 0.15s; }
.footer-inner a:hover { color: var(--white); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid   { grid-template-columns: 1fr; }
  .about-logo-card { display: none; } /* hide on tablet/mobile — text reads fine alone */
}

@media (max-width: 640px) {
  .service-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .service-card .service-link { margin-top: 4px; }
}

@media (max-width: 768px) {
  .nav          { display: none; }
  .hero         { padding: 64px 0; min-height: auto; }
  .stats-grid   { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 6px; }
  .hero-arrow   { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #network-canvas { display: none; }
  .hero-slide, .hero-inner { transition: none; }
}

/* ============================================================
   SERVICE CARD LINKS (front page)
   ============================================================ */
a.service-card { display: flex; }
.service-card .service-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.88rem;
}
a.service-card:hover .service-link { color: var(--navy); }
.service-card--featured {
  position: relative;
  border-color: var(--blue-light);
  border-width: 2px;
}
.service-badge {
  position: absolute;
  top: -1px;
  left: 22px;
  background: var(--blue-light);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 0 0 6px 6px;
}

/* ============================================================
   PAGE HERO (service detail pages)
   ============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding: 56px 0 52px;
  color: var(--white);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 27, 46, 0.94) 0%,
    rgba(15, 41, 64, 0.86) 55%,
    rgba(30, 91, 140, 0.62) 100%
  );
}
.page-hero .container {
  position: relative;
  z-index: 1;
}
.page-hero h1 { color: var(--white); margin-bottom: 0; }
.page-hero .section-label { color: #bcdcf5; margin-bottom: 10px; }
.breadcrumb-back {
  display: block;
  color: #bcdcf5;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.breadcrumb-back:hover { color: var(--white); }

/* ============================================================
   SERVICE DETAIL LAYOUT
   ============================================================ */
.service-detail { padding: 80px 0; background: var(--white); }
.service-detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.service-detail-content h2 {
  margin-top: 40px;
  font-size: 1.5rem;
}
.service-detail-content h2:first-child { margin-top: 0; }
.service-detail-content p {
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.75;
}
.service-detail-content ul,
.service-detail-content ol {
  margin: 0 0 26px 22px;
}
.service-detail-content li {
  margin-bottom: 10px;
  color: var(--gray-mid);
  line-height: 1.65;
}
.service-detail-content strong { color: var(--navy); }

/* Icon-illustrated content blocks used inside page content (via
   wp:html blocks) — e.g. the Data Recovery page's free-inspection
   callout, pricing tiers, device checklist, and guarantee box. */
.content-callout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--gray-light);
  border: 1px solid #e5e9ed;
  border-radius: 12px;
  padding: 24px 26px;
  margin: 0 0 28px;
}
.content-callout-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-light), var(--navy));
  border-radius: 12px;
  color: var(--white);
}
.content-callout-icon svg { width: 22px; height: 22px; }
.content-callout h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }
.content-callout p { margin-bottom: 0 !important; font-size: 0.95rem; }

.recovery-tiers {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 28px;
}
.recovery-tier {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #e5e9ed;
  border-radius: 10px;
}
.recovery-tier-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border-radius: 50%;
  color: var(--white);
}
.recovery-tier-icon svg { width: 20px; height: 20px; }
.recovery-tier-body { flex: 1 1 auto; min-width: 0; }
.recovery-tier-body h4 { color: var(--navy); font-size: 0.98rem; margin-bottom: 3px; }
.recovery-tier-body p { margin: 0 !important; font-size: 0.88rem; color: var(--gray-mid); }
.recovery-tier-price {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--blue);
  font-size: 1rem;
  white-space: nowrap;
}

.device-checklist {
  list-style: none;
  margin: 0 0 28px !important;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}
.device-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0 !important;
  color: var(--text) !important;
}
.device-checklist-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: 50%;
  color: var(--white);
}
.device-checklist-icon svg { width: 14px; height: 14px; }

.guarantee-box {
  text-align: center;
  background: var(--navy);
  color: var(--white);
  border-radius: 12px;
  padding: 28px 30px;
  margin: 8px 0 28px;
}
.guarantee-box p {
  margin: 0 !important;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white) !important;
  line-height: 1.55;
}
.guarantee-box p strong { color: #7fc7ff; }

@media (max-width: 480px) {
  .device-checklist { grid-template-columns: 1fr; }
  .content-callout,
  .recovery-tier { flex-direction: column; }
}

.cta-panel {
  background: var(--gray-light);
  border: 1px solid #e5e9ed;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 32px;
}
.cta-panel h3 { margin-bottom: 10px; font-size: 1.15rem; }
.cta-panel p { font-size: 0.92rem; margin-bottom: 20px; }
.cta-contact { margin-top: 18px; }
.cta-contact p { font-size: 0.9rem; margin-bottom: 6px; }

.other-services h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: 14px;
}
.other-services ul { list-style: none; }
.other-services li { border-bottom: 1px solid #e5e9ed; }
.other-services li:last-child { border-bottom: none; }
.other-services a {
  display: block;
  padding: 12px 2px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
}
.other-services a:hover { color: var(--blue); }

@media (max-width: 900px) {
  .service-detail-grid { grid-template-columns: 1fr; }
  .service-detail-sidebar { order: -1; }
}
