/* ==========================================================================
   Web Design Calgary — site styles
   Colours come from the original brand kit. Type and spacing use the
   fluid scales below, so change sizes there rather than per component.
   ========================================================================== */

:root {
  /* Colour */
  --color-primary: #415678;
  --color-primary-dark: #2f3f59;
  --color-accent: #b5389f;          /* logo magenta */
  --color-heading: #111827;
  --color-text: #4b5563;
  --color-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-soft: #f2f7fb;
  --color-border: #e3e9f0;

  /* Fonts */
  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale (mobile → desktop) */
  --text-xs: 0.8125rem;                                        /* 13px */
  --text-sm: 0.9375rem;                                        /* 15px */
  --text-base: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);       /* 16 → 17px */
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);         /* 17 → 20px */
  --text-xl: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);         /* 20 → 24px */
  --text-2xl: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);         /* 28 → 40px */
  --text-3xl: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);         /* 36 → 60px */

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-y: clamp(4rem, 2.8rem + 5vw, 7rem);
  --gutter: clamp(1.25rem, 0.9rem + 1.5vw, 2rem);

  /* Layout */
  --container: 1200px;
  --measure: 65ch;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --header-h: 84px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-l));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--color-primary); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-m);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-heading);
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); line-height: 1.15; }
h3 { font-size: var(--text-xl); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }

p { margin: 0 0 var(--space-l); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead { font-size: var(--text-lg); line-height: 1.65; color: var(--color-text); }

:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -60px;
  padding: var(--space-xs) var(--space-m);
  background: var(--color-primary);
  color: #fff;
  z-index: 100;
  border-radius: 6px;
}
.skip-link:focus { top: var(--space-s); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-s); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--space-xl);
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: #fff; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
  min-height: var(--header-h);
}
/* Text wordmark: "Web Design Calgary" on one line */
.site-logo {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-heading);
}
.site-logo:hover { color: var(--color-heading); }
.site-logo__accent {
  color: var(--color-accent);
  background: linear-gradient(90deg, #c13aa0, #8a63c9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: var(--space-xs);
  margin-right: calc(var(--space-xs) * -1);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px 0;
  border-radius: 2px;
  background: var(--color-heading);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav ul {
  display: flex;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  position: relative;
  display: block;
  padding: var(--space-xs) var(--space-m);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-heading);
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover { color: var(--color-primary); background: var(--color-bg-soft); }
.site-nav a[aria-current="page"] { color: var(--color-primary); background: var(--color-bg-soft); font-weight: 600; }

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 20px 30px rgba(17, 24, 39, 0.06);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: var(--space-xs) var(--gutter) var(--space-l); }
  .site-nav a {
    padding: var(--space-m) 0;
    font-size: var(--text-base);
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] { background: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section--soft { background: var(--color-bg-soft); }

.section__head {
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
}
.section__head h2 { margin-bottom: var(--space-m); }
.section__head p { max-width: 58ch; margin-inline: auto; font-size: var(--text-lg); }

.section__foot { margin-top: var(--space-3xl); text-align: center; }

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-s);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Page banner for inner pages */
.page-banner {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  background: var(--color-bg-soft);
  text-align: center;
}
.page-banner h1 { margin-bottom: var(--space-m); }
.page-banner p { max-width: 56ch; margin: 0 auto; font-size: var(--text-lg); }

/* Photo banner: the image sits behind a brand-colour wash so white text
   stays readable on the light, lavender-toned photos. */
.page-banner--image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  background: var(--color-primary-dark);
  color: #e6ecf4;
}
.page-banner--image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(47, 63, 89, 0.86) 0%, rgba(47, 63, 89, 0.74) 55%, rgba(47, 63, 89, 0.88) 100%);
}
.page-banner__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-banner--image h1 { color: #fff; }
.page-banner--image p { color: #e6ecf4; }

.breadcrumb { font-size: var(--text-sm); margin-bottom: var(--space-l); color: var(--color-muted); }
.breadcrumb a { text-decoration: none; }

/* ---------- Hero ---------- */

.hero {
  background: var(--color-bg-soft);
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(4.5rem, 3rem + 6vw, 8rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 5vw, 5rem);
  align-items: center;
}
.hero h1 { margin-bottom: var(--space-l); }
.hero .lead { max-width: 50ch; margin-bottom: var(--space-xl); }
.hero__media { position: relative; }
.hero__media img { border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); }
.hero__scroll {
  position: absolute;
  bottom: -28px;
  left: 10%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--color-primary);
  transition: background 0.2s, color 0.2s;
}
.hero__scroll:hover { background: var(--color-primary); color: #fff; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__media { order: -1; margin-bottom: var(--space-l); }
}

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: clamp(1.25rem, 0.8rem + 1.5vw, 2rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid--posts { row-gap: clamp(2.5rem, 2rem + 2vw, 3.5rem); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card h3 { margin-bottom: var(--space-s); }
.card p { font-size: var(--text-sm); line-height: 1.7; }

.card__list {
  list-style: none;
  margin: var(--space-l) 0 0;
  padding: var(--space-l) 0 0;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.card__list li {
  position: relative;
  padding-left: 1.6em;
  color: var(--color-heading);
}
.card__list li + li { margin-top: var(--space-xs); }
.card__list li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.45em;
  width: 0.7em;
  height: 0.4em;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* Checklist with a title and description per item */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-m); }
.checklist li {
  position: relative;
  padding: var(--space-l) var(--space-l) var(--space-l) calc(var(--space-l) + 2.25rem);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: var(--space-l);
  top: calc(var(--space-l) + 0.1rem);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.checklist strong {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
}

/* Numbered process steps laid out in a row */
.steps-grid {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--space-xl);
}
.steps-grid li {
  counter-increment: step;
  padding-top: var(--space-l);
  border-top: 2px solid var(--color-border);
}
.steps-grid li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-s);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-accent);
}
.steps-grid h3 { margin-bottom: var(--space-xs); }
.steps-grid p { font-size: var(--text-sm); }

