:root {
  --site-primary: #92080D;
  --site-on-primary: #FFFFFF;
  --site-secondary: #211B1A;
  --site-on-secondary: #FFFFFF;
  --site-background: #F7F4F1;
  --site-on-background: #211B1A;
  --site-font-body: "Tahoma", "Arial", sans-serif;
  --site-font-heading: "Tahoma", "Arial", sans-serif;
  --site-heading-scale: 1;
  --site-spacing-scale: 1;
  --site-radius-scale: 1;
  --site-decoration-opacity: 1;
  --muted: #6B6260;
  --line: #E4DCD7;
  --paper: #FCFAF8;
  /* Theme tokens (dark values live in the "Theme: dark" section) */
  --accent: #92080D;
  --surface: #FFFFFF;
  --surface-2: #F1E8E3;
  --panel: #F4ECE7;
  --panel-line: #E4D5CC;
  --tint: #F7EDEC;
  --border-hover: #D7B7B4;
  --outline-line: #CBBDB8;
  --header-bg: rgba(252, 250, 248, .94);
  --input-bg: #FFFFFF;
  --input-line: #D9CECA;
  --input-text: #211B1A;
  --art-paper: #EDE5DF;
  --art-card: #FBF8F5;
  --art-line: #D8C9C1;
  --art-bar: #D8CECA;
  --scroll-thumb: rgba(146, 8, 13, .32);
  --scroll-thumb-hover: rgba(146, 8, 13, .62);
  --header-h: 82px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--site-background);
  color: var(--site-on-background);
  font-family: var(--site-font-body);
  line-height: 1.8;
}

#site-root {
  width: 100%;
  min-height: 100vh;
  background-color: var(--site-background);
  color: var(--site-on-background);
  border-radius: 0;
  /* clip (not hidden) so the sticky header keeps sticking to the viewport */
  overflow-x: clip;
}
#cfMessage{
  resize: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.texture {
  position: relative;
  isolation: isolate;
}

.texture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: calc(.24 * var(--site-decoration-opacity));
  background-image: linear-gradient(rgba(146, 8, 13, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(146, 8, 13, .045) 1px, transparent 1px);
  background-size: 22px 22px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), box-shadow .3s ease, background-color .3s ease;
}

.nav {
  min-height: var(--header-h);
  transition: min-height .3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 245px;
}

.brand-name {
  font-weight: 800;
  line-height: 1.45;
  font-size: 14px;
}

.brand-name small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(70, 8, 10, .09);
  padding: 5px;
}

.brand {
  gap: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 23px;
  font-size: 13px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: calc(9px * var(--site-radius-scale));
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--site-primary);
  color: var(--site-on-primary);
  box-shadow: 0 8px 22px rgba(146, 8, 13, .16);
}

.btn-primary:hover {
  background: #76070B;
}

.btn-outline {
  border-color: var(--outline-line);
  color: var(--ink);
  background: transparent;
}

.btn-light {
  background: #fff;
  color: var(--site-primary);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  color: inherit;
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease;
}

.hero {
  padding: 88px 0 78px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  left: -125px;
  top: 24px;
  border: 1px solid rgba(146, 8, 13, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(146, 8, 13, .025), 0 0 0 58px rgba(146, 8, 13, .02);
  pointer-events: none;
  opacity: var(--site-decoration-opacity);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 58px;
  align-items: center;
}

.hero-brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 13px 18px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(146, 8, 13, .12);
  border-right: 4px solid var(--site-primary);
  border-radius: 4px 12px 12px 4px;
}

.hero-brand-symbol {
  color: var(--site-primary);
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
}

.hero-brand-wording {
  display: grid;
  gap: 1px;
}

.hero-brand-wording strong {
  color: var(--site-primary);
  font-size: 16px;
  letter-spacing: .01em;
}

.hero-brand-wording span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
  direction: ltr;
  text-align: right;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: var(--site-font-heading);
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.32;
  letter-spacing: -.04em;
  margin: 20px 0 22px;
}

.highlight {
  color: var(--accent);
  position: relative;
}

.hero-copy {
  font-size: 17px;
  color: var(--muted);
  max-width: 650px;
  margin-bottom: 28px;
}

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

.trust-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 12px;
}

.trust-dot {
  width: 8px;
  height: 8px;
  background: var(--site-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(146, 8, 13, .09);
}

.hero-art {
  min-height: 430px;
  position: relative;
  display: grid;
  place-items: center;
}

.art-paper {
  position: absolute;
  width: 78%;
  height: 82%;
  background: var(--art-paper);
  border: 1px solid var(--art-line);
  transform: rotate(-5deg);
  border-radius: 5px;
  box-shadow: 0 24px 55px rgba(43, 27, 24, .12);
}

.art-paper::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(146, 8, 13, .18);
}

