/* Kelly Davis website styles */

:root {
  --navy: #0d1f3c;
  --coral: #e07a55;
  --coral-dark: #b05030;
  --coral-deeper: #9a4226;
  --coral-ink: #a8482a;
  --coral-soft: #f6e7df;
  --bg: #f6f2ef;
  --bg-alt: #ebe6e1;
  --bg-pink: #f4e6e2;
  --card: #f9f5f2;
  --text: #4a4f5a;
  --muted: #5a606c;
  --border: #e8ddd7;
  --shadow: 0 4px 14px rgba(13, 31, 60, 0.07);
  --radius: 12px;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--coral-soft); color: var(--navy); }

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

.hero :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

h1, h2, h3 {
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

h1, h2 { letter-spacing: -0.03em; font-weight: 700; }
h3 { font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; }

a { color: inherit; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  text-decoration: none;
  color: var(--navy);
  font-size: 0.93rem;
  padding: 20px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}

.nav a:hover { color: var(--coral-ink); }

.nav .nav-cta {
  color: #fff;
  padding: 9px 20px;
  font-size: 0.92rem;
  border-bottom: 0;
}

.nav .nav-cta:hover { color: #fff; }

.nav a.active {
  color: var(--coral-ink);
  border-bottom-color: var(--coral);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}

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

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--coral-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 31, 60, 0.18);
}

.btn-primary:hover { background: var(--coral-deeper); box-shadow: 0 6px 18px rgba(13, 31, 60, 0.22); }

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn-dark:hover { background: #1b3159; }

/* ---------- Image placeholders ---------- */

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(45deg, #e2dbd5, #e2dbd5 12px, #ddd5ce 12px, #ddd5ce 24px);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px dashed #c9bfb7;
}

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

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-pink { background: var(--bg-pink); }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: #1f2128;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 64%;
  object-fit: cover;
  object-position: center 30%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
}

.hero > .container { width: 100%; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: min(560px, 46vw);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
}

.hero p {
  margin: 22px 0 30px;
  font-size: 1.15rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

/* ---------- Trusted by strip ---------- */

.trusted {
  background: #f3efec;
  padding: 44px 0 48px;
  overflow: hidden;
}

.trusted-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  color: #5a6476;
  margin-bottom: 26px;
}

.marquee { overflow: hidden; }

.marquee-track {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  animation: scroll 50s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 64px;
  margin-right: 72px;
}

.marquee-track img {
  height: var(--h);
  width: auto;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 8px 48px; padding-inline: 24px; }
  .marquee-track li { margin-right: 0; }
  .marquee-track li[aria-hidden] { display: none; }
}

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

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 4px solid #fff;
  box-shadow: 0 18px 40px rgba(13, 31, 60, 0.15);
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}

.about h2 {
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  margin-bottom: 22px;
}

.about p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

/* ---------- Grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* ---------- Feature cards (icon + title + text) ---------- */

.feature { padding: 30px; }

.feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.feature-head svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--coral-dark);
}

.feature h3 { font-size: 1.2rem; }

.feature p {
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ---------- Testimonials ---------- */

.testimonials {
  columns: 3;
  column-gap: 32px;
}

.testimonial {
  break-inside: avoid;
  padding: 30px;
  margin-bottom: 32px;
}

.quote-mark {
  color: #f0c4b2;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
}

.testimonial blockquote {
  margin: 0 0 24px;
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.7;
}

.testimonial footer {
  border-top: 1px solid #ecd6cc;
  padding-top: 22px;
}

.testimonial cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
}

.testimonial footer span {
  font-size: 0.88rem;
  color: var(--muted);
}

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

.cta {
  text-align: center;
  padding: 104px 0;
}

.cta h2 { font-size: clamp(1.8rem, 4vw, 2.3rem); }

.cta p {
  max-width: 620px;
  margin: 18px auto 32px;
  font-size: 1.08rem;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Page intro (inner pages) ---------- */

.page-intro {
  background: var(--bg-alt);
  text-align: center;
  padding: 88px 0 80px;
}

.page-intro h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); }

.page-intro p {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: 1.15rem;
  line-height: 1.6;
}

.page-intro .btn { margin-top: 32px; }

.split .prose > p:last-child { margin-bottom: 0; }

