:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.72);
  --line: rgba(168, 203, 242, 0.18);
  --accent: #a8cbf2;
  --accent-strong: #d8ecff;
  --vision: #ff8c73;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --topbar-height: 64px;
}

:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.72);
  --line: rgba(168, 203, 242, 0.18);
  --accent: #a8cbf2;
  --accent-strong: #d8ecff;
  --vision: #ff8c73;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

@font-face {
  font-family: "TheYearOfHandicrafts";
  src: url("./TheYearOfHandicrafts.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Montreal";
  src: url("./PPNeueMontreal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1, "ss01" 1, "ss02" 1, "ss03" 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(168, 203, 242, 0.14), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif !important;
  line-height: 1.8;
  overflow-x: hidden;
}

body,
p,
a,
button,
input,
textarea,
select,
li,
span,
strong {
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif !important;
  font-feature-settings: normal;
  font-variant-ligatures: common-ligatures contextual;
  font-kerning: normal;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  min-height: 100vh;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 120px, 120px 100%;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 88%);
  opacity: 0.35;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1200px, calc(100% - 2rem));
  margin: 0.75rem auto 0;
  min-height: var(--topbar-height);
  padding: 0.55rem 1.25rem;
  border-radius: 1.25rem;
  backdrop-filter: blur(18px);
   transition:
    width 220ms ease,
    max-width 220ms ease,
    margin 220ms ease,
    padding 220ms ease,
    border-radius 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
    direction: ltr;
}