.art-circle {
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: var(--site-primary);
  opacity: .96;
  bottom: 22px;
  left: 6%;
}

.art-card {
  position: relative;
  width: 76%;
  min-height: 310px;
  padding: 28px;
  background: var(--art-card);
  border: 1px solid var(--art-line);
  box-shadow: 0 25px 55px rgba(40, 20, 20, .16);
  transform: rotate(3deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.art-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.art-seal {
  width: 50px;
  height: 50px;
  border: 1px solid var(--site-primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.art-card h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.45;
  margin: 20px 0;
}

.art-lines {
  display: grid;
  gap: 9px;
}

.art-lines span {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: var(--art-bar);
}

.art-lines span:nth-child(2) {
  width: 82%;
}

.art-lines span:nth-child(3) {
  width: 64%;
}

.art-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-top: 20px;
}

.section {
  padding: 82px 0;
}

.section-white {
  background: var(--paper);
}

.section-dark {
  background: var(--site-secondary);
  color: #fff;
}

.section-head {
  max-width: 700px;
  margin-bottom: 36px;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

.section-head.center .eyebrow {
  justify-content: center;
}

h2.section-title {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.4;
  letter-spacing: -.025em;
  margin: 12px 0;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 15px;
}

.section-dark .section-subtitle {
  color: #D2C7C4;
}

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

.service-card {
  padding: 27px 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(13px * var(--site-radius-scale));
  transition: transform .2s, box-shadow .2s, border-color .2s;
  min-height: 230px;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 35px rgba(45, 22, 20, .07);
}

.icon-box {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--accent);
  border-radius: 12px;
  font-size: 23px;
  margin-bottom: 17px;
}

.service-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 17px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}

.text-link span {
  transition: transform .2s;
}

.text-link:hover span {
  transform: translateX(-4px);
}

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

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

.academic-service-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: calc(13px * var(--site-radius-scale));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.academic-service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 35px rgba(45, 22, 20, .07);
}

.academic-service-visual {
  min-height: 150px;
  background: var(--surface-2);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.academic-service-visual::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--site-primary);
  opacity: .1;
  left: -25px;
  bottom: -75px;
}

.academic-service-icon {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--site-primary);
  color: white;
  font-size: 35px;
  box-shadow: 0 12px 25px rgba(146, 8, 13, .2);
}

.academic-service-content {
  padding: 21px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.academic-service-tag {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.academic-service-content h3 {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 9px;
}

.academic-service-content p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
  flex: 1;
}

.academic-service-content .btn {
  width: 100%;
  font-size: 12px;
  padding: 10px;
}

.course-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: calc(13px * var(--site-radius-scale));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.course-visual {
  min-height: 160px;
  background: var(--surface-2);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.course-visual::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--site-primary);
  opacity: .1;
  left: -25px;
  bottom: -75px;
}

.course-icon {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--site-primary);
  color: white;
  font-size: 39px;
  box-shadow: 0 12px 25px rgba(146, 8, 13, .2);
}

.course-content {
  padding: 21px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-tag {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.course-content h3 {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 9px;
}

.course-content p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
  flex: 1;
}

.course-content .btn {
  width: 100%;
  font-size: 12px;
  padding: 10px;
}

.feature-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 55px;
  align-items: center;
}

.feature-panel {
  padding: 36px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  position: relative;
  overflow: hidden;
}

.feature-panel::after {
  content: "§";
  position: absolute;
  left: 14px;
  bottom: -80px;
  font-family: Georgia, serif;
  font-size: 240px;
  color: rgba(146, 8, 13, .09);
  line-height: 1;
}

.feature-panel blockquote {
  position: relative;
  z-index: 1;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.6;
  margin: 0;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
}

.feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}

.feature-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.feature-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  padding: 24px 20px;
  border-top: 2px solid rgba(255, 255, 255, .2);
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  color: #E6A7A8;
  font-weight: 900;
  font-size: 25px;
  margin-bottom: 17px;
}

.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.step p {
  color: #D2C7C4;
  font-size: 13px;
  margin-bottom: 0;
}

.faq-wrap {
  max-width: 850px;
  margin: auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  text-align: right;
  border: 0;
  padding: 20px 0;
  background: transparent;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  font-weight: 800;
}

.faq-question span:last-child {
  color: var(--accent);
  font-size: 22px;
  transition: transform .25s ease;
}