/* ---------- Learning Coach: what you get ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split h2 {
  font-size: clamp(1.8rem, 4vw, 2.1rem);
  margin-bottom: 20px;
}

.split > div > p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--navy);
  font-size: 0.97rem;
}

.checklist svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--coral);
  margin-top: 2px;
}

.engagement {
  padding: 30px;
  box-shadow: 0 16px 40px rgba(13, 31, 60, 0.1);
}

.engagement h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.engagement dl { margin: 0; display: grid; gap: 22px; }

.engagement dt {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.97rem;
  margin-bottom: 6px;
}

.engagement dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Stats ---------- */

.stat {
  text-align: center;
  padding: 30px 24px;
}

.stat strong {
  display: block;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--coral);
  line-height: 1.1;
  margin-bottom: 14px;
}

.stat span {
  font-size: 0.92rem;
  color: var(--text);
}

/* ---------- Projects ---------- */

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(13, 31, 60, 0.12);
}

.project[hidden] { display: none; }

.project:focus-within { outline: 2px solid var(--coral); outline-offset: 3px; }
.project-link:focus-visible { outline: none; }

.project-link {
  color: inherit;
  text-decoration: none;
}

/* The whole card is clickable through the title link */
.project-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-client-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
}

.year-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  background: #e8e4e0;
  padding: 4px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.project-more {
  display: inline-flex;
  color: var(--coral-ink);
}

.project-more svg { width: 20px; height: 20px; transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.project:hover .project-more svg { transform: translateX(4px); }

.project-media {
  flex-shrink: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 32px;
  background: var(--card);
}

.project-media-logos img {
  width: auto;
  height: auto;
  max-width: 45%;
  max-height: 72px;
  object-fit: contain;
}

.project-media-logos img:only-child { max-width: 70%; max-height: 96px; }

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px;
}