.topbar.is-scrolled {
  width: calc(100% - 2rem);
  max-width: none;
  margin-top: 0;
  border-radius: 0;
  padding-inline: clamp(1rem, 3vw, 1.2rem);
  background: transparent;
  border-color: transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.brand-mark {
  width: 9rem;
  height: 9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
   color: var(--accent-strong);
  font-weight: 900;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Prevent the brand image from forcing a very tall header on small/medium viewports */
.topbar .brand-mark img {
  max-height: calc(var(--topbar-height) - 8px);
}

/* Restore large circular brand for wide screens */
@media (min-width: 1100px) {
  .brand-mark {
    width: 9rem;
    height: 9rem;
  }
  .topbar .brand-mark img {
    max-height: none;
    height: 100%;
  }
}

/* Hide the large left emblem that was marked for removal in comments */
.hero-emblem {
  display: none;
}

.brand-text {
  font-family: "TheYearOfHandicrafts", "PP Neue Montreal", sans-serif;
  font-size: 1.3rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
  gap: 1rem;
  color: #999;
  font-size: 0.95rem;
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif !important;
  direction: rtl;
  gap: 2.5rem;
}

.nav a {
  position: relative;
  padding-bottom: 0.2rem;
  color: #FFF;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.section {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.25rem) 0;
}

.section+.section {
  margin-top: 0;
}

.hero {
  display: block; /* reset grid */
}

/* Center hero content within viewport excluding the sticky header */
.hero.section {
  min-height: calc(80vh - var(--topbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero-copy { text-align: center; }

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(55px);
  opacity: 0.75;
  pointer-events: none;
}

.hero-glow--one {
  top: 10%;
  inset-inline-start: 8%;
  width: 18rem;
  height: 18rem;
  background: rgba(168, 203, 242, 0.15);
}

.hero-glow--two {
  bottom: 8%;
  inset-inline-end: 10%;
  width: 14rem;
  height: 14rem;
  background: rgba(255, 140, 115, 0.08);
}

.hero-copy,
.section-heading,
.about-stats,
.about-copy,
.service-card,
.marquee,
.footer-copy,
.footer-grid {
  position: relative;
  z-index: 1;
}

.hero-copy { text-align: center; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: normal;
  text-transform: none;
}

.hero h1,
.section-heading h2,
.footer-copy h2 {
  margin: 0;
  font-family: "TheYearOfHandicrafts", "PP Neue Montreal", sans-serif;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero h1 {
  /* Force smaller size across all displays */
  max-width: min(1300px, 20ch);
  font-size: 3.2rem;
  word-wrap: break-word;
  line-height: 1.3;
}

/* Limit width of copy column so the headline wraps predictably */
.hero-copy {
  max-width: 62ch;
}

.hero h1 .accent-word {
  color: var(--vision);
    font-feature-settings: "liga" 1, "calt" 1, "kern" 1, "ss01" 1, "ss02" 1, "ss03" 1;

}

.hero-subtitle {
  margin: 1.25rem 0 0;
  max-width: 32rem;
  color: #999;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  justify-content: center;
}

.button {
  min-width: 11rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  text-align: center;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #eaf5ff);
  color: #050505;
}

.button--ghost {
  border-color: rgba(168, 203, 242, 0.34);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.topbar .topbar-cta.button {
    flex: 0 0 auto;
    min-width: 6.75rem;
    width: fit-content;
    padding: 0.62rem 0.82rem;
    min-height: 1.5rem;
    font-size: 0.84rem;
    line-height: 1;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 10px;
}

.topbar .topbar-cta.button:hover,
.topbar .topbar-cta.button:focus-visible {
  transform: translateY(-1px);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.meta-card,
.footer-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.meta-card {
  padding: 1rem 1.1rem;
  border-radius: 1.35rem;
}

.meta-card span,
.stat-number {
  display: block;
  font-family: "TheYearOfHandicrafts", "PP Neue Montreal", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--accent-strong);
}

.meta-card p,
.stat-card p,
.about-copy p,
.service-card p,
.footer-item span {
  margin: 0.35rem 0 0;
  color: #999;
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif !important;
}

p {
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif !important;
}

.hero-emblem {
  display: grid;
  place-items: center;
  min-height: 34rem;
  position: relative;
}

.emblem-ring {
  display: none;
}

.emblem-core {
  position: relative;
  width: min(24rem, 65vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: "TheYearOfHandicrafts", "PP Neue Montreal", sans-serif;
  font-size: clamp(4rem, 10vw, 6rem);
  font-weight: 900;
  color: var(--accent-strong);
  background: linear-gradient(145deg, rgba(168, 203, 242, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(168, 203, 242, 0.35);
  box-shadow: 0 0 0 18px rgba(168, 203, 242, 0.04), var(--shadow);
  animation: fadePulse 1.8s ease-out both, breathe 6s ease-in-out 1.8s infinite;
  overflow: hidden;
}

.emblem-core img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
  animation: logoFade 1.8s ease-out both;
}

.emblem-caption {
  display: none;
}

.emblem-caption::before,
.emblem-caption::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--vision));
  border-radius: 2px;
  opacity: 0.8;
}

.emblem-caption::after {
  background: linear-gradient(to left, transparent, var(--vision));
}

.section-heading {
  display: grid;
  gap: clamp(1.5rem, 2.2vw, 2rem);
  margin-bottom: 2.5rem;
}

/* Intro section (new) */
.intro-grid {
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}

.intro-icon {
  display: grid;
  place-items: center;
}

.intro-icon-box {
  width: min(14rem, 22vw);
  height: min(14rem, 22vw);
  display: grid;
  place-items: center;
  border-radius: 1.5rem;
  box-shadow: 0 22px 60px rgba(0,0,0,0.35);
  background: linear-gradient(180deg, #ff8c73, #ff6f52);
  border: 1px solid rgba(255,255,255,0.06);
}

.intro-icon-figure {
  font-size: clamp(3.6rem, 8vw, 6.2rem);
  color: #ffffff;
  text-shadow: 0 6px 18px rgba(0,0,0,0.25);
  line-height: 1;
  display: block;
}

.intro-copy h2 {
  margin: 0 0 2rem 0;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.05;
  color: var(--text);
}

.intro-lead {
  margin: 0 0 0.6rem 0;
  color: #999;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 62ch;
}

.intro-muted {
  margin: 0;
  color: #999;
  font-size: 0.98rem;
  font-weight: bold;
}

@media (max-width: 1100px) {
  .intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.25rem;
  }

  .intro-icon { order: -1; }

  .intro-copy h2 { text-align: center; }
}

.heading-wrapper {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid rgba(168, 203, 242, 0.24);
  padding-bottom: 0.85rem;
}

.heading-wrapper .eyebrow {
  margin: 0;
  flex: 0 0 auto;
}

.heading-subtitle {
  margin: 0;
  color: var(--vision);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: normal;
}

/* Mobile: remove any letter-spacing that can break cursive Arabic rendering */
@media (max-width: 720px) {
  .eyebrow,
  .heading-subtitle,
  .brand-text,
  .mini-footer-inner p,
  .mini-footer-links a {
    letter-spacing: normal !important;
  }
}

.section-heading h2,
.footer-copy h2 {
  max-width: 100%;
  font-size: clamp(2.6rem, 5.3vw, 4.5rem);
  margin-top: 0.35rem;
}

.about-grid {
  display: block;
  gap: 1.2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}

.about-choice { display: none; }

.about-choice:hover,
.about-choice:focus-visible {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(168, 203, 242, 0.3);
  background: rgba(168, 203, 242, 0.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.about-choice.is-active {
  border-color: rgba(168, 203, 242, 0.45);
  background: rgba(168, 203, 242, 0.06);
  transform: translateX(-4px);
  box-shadow: -8px 12px 30px rgba(0, 0, 0, 0.3);
}

.about-choice-title {
  display: block;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.2;
  color: var(--accent-strong);
  font-weight: 900;
}

.stat-card {
  padding: clamp(1.1rem, 2vw, 1.6rem);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.stat-card--accent {
  border-color: rgba(168, 203, 242, 0.4);
  background: rgba(168, 203, 242, 0.06);
}

.about-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.4rem, 2vw, 2rem);
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: all 400ms ease;
}

.about-copy p {
  font-size: 1.03rem;
}

.about-detail-title {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.1;
  color: var(--text);
}

.about-detail-title .accent-word {
  color: var(--vision);
}

.about-detail-text {
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

/* Slogan under about grid */
.about-slogan {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  text-align: center;
}

.about-slogan p {
  margin: 0;
  color: var(--vision);
  font-weight: 900;
  font-size: clamp(2.2rem, 5.5vw, 3.3rem);
  letter-spacing: -0.02em;
  transform: translateY(0.1rem);
  text-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

@media (max-width: 1100px) {
  .about-stats { grid-template-columns: 1fr; }
  .about-slogan p { font-size: clamp(1.8rem, 6.2vw, 3.4rem); }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
  align-items: start;
  grid-auto-flow: dense;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 1.6rem;
  padding: clamp(1rem, 1.6vw, 1.4rem);
  min-height: 11.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: transform 400ms cubic-bezier(0.25, 1, 0.5, 1), border-color 400ms ease, background 400ms ease, box-shadow 400ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(168, 203, 242, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(168, 203, 242, 0.35);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(168, 203, 242, 0.05);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgba(168, 203, 242, 0.1);
  color: var(--accent-strong);
  border: 1px solid rgba(168, 203, 242, 0.28);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-icon i {
  display: block;
  line-height: 1;
}

.service-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-family: "TheYearOfHandicrafts", "PP Neue Montreal", sans-serif;
}

.service-card--wide { grid-column: span 1; }
.service-card--align-right { justify-self: stretch; }

.marquee {
  overflow: hidden;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: scrollMarquee 24s linear infinite;
}

.marquee-track span {
  flex: 0 0 auto;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 247, 251, 0.82);
  filter: grayscale(1);
  transition: filter 220ms ease, color 220ms ease, border-color 220ms ease, background 220ms ease;
}

.marquee-track:hover span {
  filter: grayscale(0);
}

.marquee-track span:hover {
  color: #fff;
  border-color: rgba(168, 203, 242, 0.45);
  background: rgba(168, 203, 242, 0.12);
}

.contact-zone {
  padding-bottom: clamp(2.4rem, 4vw, 3.5rem);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.contact-form-card,
.contact-aside,
.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  border-radius: 1.6rem;
}

.contact-form-card {
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  display: grid;
  gap: 0.9rem;
}

.contact-field {
  display: grid;
  gap: 0.45rem;
}

.contact-field label {
  font-size: 0.95rem;
  color: var(--accent-strong);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font-family: "TheYearOfHandicrafts", "Tajawal", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: rgba(168, 203, 242, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 203, 242, 0.16);
}

.contact-form-card .button {
  margin-top: 0.35rem;
  min-width: 0;
  width: fit-content;
}

.contact-aside {
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  display: grid;
  align-content: start;
  gap: 1rem;
}

.contact-aside h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  line-height: 1.2;
}

.contact-aside p {
  margin: 0;
  color: #999;
}

.contact-cards {
  display: grid;
  gap: 0.8rem;
}

.contact-card {
  padding: 1rem 1.1rem;
}

.contact-card span {
  display: block;
  color: #999;
  font-size: 0.92rem;
}

.contact-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.1rem;
  color: var(--text);
}

.contact-card a:hover {
  color: var(--accent);
}

.mini-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(10px);
  direction: ltr;
}

.mini-footer-inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 62px;
  padding: 0.65rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mini-footer-inner p {
  margin: 0;
  color: #999;
  font-size: 0.92rem;
}

.mini-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.mini-footer-links a {
  color: rgba(244, 247, 251, 0.86);
  font-size: 0.92rem;
  direction: ltr;
}

.mini-footer-links a:hover {
  color: var(--accent);
}

.mini-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-footer-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.1, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadePulse {
  from {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(12px);
  }

  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes logoFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes floatRing {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes scrollMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(50%);
  }
}

@media (max-width: 1100px) {

  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-emblem {
    min-height: 22rem;
    order: -1;
  }

  .services-grid .service-card,
  .services .service-card:nth-child(4),
  .services .service-card:nth-child(5) {
    grid-column: span 6;
  }

  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar {
    width: min(100%, calc(100% - 1.2rem));
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .nav {
    flex: 1 1 100%;
    order: 3;
    gap: 0.75rem 1rem;
  }

  .topbar-cta {
    order: 2;
    min-width: 8.5rem;
  }

  .brand {
    order: 1;
  }

  .section {
    width: min(100%, calc(100% - 1.2rem));
    padding: clamp(1.5rem, 4.8vw, 2.4rem) 0;
  }

  .section+.section {
    margin-top: 0;
  }

  .hero h1,
  .section-heading h2,
  .footer-copy h2 {
    max-width: none;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .contact-form-card .button {
    width: 100%;
  }

  .mini-footer-inner {
    width: min(100%, calc(100% - 1.2rem));
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.75rem 0;
  }

  .services-grid .service-card,
  .services .service-card:nth-child(4),
  .services .service-card:nth-child(5) {
    grid-column: span 12;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Extra cap for typical laptop/desktop screens to keep headline readable */
@media (max-width: 1400px) {
  .hero h1 {
    font-size: clamp(2rem, 5.2vw, 4.4rem);
  }
}

/* Mobile header: push brand and CTA to the edges and hide center nav for compact layout */
@media (max-width: 720px) {
  :root {
    --topbar-height: 56px;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-inline: 1rem;
    padding-block: 0.35rem;
    border-radius: 0;
    justify-content: space-between;
  }

  .nav {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #777;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand {
    flex: 0 0 auto;
    margin-inline-start: 0;
    margin-inline-end: auto;
  }

  .brand-mark {
    width: auto;
    height: auto;
    display: grid;
    place-items: center;
    padding: 0.15rem;
    border-radius: 8px; /* remove circular crop on small screens */
    overflow: visible;
    margin: 10px 0px 10px 0px;
  }

  .brand-mark img {
    max-height: calc(var(--topbar-height) - 8px);
    width: auto;
    display: block;
    object-fit: contain;
  }

  .topbar.is-scrolled {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 1rem !important;
    padding-block: 0.2rem !important;
    min-height: var(--topbar-height) !important;
    border-radius: 0 !important;
  }

  /* hide nav while scrolled to avoid header growing and covering content */
  .topbar.is-scrolled .nav {
    display: none;
  }

  .topbar .topbar-cta.button {
    min-width: 5.2rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    margin-inline-start: auto;
  }
}