.faq-answer {
  display: none;
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-question span:last-child {
  transform: rotate(45deg);
}

.cta-band {
  padding: 58px 0;
  background: var(--site-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: calc(.14 * var(--site-decoration-opacity));
  background-image: linear-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .2) 1px, transparent 1px);
  background-size: 25px 25px;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cta-inner h2 {
  font-size: clamp(25px, 3vw, 37px);
  line-height: 1.4;
  margin-bottom: 8px;
}

.cta-inner p {
  margin-bottom: 0;
  color: #F0DADB;
  font-size: 14px;
}

.contact-section {
  padding: 76px 0;
  color: #fff;
  background: var(--site-primary);
  position: relative;
  overflow: hidden;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
}

.why-card {
  text-align: center;
  padding: 35px 27px 32px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(36, 18, 18, .075);
  transition: transform .25s ease, box-shadow .25s ease;
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(36, 18, 18, .11);
}

.why-icon {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 50%;
  background: var(--site-primary);
  color: #fff;
  font-size: 34px;
}

.why-card h3 {
  color: var(--ink);
  font-size: 23px;
  margin: 0 0 12px;
}

.why-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.9;
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(.18 * var(--site-decoration-opacity));
  background: radial-gradient(circle at 22px 22px, transparent 18px, rgba(255, 255, 255, .28) 19px, transparent 20px), radial-gradient(circle at 48px 48px, transparent 18px, rgba(255, 255, 255, .18) 19px, transparent 20px);
  background-size: 58px 58px;
}

.contact-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.contact-heading .eyebrow {
  color: #D5B97A;
}

.contact-heading h2 {
  color: #fff;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.35;
  margin: 10px 0 14px;
}

.contact-heading p {
  color: #F2DDE0;
  margin: 0 0 26px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 9px;
  background: #F8F6F5;
  color: #282020;
  padding: 14px 17px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: #D5B97A;
  box-shadow: 0 0 0 3px rgba(213, 185, 122, .2);
}

.contact-form textarea {
  min-height: 116px;
  resize: vertical;
}

.contact-form .btn {
  justify-self: start;
  min-width: 210px;
  background: #B39A60;
  color: #fff;
  border: 0;
}

.contact-note {
  font-size: 12px;
  color: #F2DDE0;
  margin: 0;
}

.contact-cards {
  display: grid;
  gap: 18px;
}

.contact-card {
  padding: 25px 24px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 15px;
  min-height: 130px;
  background: rgba(76, 0, 8, .13);
}

.contact-card-top {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  background: #fff;
  color: var(--site-primary);
  font-size: 21px;
}

.contact-card h3 {
  margin: 0;
  font-size: 19px;
  color: #fff;
}

.contact-card p,
.contact-card a {
  margin: 0;
  color: #FFF4F4;
  overflow-wrap: anywhere;
}

.contact-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer {
  background: #211B1A;
  color: #fff;
  padding: 45px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 45px;
  padding-bottom: 30px;
}

footer .brand-name small {
  color: #C6B9B5;
}

.footer-about {
  color: #C6B9B5;
  font-size: 13px;
  max-width: 390px;
  margin-top: 18px;
}

footer h3 {
  font-size: 14px;
  margin-bottom: 15px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: #C6B9B5;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #443B39;
  padding-top: 16px;
  color: #B5A9A5;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 12, 12, .6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .25);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.close-modal {
  border: 0;
  background: transparent;
  font-size: 27px;
  cursor: pointer;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 13px;
}

.form-grid label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--input-bg);
  color: var(--input-text);
  outline-color: var(--site-primary);
}

.form-grid textarea {
  min-height: 100px;
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 11px;
  margin: 10px 0 0;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 60;
  background: #211B1A;
  color: white;
  padding: 12px 17px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
  display: none;
  font-size: 13px;
}

.toast.show {
  display: block;
}

/* GSAP-style motion: graceful CSS fallback if the library is unavailable. */
[data-animate] {
  will-change: transform, opacity;
}

.course-price {
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
  margin: 0 0 5px;
}

.course-note {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 14px;
}

