:root {
  --ink: #071421;
  --muted: #66594d;
  --paper: #fffaf3;
  --cream: #fff3df;
  --brown-950: #2a170d;
  --brown-800: #5b3419;
  --clay: #c97822;
  --gold: #f1b462;
  --teal: #0f5b43;
  --line: rgba(42, 23, 13, 0.14);
  --shadow: 0 24px 70px rgba(42, 23, 13, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
}

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

button {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(7, 20, 33, 0.08);
  display: flex;
  gap: 22px;
  height: 76px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 30;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 13px;
  min-width: max-content;
  text-transform: uppercase;
}

.brand-logo {
  display: block;
  height: 52px;
  width: auto;
}

.brand-symbol {
  display: block;
  height: 62px;
  object-fit: contain;
  width: auto;
}

.brand-wordmark {
  display: grid;
  gap: 3px;
  line-height: 1;
  white-space: nowrap;
}

.brand-wordmark strong {
  color: #071421;
  font-family: "Space Grotesk", "Inter", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

.brand-wordmark small {
  color: var(--clay);
  font-family: "Space Grotesk", "Inter", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand .brand-wordmark strong {
  color: #071421;
  font-family: "Space Grotesk", "Inter", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

.brand .brand-wordmark small {
  color: var(--clay);
  font-family: "Space Grotesk", "Inter", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-mark {
  align-items: center;
  background: var(--brown-950);
  border-radius: 8px;
  color: var(--gold);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 13px;
  font-weight: 900;
}

.brand small {
  color: var(--clay);
  font-size: 11px;
  font-weight: 900;
}

.site-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: clamp(14px, 2vw, 28px);
  justify-content: center;
}

.site-nav a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--clay);
}

.header-action,
.btn-primary,
.btn-secondary {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  text-transform: uppercase;
}

.header-action,
.btn-primary {
  background: var(--clay);
  color: #ffffff;
}

.header-action:hover,
.btn-primary:hover {
  background: #a95d1e;
}

.btn-secondary {
  background: rgba(255, 244, 228, 0.14);
  border: 1px solid rgba(255, 244, 228, 0.32);
  color: #ffffff;
}

.menu-toggle {
  align-items: center;
  background: var(--clay);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: none;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.tours-hero {
  background: var(--brown-950);
  color: #ffffff;
  display: grid;
  min-height: 620px;
  overflow: hidden;
  padding: clamp(38px, 7vw, 88px) clamp(20px, 6vw, 92px);
  position: relative;
}

.tours-hero > img {
  height: 100%;
  inset: 0 0 0 auto;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
  position: absolute;
  width: min(74vw, 1140px);
}

.tours-hero::before {
  background:
    linear-gradient(90deg, var(--brown-950) 0%, rgba(42, 23, 13, 0.96) 36%, rgba(42, 23, 13, 0.45) 68%, rgba(42, 23, 13, 0.1) 100%),
    linear-gradient(0deg, rgba(42, 23, 13, 0.62), rgba(42, 23, 13, 0));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.hero-copy {
  align-self: center;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.back-link {
  align-items: center;
  color: rgba(255, 244, 228, 0.86);
  display: flex;
  font-size: 13px;
  font-weight: 850;
  gap: 8px;
  margin-bottom: clamp(30px, 5vw, 58px);
  width: max-content;
}

.eyebrow,
.tour-tag {
  color: var(--gold);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero-copy > .eyebrow {
  display: flex;
  width: max-content;
}

.tours-hero h1,
.section-heading h2,
.custom-route h2 {
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.tours-hero h1 {
  font-size: clamp(48px, 7vw, 88px);
  max-width: 10ch;
}

.tours-hero p:not(.eyebrow) {
  color: rgba(255, 244, 228, 0.9);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 650;
  max-width: 47ch;
}

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

.hero-panel {
  align-self: end;
  background: rgba(255, 250, 243, 0.94);
  border: 1px solid rgba(255, 244, 228, 0.42);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(42, 23, 13, 0.2);
  color: var(--brown-950);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
  padding: 12px;
  position: relative;
  width: max-content;
  z-index: 2;
}

.hero-panel span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  gap: 8px;
  padding: 9px 12px;
}

.hero-panel i {
  color: var(--clay);
}

.tour-directory {
  margin: 0 auto;
  max-width: 1220px;
  padding: clamp(56px, 7vw, 92px) 20px;
}

.section-heading {
  margin: 0 auto 28px;
  max-width: 780px;
  text-align: center;
}

.section-heading .eyebrow {
  color: var(--clay);
}

.section-heading h2 {
  font-size: clamp(34px, 5vw, 58px);
}

.section-heading p {
  color: var(--muted);
  font-size: 17px;
  margin: 14px auto 0;
  max-width: 58ch;
}

.tour-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 28px;
}

.tour-filters button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brown-800);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 42px;
  padding: 9px 16px;
  text-transform: uppercase;
}

.tour-filters button:hover,
.tour-filters button.is-active {
  background: var(--brown-950);
  border-color: var(--brown-950);
  color: #ffffff;
}

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

.tour-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(42, 23, 13, 0.08);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
}

.tour-card.is-hidden {
  display: none;
}

.tour-card-featured,
.tour-card-wide {
  grid-column: span 2;
}

.tour-image {
  display: block;
  overflow: hidden;
  position: relative;
}

.tour-image img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.tour-card:hover .tour-image img {
  transform: scale(1.035);
}

.tour-tag {
  background: rgba(42, 23, 13, 0.84);
  border: 1px solid rgba(255, 244, 228, 0.22);
  border-radius: 999px;
  bottom: 14px;
  color: #fff3df;
  left: 14px;
  margin: 0;
  padding: 7px 10px;
  position: absolute;
}

.tour-content {
  align-content: start;
  display: grid;
  gap: 16px;
  grid-template-rows: auto auto auto;
  padding: 20px;
}

.tour-content h3 {
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
}

.tour-content p {
  color: var(--muted);
  font-size: 15px;
  margin: 10px 0 0;
}

.tour-facts {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-facts span {
  align-items: center;
  background: var(--cream);
  border-radius: 999px;
  color: var(--brown-800);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  gap: 7px;
  line-height: 1;
  min-height: 34px;
  padding: 8px 10px;
  width: max-content;
}

.tour-facts i {
  color: var(--clay);
}

.tour-bottom {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-top: 16px;
}

.tour-bottom strong {
  color: var(--brown-950);
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.tour-bottom span {
  color: var(--muted);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.tour-bottom a {
  align-items: center;
  color: var(--clay);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.custom-route {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(42, 23, 13, 0.96), rgba(91, 52, 25, 0.9)),
    url("../assets/images/portfolio/gallery-koutoubia-group.jpg") center / cover no-repeat;
  color: #ffffff;
  display: flex;
  gap: 26px;
  justify-content: space-between;
  margin: 0 auto clamp(48px, 7vw, 86px);
  max-width: 1180px;
  padding: clamp(28px, 5vw, 52px);
}

.custom-route h2 {
  font-size: clamp(32px, 4vw, 52px);
  max-width: 12ch;
}

.custom-route p:not(.eyebrow) {
  color: rgba(255, 244, 228, 0.84);
  margin: 14px 0 0;
  max-width: 58ch;
}

.site-footer {
  align-items: center;
  background: #18110c;
  color: #f7eadc;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  padding: 22px clamp(20px, 6vw, 72px);
}

.site-footer span,
.site-footer a {
  color: #cbbcac;
  font-size: 13px;
  font-weight: 750;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a:hover {
  color: var(--gold);
}

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

  .tour-card-featured,
  .tour-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    height: 70px;
    padding-inline: 16px;
  }

  .brand {
    min-width: 0;
  }

  .site-nav {
    background: rgba(42, 23, 13, 0.98);
    border-top: 1px solid rgba(255, 244, 228, 0.14);
    display: none;
    flex-direction: column;
    gap: 0;
    left: 0;
    padding: 16px 20px 24px;
    position: absolute;
    right: 0;
    top: 70px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    color: #ffffff;
    padding: 12px;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
    position: relative;
    z-index: 40;
  }

  .header-action {
    display: none;
  }

  .tours-hero > img {
    width: 100%;
  }

  .tours-hero::before {
    background:
      linear-gradient(0deg, var(--brown-950) 0%, rgba(42, 23, 13, 0.82) 58%, rgba(42, 23, 13, 0.22) 100%),
      linear-gradient(90deg, rgba(42, 23, 13, 0.88), rgba(42, 23, 13, 0.2));
  }

  .hero-panel {
    max-width: calc(100vw - 32px);
    width: 100%;
  }

  .custom-route {
    align-items: stretch;
    flex-direction: column;
    margin-inline: 20px;
  }
}

@media (max-width: 640px) {
  body {
    max-width: 100vw;
  }

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

  .brand small {
    font-size: 10px;
  }

  .tours-hero {
    min-height: 620px;
    padding: 30px 16px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  .tours-hero h1 {
    font-size: 42px;
    max-width: 9ch;
  }

  .tours-hero p:not(.eyebrow) {
    max-width: 31ch;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 328px;
  }

  .hero-panel {
    display: grid;
    inline-size: calc(100vw - 32px);
  }

  .tour-directory {
    max-width: 100vw;
    overflow: hidden;
    padding-inline: 16px;
    width: 100%;
  }

  .section-heading,
  .tours-grid,
  .tour-card {
    max-width: calc(100vw - 32px);
    width: 100%;
  }

  .section-heading p {
    font-size: 16px;
    max-width: min(30ch, calc(100vw - 48px));
    overflow-wrap: break-word;
  }

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

  .tour-card-featured,
  .tour-card-wide {
    grid-column: auto;
  }

  .tour-content {
    max-width: calc(100vw - 32px);
    padding: 18px;
  }

  .tour-content p,
  .tour-content h3 {
    max-width: calc(100vw - 68px);
    overflow-wrap: break-word;
  }

  .tour-content p {
    max-width: min(29ch, calc(100vw - 92px));
    overflow-wrap: normal;
  }

  .tour-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .tour-bottom a {
    justify-content: center;
    min-height: 42px;
  }

  .tour-filters {
    justify-content: flex-start;
    margin-left: -16px;
    margin-right: -16px;
    max-width: 100vw;
    overflow-x: auto;
    padding-inline: 16px;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    width: 100vw;
  }

  .tour-filters button {
    flex: 0 0 auto;
    font-size: 11px;
    min-height: 40px;
    padding-inline: 12px;
    scroll-snap-align: start;
  }

  .custom-route {
    margin-inline: 16px;
  }
}

@media (max-width: 380px) {
  .tours-hero h1 {
    font-size: 38px;
  }
}

@media (max-width: 640px) {
  .brand-logo {
    height: 42px;
    max-width: 188px;
  }

  .brand-symbol {
    height: 46px;
  }

  .brand-wordmark strong {
    font-size: 13px;
  }

  .brand-wordmark small {
    font-size: 10px;
  }

  .brand .brand-wordmark strong {
    font-size: 13px;
  }

  .brand .brand-wordmark small {
    font-size: 11px;
  }
}