/* ---------- Blog post cards ---------- */

.post-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: var(--space-l);
  align-items: start;
}
.post-card__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.post-card__title {
  margin-bottom: var(--space-xs);
  font-size: var(--text-lg);
  line-height: 1.35;
}
.post-card__title a { color: var(--color-heading); text-decoration: none; }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__excerpt {
  margin-bottom: var(--space-s);
  font-size: var(--text-sm);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__more {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 560px) {
  .post-card { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
  .post-card__thumb img { aspect-ratio: 16 / 10; }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-s);
  margin-bottom: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.meta a {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  text-decoration: none;
}
.meta > * + *::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: var(--space-s);
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  opacity: 0.5;
}

.chip {
  display: inline-block;
  padding: var(--space-2xs) var(--space-s);
  margin: 0 var(--space-2xs) var(--space-xs) 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover,
.chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.chip__count { opacity: 0.65; margin-left: var(--space-2xs); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin-bottom: var(--space-2xl);
  padding: var(--space-m) var(--space-l);
  border-radius: var(--radius);
  background: var(--color-bg-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}
.filter-bar[hidden] { display: none; }

.empty-state { text-align: center; padding-block: var(--space-2xl); }
.empty-state h1 { margin-bottom: var(--space-m); }
.empty-state p { margin-bottom: var(--space-xl); }

/* ---------- Single post ---------- */

.article { max-width: 720px; margin-inline: auto; }
.article h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); margin-bottom: var(--space-l); }
.article .meta { margin-bottom: var(--space-xl); font-size: var(--text-sm); }
.article__cover {
  width: 100%;
  margin-bottom: var(--space-2xl);
  border-radius: calc(var(--radius) * 1.5);
}
.article__body { font-size: var(--text-lg); line-height: 1.75; }
.article__body p { margin-bottom: var(--space-l); }
.article__body h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-s);
}
.article__body ul { padding-left: 1.25em; margin: 0 0 var(--space-l); }
.article__body li { margin-bottom: var(--space-xs); padding-left: var(--space-2xs); }
.article__body li::marker { color: var(--color-accent); }
.article__body strong { color: var(--color-heading); font-weight: 600; }
.article__footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--color-border);
}
.article__footer p { margin-bottom: var(--space-s); font-size: var(--text-sm); }

/* ---------- Taxonomy pages ---------- */