@media (max-width: 980px) {
  .nav-links {
    gap: 13px;
    font-size: 12px;
  }

  .brand {
    min-width: auto;
  }

  .nav>.btn {
    display: none;
  }

  .hero-grid {
    gap: 25px;
  }

  .courses-grid,
  .academic-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    gap: 15px;
  }

  .why-card {
    padding: 27px 18px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 30px, 560px);
  }

  :root {
    --header-h: 72px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 12px;
  }

  .hero {
    padding: 55px 0 48px;
  }

  .hero-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 330px;
    order: -1;
  }

  .art-card {
    min-height: 250px;
  }

  .art-circle {
    width: 220px;
    height: 220px;
  }

  .section {
    padding: 58px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .courses-grid,
  .academic-services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .course-visual,
  .academic-service-visual {
    min-height: 125px;
  }

  .course-content,
  .academic-service-content {
    padding: 15px;
  }

  .course-content h3,
  .academic-service-content h3 {
    font-size: 14px;
  }

  .course-content p,
  .academic-service-content p {
    font-size: 11px;
  }

  .feature-panel {
    padding: 27px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .step {
    padding: 17px 12px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-section {
    padding: 52px 0;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 0;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 28px;
  }

  .why-card {
    padding: 28px 23px;
    border-radius: 22px;
  }

  .why-icon {
    width: 82px;
    height: 82px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-grid>div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {

  .courses-grid,
  .academic-services-grid {
    grid-template-columns: 1fr;
  }

  .course-visual,
  .academic-service-visual {
    min-height: 145px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid>div:first-child {
    grid-column: auto;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Updated identity, contact number, and new front cover */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0
}

.phone-link {
  font-weight: 800;
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate
}

.brand {
  min-width: 0;
  gap: 0
}

.brand-mark {
  display: none !important
}

.hero-brand-lockup.actual-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none
}

.hero-brand-lockup.actual-logo img {
  display: block;
  width: min(100%, 440px);
  height: auto;
  max-height: 100px;
  object-fit: contain;
  object-position: right center
}

@media(max-width:720px) {
  .nav {
    gap: 10px
  }

  .header-actions {
    gap: 8px
  }

  .header-actions .btn {
    padding: 9px 11px;
    font-size: 11px
  }

  .phone-link {
    font-size: 11px
  }

  .brand-name {
    max-width: 150px;
    line-height: 1.5
  }

  .cover-page {
    min-height: 90svh;
    padding: 34px 20px
  }

  .cover-logo {
    margin-bottom: 24px;
    max-height: 150px
  }

  .cover-content h1 {
    font-size: clamp(27px, 7vw, 38px)
  }

  .cover-subtitle {
    font-size: 14px
  }

  .hero-brand-lockup.actual-logo img {
    width: min(100%, 320px);
    max-height: 75px
  }
}

/* Consistent vector icon system */
.icon-box svg,
.academic-service-icon svg,
.course-icon svg,
.why-icon svg,
.contact-icon svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: none
}

.icon-box {
  font-size: 23px
}

.academic-service-icon {
  font-size: 34px
}

.course-icon {
  font-size: 36px
}

.why-icon {
  font-size: 35px
}

.contact-icon {
  font-size: 21px
}

@media(max-width:720px) {
  .academic-service-icon {
    width: 72px;
    height: 72px;
    font-size: 30px
  }

  .course-icon {
    width: 72px;
    height: 72px;
    font-size: 31px
  }

  .why-icon {
    width: 68px;
    height: 68px;
    font-size: 29px
  }

  .icon-box {
    width: 46px;
    height: 46px;
    font-size: 22px;
    margin-bottom: 14px
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 20px
  }
}

/* تنسيق الرأسية الرئيسية: توازن بصري أوضح بين الشعار والعنوان والنص */
.hero {
  padding: clamp(42px, 5.5vw, 70px) 0 clamp(44px, 5vw, 64px);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(28px, 4vw, 52px);
}

.hero-brand-lockup.actual-logo {
  margin-bottom: 24px;
}

.hero-brand-lockup.actual-logo img {
  width: min(100%, 350px);
  max-height: 84px;
  object-fit: contain;
}

.hero .eyebrow {
  font-size: 13px;
  margin-bottom: 5px;
}

.hero h1 {
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1.45;
  letter-spacing: 0;
  margin: 14px 0 18px;
  max-width: 720px;
  text-wrap: balance;
}

.hero-copy {
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.95;
  max-width: 610px;
  margin-bottom: 24px;
}

.hero-actions {
  gap: 10px;
}

.hero .trust-note {
  line-height: 1.8;
  margin-top: 22px;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
    gap: 26px;
  }

  .hero h1 {
    font-size: clamp(32px, 4.2vw, 42px);
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 38px 0 44px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-brand-lockup.actual-logo img {
    width: min(100%, 300px);
    max-height: 76px;
  }

  .hero h1 {
    font-size: clamp(29px, 7.5vw, 38px);
    line-height: 1.5;
    margin: 12px 0 15px;
  }

  .hero-copy {
    font-size: 15px;
    line-height: 1.9;
  }

  .hero-art {
    min-height: 290px;
  }
}

/* توحيد توزيع بطاقات الخدمات ومنع ظهور بطاقة منفردة في صف أخير */
#services .services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

#academic-services .academic-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

#services .service-card,
#academic-services .academic-service-card {
  width: 100%;
  height: 100%;
  min-width: 0;
}

@media (min-width: 1100px) {
  #services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {

  #services .services-grid,
  #academic-services .academic-services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

:root {
  --site-font-body: "IBM Plex Sans Arabic", "Tahoma", "Arial", sans-serif;
  --site-font-heading: "IBM Plex Sans Arabic", "Tahoma", "Arial", sans-serif;
  --ink: #211B1A;
  color-scheme: light
}

h1,
h2,
h3,
h2.section-title,
.hero h1 {
  letter-spacing: 0 !important
}

#services .services-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

@media(min-width:1100px) {
  #services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:720px) {
  #services .services-grid {
    grid-template-columns: 1fr
  }
}

.service-card h3 {
  font-size: 17px
}

.service-card p {
  font-size: 14px
}

.course-content p,
.feature-item small,
.step p {
  font-size: 14px
}

.course-note,
.contact-note,
.form-note {
  font-size: 13px
}

.footer-links,
.footer-about {
  font-size: 14px
}

.footer-bottom {
  font-size: 12.5px
}

.art-footer {
  font-size: 11px
}

@media(max-width:720px) {
  .course-content p {
    font-size: 13px
  }

  .course-content h3 {
    font-size: 15px
  }
}

@media(max-width:560px) {
  .phone-link {
    display: none
  }
}

.contact-form .btn {
  background: #fff;
  color: var(--site-primary)
}

.footer-links a[dir="ltr"],
.contact-card a[dir="ltr"] {
  display: block;
  width: fit-content;
  justify-self: start;
  text-align: right;
  unicode-bidi: isolate
}

.skip {
  position: absolute;
  right: 12px;
  top: -60px;
  background: #fff;
  color: #92080D;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  font-weight: 700
}

.skip:focus {
  top: 8px
}

.wa-fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22)
}

.wa-fab svg {
  width: 32px;
  height: 32px
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px
}

.team-card {
  flex: 0 0 calc(25% - 15px)
}

.team-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px
}