.project-client {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.project-client .client-logo {
  height: 30px;
  width: auto;
  margin-bottom: 8px;
}

.client-name {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.project-client p {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.project h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.project-role {
  color: var(--coral-ink);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.project-body > p:not(.project-role) {
  font-size: 0.95rem;
  line-height: 1.7;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.project-stats div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  background: #f7f2ee;
}

.project-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--coral-ink);
  margin-bottom: 4px;
}

.project-stats span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Year filter ---------- */

.projects-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.year-filter {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.year-filter button {
  font: inherit;
  font-size: 0.92rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  margin-left: -14px;
  min-height: 36px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s;
}

.year-filter button:hover { color: var(--navy); background: var(--bg-alt); }

.year-filter button[aria-pressed="true"] {
  color: var(--navy);
  font-weight: 600;
  background: var(--bg-alt);
}

.year-status {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.year-status:empty { display: none; }

/* ---------- Featured projects and list ---------- */

.project-group + .project-group { margin-top: 72px; }
.project-group[hidden] { display: none; }

.group-title {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  margin-bottom: 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.featured-grid .project-media { aspect-ratio: 16 / 10; }
.featured-grid .project h3 { font-size: 1.35rem; }

.project-summary {
  margin-top: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.2s;
}

.project-row[hidden] { display: none; }
.project-row:hover { background: var(--bg-alt); }
.project-row:hover .project-more svg { transform: translateX(4px); }
.project-row:focus-within { outline: 2px solid var(--coral); outline-offset: 2px; }

.row-thumb {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-thumb img.is-logo { object-fit: contain; padding: 8px; }

.row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-text .project-link {
  color: var(--navy);
  font-weight: 600;
  line-height: 1.35;
}

.row-client {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Project pages ---------- */

.case-hero {
  background: var(--bg-alt);
  padding: 32px 0 72px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 40px;
}

.back-link:hover { color: var(--coral-ink); }
.back-link svg { width: 16px; height: 16px; }

.case-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.case-hero .project-client {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 20px;
}

.case-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 18px;
}

.case-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 34em;
}

.headline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #d9d1ca;
}

.headline-stats strong {
  display: block;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--coral-ink);
  font-variant-numeric: tabular-nums;
}

.headline-stats span {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.case-hero-media {
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 18px 40px rgba(13, 31, 60, 0.14);
}

.case-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  background: var(--card);
}

.case-hero-logos img {
  width: auto;
  height: auto;
  max-width: 45%;
  max-height: 96px;
  object-fit: contain;
}

.case-hero-logos img:only-child { max-width: 70%; max-height: 120px; }

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  align-items: start;
}

.prose { max-width: 68ch; }

.prose p {
  font-size: 1.08rem;
  line-height: 1.8;
  margin-bottom: 1.2em;
}

.prose p:last-child { margin-bottom: 0; }

.case-facts {
  padding: 28px;
  position: sticky;
  top: 96px;
}

.case-facts dl { margin: 0; display: grid; gap: 16px; }

.case-facts dt {
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.case-facts dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.case-facts .project-stats {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--coral-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-underline-offset: 3px;
}

.case-link svg { width: 15px; height: 15px; }

.case-subhead {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 32px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.gallery-single { grid-template-columns: 1fr; max-width: 860px; }

.gallery figure { margin: 0; }

.gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.gallery figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.testimonials-few { columns: 2; }
.testimonials-few:has(> :only-child) { columns: 1; max-width: 760px; }

.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-block: 56px;
}

.case-nav a {
  display: block;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-nav a:hover { border-color: var(--coral); transform: translateY(-2px); }

.case-nav span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.case-nav svg { width: 15px; height: 15px; }

.case-nav strong {
  display: block;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.35;
}

.case-nav-next { text-align: right; }

/* ---------- Writing ---------- */

.post .project-media { aspect-ratio: 16 / 9; }

.post .project-body > p:not(.project-client-name) {
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.substack-embed {
  display: block;
  width: 100%;
  max-width: 480px;
  height: 320px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.post-source {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--coral-ink);
}

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

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 44px 0;
  font-size: 0.92rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-location svg { width: 16px; height: 16px; color: var(--coral); }

.footer-social {
  display: flex;
  gap: 24px;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  padding: 10px;
  margin: -10px;
}

.footer-social a:hover { color: var(--coral); }

.footer-social svg { width: 20px; height: 20px; }

.footer-right { text-align: right; }

.footer-right small {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Tablet ---------- */

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .testimonials { columns: 2; }
  .about, .split { grid-template-columns: 1fr; gap: 40px; }
  .case-hero-grid, .case-layout { grid-template-columns: 1fr; gap: 40px; }
  .case-facts { position: static; }
}

/* ---------- Phone ---------- */

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .container { padding-inline: 20px; }

  .menu-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    box-shadow: 0 10px 20px rgba(13, 31, 60, 0.08);
  }

  .nav.open { display: flex; align-items: stretch; }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }

  .nav a:last-child { border-bottom: 0; }
  .nav .nav-cta { margin-top: 12px; padding: 13px 20px; text-align: center; }
  .nav a.active { border-bottom-color: var(--border); }

  .hero { min-height: 560px; align-items: flex-end; padding-bottom: 56px; }
  .hero-content { max-width: none; }
  .hero-photo { width: 100%; object-position: center 20%; -webkit-mask-image: linear-gradient(0deg, transparent 15%, rgba(0,0,0,0.5) 45%, #000 75%); mask-image: linear-gradient(0deg, transparent 15%, rgba(0,0,0,0.5) 45%, #000 75%); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 20px; }
  .marquee-track li { margin-right: 48px; height: 52px; }
  .case-hero { padding: 24px 0 56px; }
  .back-link { margin-bottom: 28px; }
  .gallery, .case-nav { grid-template-columns: 1fr; gap: 16px; }
  .projects-layout { grid-template-columns: 1fr; gap: 24px; }
  .year-filter {
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    margin-inline: -20px;
    padding-inline: 20px;
    scrollbar-width: none;
  }
  .year-filter::-webkit-scrollbar { display: none; }
  .filter-label { margin: 0 8px 0 0; white-space: nowrap; }
  .year-filter button { margin-left: 0; flex-shrink: 0; }
  .featured-grid { grid-template-columns: 1fr; gap: 20px; }
  .project-group + .project-group { margin-top: 56px; }
  .project-row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 12px 4px; }
  .row-thumb { width: 56px; height: 42px; }
  .project-row .project-more { display: none; }
  .year-status { margin: 0 0 0 8px; white-space: nowrap; }
  .testimonials-few { columns: 1; }
  .case-nav { padding-block: 40px; }
  .marquee-track img { height: calc(var(--h) * 0.8); }
  .grid-4.stats { grid-template-columns: 1fr 1fr; }
  .testimonials { columns: 1; }
  .testimonial { margin-bottom: 20px; }

  .page-intro { padding: 64px 0 56px; }
  .section-head { margin-bottom: 36px; }
  .cta { padding: 72px 0; }
  .cta-buttons .btn { width: 100%; }

  .project-body, .feature, .engagement { padding: 24px; }
  .stat strong { font-size: 2.1rem; }

  .site-footer .container {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .marquee-track li { margin-right: 0; }
}