.tax-card { display: block; text-decoration: none; color: inherit; }
.tax-card h3 { margin-bottom: var(--space-xs); }
.tax-card p { margin-bottom: var(--space-l); }
.tax-card__count {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.tag-cloud { text-align: center; max-width: 820px; margin: 0 auto; }
.tag-cloud .chip { font-size: var(--text-base); padding: var(--space-xs) var(--space-l); margin: 0 var(--space-xs) var(--space-s) 0; }

/* ---------- About ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 5vw, 5rem);
  align-items: center;
}
.split h2 { margin-bottom: var(--space-l); }
.split p { max-width: var(--measure); }
.split .btn { margin-top: var(--space-s); }
.split img:not(.brand-mark) { border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); }

/* Logo shown in page content */
.brand-mark { width: clamp(96px, 8rem + 2vw, 150px); height: auto; margin-bottom: var(--space-l); }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--space-xl) 4rem;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.1em;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}
.steps h3 { margin-bottom: var(--space-2xs); }

/* ---------- CTA band ---------- */

.cta {
  background:
    linear-gradient(rgba(65, 86, 120, 0.86), rgba(47, 63, 89, 0.9)),
    url("../images/banner/calgary-skyline-800.jpg") center 60% / cover no-repeat,
    var(--color-primary);
  color: #dfe6f0;
  text-align: center;
  padding-block: clamp(4rem, 3rem + 4vw, 6rem);
}
@media (min-width: 801px) {
  .cta {
    background:
      linear-gradient(rgba(65, 86, 120, 0.86), rgba(47, 63, 89, 0.9)),
      url("../images/banner/calgary-skyline.jpg") center 60% / cover no-repeat,
      var(--color-primary);
  }
}
.cta h2 { color: #fff; margin-bottom: var(--space-s); }
.cta p { max-width: 50ch; margin: 0 auto var(--space-xl); font-size: var(--text-lg); }
.cta .btn { background: #fff; color: var(--color-primary); border-color: #fff; }
.cta .btn:hover { background: transparent; color: #fff; }

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-grid h2 { margin-bottom: var(--space-m); }

.contact-list { list-style: none; padding: 0; margin: var(--space-xl) 0 0; }
.contact-list li { margin-bottom: var(--space-l); }
.contact-list strong {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-heading);
}

.form { display: grid; gap: var(--space-l); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-heading);
}
.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 50px;
  padding: var(--space-s) var(--space-m);
  border: 1px solid #d5dde7;
  border-radius: 10px;
  font: inherit;
  font-size: var(--text-base);
  color: var(--color-heading);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(65, 86, 120, 0.15); }