.team-avatar {
  width: 96px;
  height: 96px;
  overflow: hidden;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--site-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700
}

.team-avatar svg {
  width: 1em;
  height: 1em
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.team-card h3 {
  font-size: 18px;
  margin: 0 0 4px
}

.team-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px
}

@media(max-width:980px) {
  .team-card {
    flex-basis: calc(50% - 10px)
  }
}

@media(max-width:420px) {
  .team-card {
    flex-basis: 100%
  }
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px
}

.testi-card {
  margin: 0;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative
}

.testi-card::before {
  content: "”";
  position: absolute;
  top: 6px;
  inset-inline-start: 18px;
  font: 700 64px/1 Georgia, serif;
  color: var(--site-primary);
  opacity: .14
}

.testi-card blockquote {
  margin: 0;
  position: relative
}

.testi-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.95
}

.testi-card figcaption {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 12px
}

.testi-card figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px
}

.testi-name {
  color: var(--site-on-background);
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere
}

.testi-tag {
  font-weight: 500;
  color: var(--muted);
  font-size: 12.5px
}

@media(max-width:980px) {
  .testi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:620px) {
  .testi-grid {
    grid-template-columns: 1fr
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease
}

.reveal.in {
  opacity: 1;
  transform: translateY(0)
}

/* ===== Theme: dark ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --site-background: #151110;
  --site-on-background: #EDE6E3;
  --ink: #EDE6E3;
  --muted: #A99E9A;
  --line: #3A302E;
  --paper: #1C1716;
  --accent: #EC777B;
  --surface: #231D1C;
  --surface-2: #2C2321;
  --panel: #261E1D;
  --panel-line: #3E3331;
  --tint: #3A2224;
  --border-hover: #6E3C3E;
  --outline-line: #554744;
  --header-bg: rgba(24, 19, 18, .88);
  --input-bg: #151110;
  --input-line: #3E3331;
  --input-text: #EDE6E3;
  --art-paper: #2A2220;
  --art-card: #211A19;
  --art-line: #433734;
  --art-bar: #3E3331;
  --scroll-thumb: rgba(236, 119, 123, .3);
  --scroll-thumb-hover: rgba(236, 119, 123, .55);
}

/* The calligraphy logo is dark red on transparent: lift it so it reads on dark */
:root[data-theme="dark"] .hero-brand-lockup.actual-logo img {
  filter: brightness(1.75) saturate(.85);
}

:root[data-theme="dark"] .section-dark {
  border-block: 1px solid var(--line);
}

:root[data-theme="dark"] .toast {
  border: 1px solid var(--line);
}

/* Smooth colour change only while the theme is being switched */
html.theme-switching body,
html.theme-switching body *:not(svg):not(svg *) {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}

::selection {
  background: var(--site-primary);
  color: #fff;
}

/* ===== Theme toggle ===== */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--accent);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(.4);
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(.4);
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: none;
}

.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Animated menu toggle (hamburger → ✕) ===== */
.menu-toggle .bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  margin: -1px 0 0 -10px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .4s cubic-bezier(.68, -.35, .27, 1.35), opacity .2s ease, width .3s ease, margin .3s ease;
}

.menu-toggle .bar:nth-child(1) {
  transform: translateY(-6px);
}

.menu-toggle .bar:nth-child(3) {
  width: 13px;
  margin-left: -3px;
  transform: translateY(6px);
}

.menu-toggle:hover .bar:nth-child(3) {
  width: 20px;
  margin-left: -10px;
}