.form [aria-invalid="true"] { border-color: #c0392b; }
.form__error { display: block; min-height: 1.25em; margin-top: var(--space-2xs); font-size: var(--text-xs); color: #c0392b; }
.form__status { padding: var(--space-m) var(--space-l); border-radius: 10px; background: #e7f6ec; color: #1e6b3a; font-weight: 500; }
.form__status[hidden] { display: none; }

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

.site-footer {
  background: #0f1722;
  color: #9aa5b5;
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5rem) var(--space-xl);
  font-size: var(--text-sm);
}
.site-footer a { color: #dfe6f0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-2xl); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { max-width: 36ch; }
.footer-brand img { width: 96px; height: 96px; margin-bottom: var(--space-l); background: #fff; border-radius: 18px; padding: 8px; }
.footer-title {
  margin-bottom: var(--space-m);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: #fff;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: var(--space-xs); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-l);
  margin-top: var(--space-3xl);
  padding-top: var(--space-l);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-xs);
}

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
/* Content stays visible if JS never runs */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Portfolio ---------- */

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
}
.portfolio-filters .chip { margin: 0; padding: var(--space-xs) var(--space-l); font-family: inherit; cursor: pointer; }

.grid--projects { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.grid--projects-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.project-card[hidden] { display: none; }

.project-card__media { display: block; text-decoration: none; background: var(--color-bg-soft); border-bottom: 1px solid var(--color-border); overflow: hidden; }
.project-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.project-card:hover .project-card__media img { transform: scale(1.03); }

/* Mock browser toolbar above each screenshot */
.browser-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.browser-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #e3e9f0; }
.browser-bar > span:nth-child(1) { background: #ff6159; }
.browser-bar > span:nth-child(2) { background: #ffbd2e; }
.browser-bar > span:nth-child(3) { background: #28c941; }
.browser-bar em {
  flex: 1;
  margin-left: var(--space-xs);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-bg-soft);
  font-size: 0.72rem;
  font-style: normal;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--space-l); }
.project-card__title { margin-bottom: var(--space-xs); font-size: var(--text-xl); }
.project-card__body p { font-size: var(--text-sm); margin-bottom: var(--space-l); }
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

/* Case-study rows on the portfolio page */
.case-studies { display: grid; gap: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.case-study {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.case-study[hidden] { display: none; }
.case-study:nth-child(even) .case-study__media { order: 2; }

.case-study__media {
  display: block;
  overflow: hidden;
  text-decoration: none;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.case-study__media:hover { transform: translateY(-4px); }
.case-study__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

.case-study__title { margin-bottom: var(--space-s); font-size: var(--text-2xl); }
.case-study__client { font-size: var(--text-lg); color: var(--color-heading); margin-bottom: var(--space-l); }
.case-study__label {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.case-study__body > p:not(.case-study__client) { font-size: var(--text-sm); margin-bottom: var(--space-l); }
.case-study__list { margin: 0 0 var(--space-xl); padding-top: 0; border-top: 0; }
.case-study .btn { gap: 6px; }

@media (max-width: 900px) {
  .case-study { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .case-study:nth-child(even) .case-study__media { order: 0; }
}

/* ---------- Process page ---------- */

.hero--process .split { align-items: center; }
.pill-list { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; margin: var(--space-xl) 0 0; padding: 0; }
.pill-list li {
  padding: var(--space-2xs) var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-heading);
}

/* App-style window used for the dashboard and marketing map */
.window {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) * 1.3);
  box-shadow: var(--shadow);
  padding: var(--space-l);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: var(--space-m);
  margin-bottom: var(--space-l);
  border-bottom: 1px solid var(--color-border);
}
.window__bar span { width: 10px; height: 10px; border-radius: 50%; background: #d6d9de; }
.window__bar strong { margin-left: var(--space-s); font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 600; color: var(--color-heading); }
.window__note { margin: var(--space-l) 0 0; font-size: var(--text-sm); color: var(--color-muted); }

/* Tables */
.table-block { margin-top: var(--space-3xl); }
.table-block h3 { margin-bottom: var(--space-l); }
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.window .table-wrap { border-radius: 10px; }
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--text-sm); text-align: left; }
.data-table--compact { min-width: 420px; }
.data-table th,
.data-table td { padding: var(--space-m) var(--space-l); border-bottom: 1px solid var(--color-border); vertical-align: top; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table thead th {
  background: var(--color-bg-soft);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-heading);
  white-space: nowrap;
}
.data-table tbody th { font-family: var(--font-heading); font-weight: 600; color: var(--color-heading); white-space: nowrap; }
.data-table tbody tr:hover { background: #fafcfe; }
.data-table--compact th,
.data-table--compact td { padding: var(--space-s) var(--space-m); }
.data-table--compare td { text-align: center; }
.data-table--compare thead th:not(:first-child) { text-align: center; }
.data-table--compare thead th:nth-child(3),
.data-table--compare td:nth-child(3) { background: rgba(65, 86, 120, 0.05); }
.phase-num { display: inline-block; min-width: 2em; color: var(--color-accent); font-weight: 800; }
.term-full { display: block; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); white-space: normal; }
.tick { color: #1e8e4e; font-weight: 700; font-size: 1.05rem; }
.dash { color: #b8c0cc; }

/* Status pills */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.status--done { background: #e7f6ec; color: #1e6b3a; }
.status--progress { background: #fff4d6; color: #8a5a00; }
.status--next { background: #eef1f5; color: #4b5563; }

/* Marketing map */
.window--map { padding: clamp(1rem, 0.6rem + 1.5vw, 1.75rem); }
.marketing-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-l); }
@media (max-width: 900px) { .marketing-map { grid-template-columns: minmax(0, 1fr); } }
.map-column {
  display: grid;
  align-content: start;
  gap: var(--space-m);
  padding: var(--space-l);
  border: 1px dashed #d5dde7;
  border-radius: var(--radius);
  background: #fcfdfe;
}
.map-column--highlight { background: #f2f4fd; border-color: #c9d2f2; }
.map-column__title {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.map-card { padding: var(--space-m) var(--space-l); background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04); }
.map-card h4 { margin: 0 0 var(--space-s); font-size: var(--text-base); font-weight: 600; letter-spacing: -0.01em; }
.map-card__tools { display: flex; gap: var(--space-xs); margin-bottom: var(--space-s); }
.map-card p { margin: 0; font-size: var(--text-sm); line-height: 1.6; }
.tool-chip {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-soft);
}
.tool-chip img { width: 20px; height: 20px; opacity: 0.85; }
.tool-chip--text { width: auto; padding: 0 var(--space-s); border-radius: 999px; font-size: var(--text-xs); font-weight: 700; color: var(--color-heading); }

/* Pricing */
.pricing-grid { align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card .card__list { margin-bottom: var(--space-xl); }
.price-card .btn { margin-top: auto; }
.price { margin: 0 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.03em; color: var(--color-heading); }
.price-card--featured { border: 2px solid var(--color-primary); box-shadow: var(--shadow); }

/* Audit */
.audit-list { border-top: 0; padding-top: 0; }
.form__hint { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }

/* FAQ accordion */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: var(--space-s); }
.faq details { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); transition: box-shadow 0.2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  position: relative;
  padding: var(--space-l) calc(var(--space-l) + 2rem) var(--space-l) var(--space-l);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: var(--space-l);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 var(--space-l) var(--space-l); }
.tool-chip--wide { width: auto; padding: 0 var(--space-s); border-radius: 999px; }
.tool-chip--wide img { width: 40px; }

@media (max-width: 560px) {
  .data-table--compact { min-width: 0; }
  .data-table--compact th,
  .data-table--compact td { padding: var(--space-s); }
  .data-table--compact tbody th { white-space: normal; }
}

/* ---------- Footer legal links ---------- */
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-l); list-style: none; margin: 0; padding: 0; }
.footer-legal a { color: #9aa5b5; }
.footer-legal a:hover { color: #fff; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin-inline: auto; }
.legal__updated { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-xl); }
.legal h2 { font-size: var(--text-xl); margin: var(--space-2xl) 0 var(--space-s); }
.legal ul { padding-left: 1.25em; margin: 0 0 var(--space-l); }
.legal li { margin-bottom: var(--space-xs); }
.legal li::marker { color: var(--color-accent); }
.legal strong { color: var(--color-heading); font-weight: 600; }
.footer-bottom { align-items: center; }
.footer-bottom p { margin: 0; }

/* ==========================================================================
   WordPress additions
   ========================================================================== */

/* Project write-up from the editor */
.case-study__content p { font-size: var(--text-sm); margin-bottom: var(--space-l); }
.case-study__title a { color: inherit; text-decoration: none; }
.case-study__title a:hover { color: var(--color-primary); }
.project-card__title a { color: inherit; text-decoration: none; }
.single-project .breadcrumb { margin-bottom: var(--space-2xl); }

/* Rank Math breadcrumbs */
.breadcrumb .separator { margin: 0 0.35em; color: var(--color-muted); }
.breadcrumb .last { color: var(--color-muted); }

/* Post content from the editor */
.article__body img,
.legal img { border-radius: var(--radius); }
.article__body figure,
.legal figure { margin: var(--space-xl) 0; }
.article__body figcaption,
.legal figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.article__body blockquote,
.legal blockquote { margin: var(--space-xl) 0; padding: var(--space-m) var(--space-l); border-left: 3px solid var(--color-accent); background: var(--color-bg-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.article__body ol,
.legal ol { padding-left: 1.25em; margin: 0 0 var(--space-l); }
.legal h3 { font-size: var(--text-lg); margin: var(--space-xl) 0 var(--space-xs); }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-l); font-size: var(--text-sm); }
.legal th,
.legal td { padding: var(--space-s); border-bottom: 1px solid var(--color-border); text-align: left; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pagination */
.pagination { margin-top: var(--space-3xl); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-m);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary);
}
.pagination .page-numbers.current,
.pagination a.page-numbers:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Contact Form 7 (its own stylesheet is disabled) */
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7-form-control-wrap { display: block; }
.form .wpcf7-not-valid { border-color: #c0392b; }
.wpcf7-not-valid-tip { display: block; margin-top: var(--space-2xs); font-size: var(--text-xs); color: #c0392b; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: var(--space-m) var(--space-l); border-radius: 10px; font-weight: 500; background: #fdecea; color: #a12a1e; }
.wpcf7 form.sent .wpcf7-response-output { background: #e7f6ec; color: #1e6b3a; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-spinner {
  visibility: hidden;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: var(--space-s);
  vertical-align: middle;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
}
.wpcf7 form.submitting .wpcf7-spinner { visibility: visible; animation: wdc-spin 0.8s linear infinite; }
@keyframes wdc-spin { to { transform: rotate(360deg); } }
.form .wpcf7-submit { cursor: pointer; }
/* CF7 renders the submit button as an <input>; restore the button style over the field styles. */
.form input.btn {
  width: auto;
  min-height: 52px;
  padding: 0 var(--space-xl);
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.form input.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-2px); }
.form input.btn:focus { box-shadow: 0 0 0 4px rgba(65, 86, 120, 0.25); }
.form textarea { height: 180px; }

/* Without JavaScript the menu toggle can't work, so show the menu inline. */
@media (max-width: 1024px) {
  .no-js .nav-toggle { display: none; }
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: var(--space-s); }
  .no-js .site-nav { display: block; position: static; width: 100%; border: 0; box-shadow: none; background: none; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: var(--space-2xs); padding: 0; }
  .no-js .site-nav a { padding: var(--space-xs) var(--space-s); border-bottom: 0; font-size: var(--text-sm); }
}

/* Content split with the Page Break block */
.page-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-xl); font-size: var(--text-sm); }
.page-links__label { font-weight: 600; color: var(--color-heading); margin-right: var(--space-2xs); }
.page-links a,
.page-links > .page-links__item { text-decoration: none; }
.page-links__item { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 var(--space-s); border: 1px solid var(--color-border); border-radius: 999px; }
.page-links a .page-links__item:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.page-links > .page-links__item { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Password-protected case study */
.case-study--protected { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.post-password-form { display: grid; gap: var(--space-s); }
.post-password-form p { margin: 0; }
.post-password-form label { display: grid; gap: var(--space-2xs); font-weight: 600; color: var(--color-heading); }
.post-password-form input[type="password"] { min-height: 50px; padding: var(--space-s) var(--space-m); border: 1px solid #d5dde7; border-radius: 10px; font: inherit; }
.post-password-form input[type="submit"] { justify-self: start; min-height: 48px; padding: 0 var(--space-xl); border: 0; border-radius: 999px; background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-weight: 600; cursor: pointer; }

/* Honeypot field: kept out of view and out of the tab order. */
.wdc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cloudflare Turnstile (CF7): reserve the widget's height so the form doesn't jump when it loads. */
.form__turnstile { min-height: 65px; }
.form__turnstile:empty { display: none; }

/* ---------- Footer social links ---------- */
.social-links { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; margin: var(--space-m) 0 0; padding: 0; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #9aa5b5; text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease; }
.social-links a:hover,
.social-links a:focus-visible,
.social-links a:active { color: var(--color-accent); background: rgba(255, 255, 255, 0.06); }
.social-links svg { display: block; }

/* ---------- Footer: latest articles and tags ---------- */
.footer-grid { grid-template-columns: 1.4fr 0.8fr 0.8fr 1.3fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-posts a { color: #9aa5b5; text-decoration: none; }
.footer-posts a:hover { color: #fff; }
.footer-title--sub { margin-top: var(--space-l); font-size: var(--text-sm); }
.footer-tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; margin: 0; padding: 0; }
.footer-tags a { display: inline-block; padding: 2px 10px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: #9aa5b5; font-size: var(--text-xs); text-decoration: none; }
.footer-tags a:hover { border-color: #fff; color: #fff; }

.footer-since { margin-top: var(--space-s); color: #fff; font-weight: 500; }
.footer-phone { margin-top: var(--space-s); }
.footer-phone a { color: #fff; font-weight: 500; text-decoration: none; }
.footer-phone a:hover { color: var(--color-accent); }