.menu-toggle[aria-expanded="true"] {
  border-color: var(--border-hover);
  background: var(--tint);
  color: var(--accent);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  width: 20px;
  margin-left: -10px;
  transform: rotate(-45deg);
}

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 70;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(to left, var(--site-primary), var(--accent) 70%, #D5B97A);
  box-shadow: 0 0 10px rgba(146, 8, 13, .35);
  transform: scaleX(0);
  transform-origin: right center;
}

/* ===== Navbar ===== */
.brand {
  flex: 0 1 auto;
  gap: 11px;
}

/* Header logo: the calligraphy wordmark (2047×426) scaled by height */
.brand-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: 100%;
  object-fit: contain;
  object-position: right center;
  transition: height .3s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.03);
}

:root[data-theme="dark"] .brand-logo {
  filter: brightness(1.75) saturate(.85);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.brand-name {
  min-width: 0;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 4px;
}

.phone-link svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.nav-extra,
.nav-scrim {
  display: none;
}

/* Desktop links: pill hover + animated underline + active section */
@media (min-width: 1025px) {
  .nav-links {
    gap: 2px;
  }

  .nav-links>a,
  .nav-more-toggle {
    position: relative;
    padding: 8px 13px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease;
  }

  .nav-links>a::after,
  .nav-more-toggle::after {
    content: "";
    position: absolute;
    right: 13px;
    left: 13px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  }

  .nav-links>a:hover,
  .nav-more-toggle:hover,
  .nav-more.open .nav-more-toggle {
    background: var(--tint);
  }

  .nav-links>a.active,
  .nav-more-toggle.active {
    color: var(--accent);
  }

  .nav-links>a:hover::after,
  .nav-links>a.active::after,
  .nav-more-toggle.active::after {
    transform: scaleX(1);
  }

  /* Secondary sections live in the «المزيد» dropdown on desktop */
  .nav-links>.nav-secondary {
    display: none;
  }

  .nav-more {
    position: relative;
  }

  .nav-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
  }

  .nav-more-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform .25s ease;
  }

  .nav-more:hover .nav-more-toggle svg,
  .nav-more.open .nav-more-toggle svg {
    transform: rotate(180deg);
  }

  .nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 50%;
    z-index: 5;
    display: grid;
    gap: 2px;
    min-width: 220px;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 44px rgba(20, 8, 8, .16);
    opacity: 0;
    visibility: hidden;
    transform: translate(50%, -6px);
    transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
  }

  /* Invisible bridge so the menu stays open while the pointer crosses the gap */
  .nav-more-menu::before {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    top: -12px;
    height: 12px;
  }

  .nav-more:hover .nav-more-menu,
  .nav-more:focus-within .nav-more-menu,
  .nav-more.open .nav-more-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(50%, 0);
    transition: opacity .2s ease, transform .25s ease, visibility 0s;
  }

  .nav-more-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease;
  }

  .nav-more-menu a::after {
    content: "←";
    color: var(--accent);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .2s ease, transform .25s ease;
  }

  .nav-more-menu a:hover,
  .nav-more-menu a.active {
    background: var(--tint);
    color: var(--accent);
  }

  .nav-more-menu a:hover::after,
  .nav-more-menu a.active::after {
    opacity: 1;
    transform: none;
  }
}

/* Narrow desktop: slightly smaller logo so the bar fits */
@media (min-width: 1025px) and (max-width: 1200px) {
  .brand-logo {
    height: 50px;
  }
}

.footer-links-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

@media (max-width: 1200px) {
  .phone-link {
    display: none;
  }
}

/* Tablet & mobile: hamburger + slide-down card panel */
@media (max-width: 1024px) {
  .menu-toggle {
    display: inline-block;
  }

  /* Keep brand on the right and the button group together on the left */
  .header-actions {
    margin-inline-start: auto;
    gap: 8px;
  }

  .nav {
    gap: 8px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(30, 15, 15, .05);
  }

  /* Floating card that drops from the burger button */
  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: auto;
    left: 20px;
    width: min(380px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    font-size: 15px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(20, 8, 8, .18);
    transform-origin: left top;
    max-height: calc(100dvh - var(--header-h) - 24px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.96);
    clip-path: inset(0 0 100% 0 round 20px);
    transition: opacity .3s ease, transform .35s cubic-bezier(.4, 0, .2, 1), clip-path .4s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .4s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    clip-path: inset(-60px -60px -60px -60px round 20px);
    transition: opacity .3s ease, transform .35s cubic-bezier(.4, 0, .2, 1), clip-path .4s cubic-bezier(.4, 0, .2, 1), visibility 0s;
  }

  .nav-links>a,
  .nav-extra {
    opacity: 0;
    transform: translateX(14px);
    transition: opacity .25s ease, transform .3s ease, color .2s ease, background-color .2s ease;
  }

  .nav-links>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
  }

  /* Mobile lists every section directly, so the desktop dropdown isn't needed */
  .nav-more {
    display: none;
  }

  .nav-links>a::after {
    content: "←";
    color: var(--accent);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .2s ease, transform .25s ease;
  }

  .nav-links>a:hover,
  .nav-links>a.active {
    background: var(--tint);
    color: var(--accent);
  }

  .nav-links>a:hover::after,
  .nav-links>a.active::after {
    opacity: 1;
    transform: none;
  }

  .nav-links.open>a,
  .nav-links.open .nav-extra {
    opacity: 1;
    transform: none;
  }

  .nav-links.open>a:nth-child(1) { transition-delay: .04s; }
  .nav-links.open>a:nth-child(2) { transition-delay: .07s; }
  .nav-links.open>a:nth-child(3) { transition-delay: .1s; }
  .nav-links.open>a:nth-child(4) { transition-delay: .13s; }
  .nav-links.open>a:nth-child(5) { transition-delay: .16s; }
  .nav-links.open>a:nth-child(6) { transition-delay: .19s; }
  .nav-links.open>a:nth-child(7) { transition-delay: .22s; }
  .nav-links.open>a:nth-child(8) { transition-delay: .25s; }
  .nav-links.open>a:nth-child(9) { transition-delay: .28s; }
  .nav-links.open>a:nth-child(11) { transition-delay: .31s; }
  .nav-links.open .nav-extra { transition-delay: .34s; }

  .nav-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .nav-extra .btn {
    flex: 1 1 150px;
    white-space: nowrap;
  }

  .wa-fab {
    transition: opacity .25s ease, transform .25s ease;
  }

  body.menu-open .wa-fab {
    opacity: 0;
    pointer-events: none;
    transform: scale(.8);
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(15, 8, 8, .45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }

  body.menu-open .nav-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease, visibility 0s;
  }
}

@media (max-width: 720px) {
  .brand-logo {
    height: 48px;
  }

  .nav-links {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .nav-extra .btn {
    flex-basis: 100%;
  }
}

@media (max-width: 360px) {
  .brand-logo {
    height: 39px;
  }
}

/* ===== Header states & mobile animation ===== */
header.is-scrolled {
  box-shadow: 0 8px 24px rgba(30, 15, 15, .08);
}

header.is-scrolled .brand-logo {
  height: 48px;
}

@media (max-width: 1024px) {
  header {
    animation: headerIn .6s cubic-bezier(.22, 1, .36, 1) backwards;
  }

  header.is-hidden {
    transform: translateY(-100%);
  }
}

@media (max-width: 720px) {
  header.is-scrolled {
    --header-h: 60px;
  }

  header.is-scrolled .brand-logo {
    height: 42px;
  }
}

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Small screens: keep the header row from overflowing ===== */
@media (max-width: 480px) {
  .header-actions .btn {
    display: none;
  }
}

@media (max-width: 380px) {
  .brand-name small {
    display: none;
  }
}

/* ===== Modern scrollbar ===== */
@supports not selector(::-webkit-scrollbar) {

  html,
  .modal,
  .nav-links {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--site-primary);
}

@media (prefers-reduced-motion: reduce) {
  header {
    animation: none !important;
  }

  header.is-hidden {
    transform: none;
  }
}

/* ===== Floating-label fields ===== */
.field {
  position: relative;
  min-width: 0;
}

.field>input,
.field>select,
.field>textarea {
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 24px 16px 8px;
  padding-inline-start: 46px;
  border: 1.5px solid var(--input-line);
  border-radius: 12px;
  background-color: var(--input-bg);
  color: var(--input-text);
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* Textarea grows with its content (main.js), so no manual resize handle */
.field>textarea {
  min-height: 140px;
  max-height: 320px;
  padding-top: 34px;
  padding-bottom: 14px;
  line-height: 1.8;
  resize: none;
  overflow-y: auto;
}

/* Textarea scrollbar: slim pill, track inset so it stays clear of the label strip */
@supports not selector(::-webkit-scrollbar) {
  .field>textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(146, 8, 13, .35) transparent;
  }
}

.field>textarea::-webkit-scrollbar {
  width: 14px;
}

.field>textarea::-webkit-scrollbar-button {
  display: none;
  height: 0;
}

.field>textarea::-webkit-scrollbar-track {
  margin: 34px 0 10px;
  background: transparent;
}

.field>textarea::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 5px solid transparent;
  border-radius: 999px;
  background-color: rgba(146, 8, 13, .25);
  background-clip: padding-box;
}

.field>textarea:hover::-webkit-scrollbar-thumb,
.field>textarea:focus::-webkit-scrollbar-thumb {
  background-color: rgba(146, 8, 13, .42);
}

.field>textarea::-webkit-scrollbar-thumb:hover,
.field>textarea::-webkit-scrollbar-thumb:active {
  border-width: 4px;
  background-color: var(--site-primary);
}

:root[data-theme="dark"] .modal .field>textarea::-webkit-scrollbar-thumb {
  background-color: rgba(236, 119, 123, .35);
}

.field>select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392080D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 16px;
}

.field>input:focus,
.field>select:focus,
.field>textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(146, 8, 13, .12);
}

.field>input:user-invalid,
.field>textarea:user-invalid {
  border-color: #D64545;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, .14);
}

.field>label {
  position: absolute;
  top: 29px;
  inset-inline-start: 46px;
  inset-inline-end: 16px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: right center;
  transition: top .2s ease, font-size .2s ease, color .2s ease, transform .2s ease;
}

/* Float the label once the field is focused, filled, or is a select */
.field>input:focus~label,
.field>input:not(:placeholder-shown)~label,
.field>textarea:focus~label,
.field>textarea:not(:placeholder-shown)~label,
.field>select~label {
  top: 15px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
}

/* Textarea label floats on a solid strip so scrolled text never shows behind it */
.field-textarea>textarea:focus~label,
.field-textarea>textarea:not(:placeholder-shown)~label {
  top: 1.5px;
  padding: 8px 0 7px;
  background: var(--input-bg);
  transform: none;
}

:root[data-theme="dark"] .modal .field>select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EC777B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.field .req {
  color: #D64545;
}

.field-icon {
  position: absolute;
  top: 29px;
  inset-inline-start: 16px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color .2s ease, transform .25s ease;
}

.field:focus-within .field-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

/* Counter sits under the textarea so it never covers typed text */
.field-count {
  display: block;
  width: fit-content;
  margin-top: 7px;
  margin-inline-start: auto;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(146, 8, 13, .07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  direction: ltr;
  transition: color .2s ease, background-color .2s ease;
}

.field-count.is-near {
  background: rgba(192, 38, 44, .14);
  color: #C0262C;
}

.contact-form .field-count {
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
}

.contact-form .field-count.is-near {
  background: #fff;
  color: #C0262C;
}

/* Label strip matches the field colour in each state */
.contact-form .field-textarea>textarea:focus~label,
.contact-form .field-textarea>textarea:not(:placeholder-shown)~label {
  background: #FAF3F3;
}

.contact-form .field-textarea>textarea:hover~label,
.contact-form .field-textarea>textarea:focus~label {
  background: #fff;
}

.form-grid .btn {
  width: 100%;
  margin-top: 4px;
}

/* ===== Contact form card (always on the red section, in both themes) ===== */
.contact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(40, 0, 4, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-form .field-full {
  grid-column: 1 / -1;
}

.contact-form .field>input,
.contact-form .field>select,
.contact-form .field>textarea {
  border-color: transparent;
  background-color: #FAF3F3;
  color: #282020;
}

.contact-form .field>input:hover,
.contact-form .field>select:hover,
.contact-form .field>textarea:hover {
  background-color: #fff;
}

.contact-form .field>input:focus,
.contact-form .field>select:focus,
.contact-form .field>textarea:focus {
  border-color: #D5B97A;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(213, 185, 122, .35);
}

.contact-form .field>input:user-invalid,
.contact-form .field>textarea:user-invalid {
  border-color: #FFB4B7;
  box-shadow: 0 0 0 4px rgba(255, 180, 183, .35);
}

.contact-form .field>label,
.contact-form .field-icon {
  color: #7A6E6C;
}

.contact-form .field>input:focus~label,
.contact-form .field>input:not(:placeholder-shown)~label,
.contact-form .field>textarea:focus~label,
.contact-form .field>textarea:not(:placeholder-shown)~label,
.contact-form .field>select~label,
.contact-form .field:focus-within .field-icon {
  color: #92080D;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 4px;
}

.contact-form .form-actions .btn {
  position: relative;
  overflow: hidden;
  min-width: 230px;
  padding: 15px 26px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(30, 0, 4, .28);
  transition: transform .2s ease, box-shadow .2s ease, background-color .3s ease, color .3s ease;
}

.contact-form .form-actions .btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.contact-form .form-actions .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(146, 8, 13, .12) 50%, transparent 70%);
  transform: translateX(100%);
  transition: transform .7s ease;
  pointer-events: none;
}

.contact-form .form-actions .btn:hover {
  box-shadow: 0 16px 34px rgba(30, 0, 4, .34);
}

.contact-form .form-actions .btn:hover::after {
  transform: translateX(-100%);
}

.contact-form .form-actions .btn.is-sent {
  background: #E9F9EF;
  color: #11683A;
}

.form-actions .contact-note {
  flex: 1 1 200px;
}

@media (max-width: 600px) {
  .contact-form {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .contact-form .form-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
