/* Ashford Al Majd
   Colours: navy #1B2A52, blue #3A5A94, stone #DCDAD5 */

:root {
  --navy: #1b2a52;
  --navy-dark: #131f3f;
  --blue: #3a5a94;
  --blue-light: #a9bbdc;
  --stone: #dcdad5;
  --stone-light: #efeeeb;
  --white: #fff;
  --text: #222a3d;
  --grey: #5f6676;
  --border: #dedcd7;
  --font: "Alegreya Sans", "Gill Sans", "Segoe UI", sans-serif;
  --wrap: 1200px;
  --pad: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.6; color: var(--text); background: var(--white); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--navy); font-weight: 800; }
p { margin: 0 0 14px; }
svg { flex: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -9999px; top: 6px; z-index: 99; background: var(--navy); color: #fff; padding: 8px 12px; }
.skip:focus { left: 6px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  font: 700 16px/1.2 var(--font);
  color: #fff; background: var(--blue);
  border: 2px solid var(--blue); border-radius: 5px;
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn--light { background: #fff; border-color: #fff; color: var(--navy); }
.btn--light:hover { background: var(--stone); border-color: var(--stone); color: var(--navy); }
.btn--line { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn--line:hover { background: #fff; border-color: #fff; color: var(--navy); }

/* header */
.topbar { background: var(--navy-dark); font-size: 15px; }
.topbar__row { display: flex; gap: 26px; padding-top: 6px; padding-bottom: 6px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; color: #d0d8ea; text-decoration: none; }
.topbar svg { width: 15px; height: 15px; color: var(--blue-light); }
.topbar a:hover { color: #fff; }
.topbar__addr { margin-left: auto; }
.topbar__addr:hover { text-decoration: underline; text-underline-offset: 3px; }
.topbar__addr:hover svg { color: #fff; }
.topbar a:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; border-radius: 3px; }

.head { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.head__row { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand__logo { display: block; width: auto; height: 52px; }
.brand:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }
.head__pages { display: flex; }
.head__pages a { padding: 8px 14px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 17.5px; border-radius: 4px; }
.head__pages a:hover { color: var(--blue); }
.head__pages a[aria-current="page"] { color: var(--blue); font-weight: 700; }

.cats { background: var(--navy); }
.cats__row { display: flex; overflow-x: auto; scrollbar-width: none; }
.cats__row::-webkit-scrollbar { display: none; }
.cats a { flex: 1 0 auto; text-align: center; padding: 12px 14px; color: #fff; text-decoration: none; font-size: 16.5px; font-weight: 500; }
.cats a + a { border-left: 1px solid rgba(255,255,255,.12); }
.cats a:hover { background: var(--blue); }
.cats a[aria-current="page"] { background: var(--blue); font-weight: 700; }

.head__menu, .mnav { display: none; }

@media (max-width: 900px) {
  .topbar__row { justify-content: center; gap: 18px; font-size: 14px; }
  .head__pages, .cats { display: none; }
  .head__row { min-height: 64px; }
  .brand__logo { height: 42px; }
  .head__menu { display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; background: var(--navy); border: 0; border-radius: 5px; cursor: pointer; }
  .head__menu span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .25s, opacity .2s; }
  .head__menu em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .head.is-open .head__menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .head.is-open .head__menu span:nth-child(2) { opacity: 0; }
  .head.is-open .head__menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mnav { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 64px); overflow-y: auto; background: var(--navy); padding: 6px var(--pad) 24px; }
  .head.is-open .mnav { display: block; }
  .mnav__group { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .mnav__group p { color: var(--blue-light); font-size: 14px; margin: 6px 0 2px; }
  .mnav a { display: block; padding: 8px 0; color: #fff; text-decoration: none; font-size: 19px; }
  .mnav a[aria-current="page"] { color: var(--blue-light); }
  .mnav__contact { padding-top: 12px; }
  .mnav__contact a { font-size: 16px; color: #d0d8ea; padding: 4px 0; }
}
@media (max-width: 480px) { .topbar__row a:nth-child(2) { display: none; } }

/* hero */
.hero { position: relative; height: clamp(440px, 64vh, 620px); background: var(--navy); overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19,31,63,.88) 0%, rgba(19,31,63,.6) 40%, rgba(19,31,63,.05) 75%); }
.slide__body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 30px; }
.slide__title { color: #fff; font-size: clamp(36px, 5vw, 60px); max-width: 600px; margin-bottom: 14px; }
.slide__sub { color: #e2e7f1; font-size: clamp(18px, 1.7vw, 21px); max-width: 480px; margin-bottom: 26px; }
.slide__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__arrow { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%; cursor: pointer; }
.hero__arrow:hover { background: rgba(255,255,255,.3); }
.hero__arrow svg { width: 22px; height: 22px; }
.hero__arrow--prev { left: 14px; }
.hero__arrow--next { right: 14px; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 3; display: flex; justify-content: center; gap: 4px; }
.hero__dot { width: 28px; height: 28px; padding: 0; background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.hero__dot::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; transition: background .2s; }
.hero__dot.is-active::before { background: #fff; }
@media (max-width: 760px) {
  .hero { height: 540px; }
  .slide::after { background: linear-gradient(180deg, rgba(19,31,63,.1) 0%, rgba(19,31,63,.75) 50%, rgba(19,31,63,.95) 100%); }
  .slide__body { justify-content: flex-end; padding-bottom: 64px; }
  .hero__arrow { display: none; }
}

/* about (home) */
.about { padding: 80px 0; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about__pics { position: relative; padding: 0 50px 60px 0; }
.about__img1 { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.about__img2 { position: absolute; right: 0; bottom: 0; width: 50%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 6px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.about__text h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 16px; }
.about__lead { font-size: 21px; color: var(--navy); font-weight: 500; }
.about__text p { color: var(--grey); }
.about__text .about__lead { color: var(--navy); }
.about__text .btn { margin-top: 8px; }
@media (max-width: 900px) {
  .about { padding: 56px 0; }
  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__pics { padding: 0 30px 40px 0; }
}

/* category rails (home) */
.cat { padding: 60px 0; }
.cat--alt { background: var(--stone-light); }
.cat__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--stone); }
.cat__head h2 { font-size: clamp(28px, 3vw, 36px); }
.cat__head p { color: var(--grey); margin: 4px 0 0; }
.cat__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.rbtn { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: 50%; cursor: pointer; }
.rbtn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.rbtn:disabled { opacity: .4; pointer-events: none; }
.rbtn svg { width: 20px; height: 20px; }
.cat__actions .btn { margin-left: 6px; }
.rail { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scroll-padding: 0 var(--pad); }
.rail::-webkit-scrollbar { display: none; }
.rail__track { display: flex; gap: 18px; padding: 4px 0 10px; }
.rail .card { flex: 0 0 calc((100% - 18px * 3) / 4); scroll-snap-align: start; }
@media (max-width: 1000px) { .rail .card { flex-basis: calc((100% - 18px * 2) / 3); } }
@media (max-width: 700px) {
  .cat { padding: 44px 0; }
  .cat__head { flex-direction: column; align-items: stretch; }
  .cat__actions .btn { margin-left: auto; }
  .rail .card { flex-basis: 70%; }
}

/* product card */
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(27,42,82,.05); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 3px; background: linear-gradient(90deg, var(--blue), var(--navy)); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone-light); border-bottom: 1px solid var(--border); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card--drawn .card__media { background: linear-gradient(145deg, #fff 20%, #e7eaf1); }
.card--drawn .card__media img { object-fit: contain; padding: 7%; }
.card__code { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 4px 9px; background: rgba(255,255,255,.94); color: var(--navy); border-radius: 20px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; box-shadow: 0 1px 4px rgba(27,42,82,.14); }
.card__body { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 17px; }
.card__name { font-size: 18.5px; line-height: 1.25; transition: color .2s; }
.card__desc { margin: 0; color: var(--grey); font-size: 15.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover { transform: translateY(-5px); border-color: var(--blue-light); box-shadow: 0 14px 30px rgba(27,42,82,.16); }
.card:hover::before { transform: scaleX(1); }
.card:hover .card__media img { transform: scale(1.06); }
.card:hover .card__name { color: var(--blue); }

/* call strip */
.callstrip { background: var(--blue); color: #fff; padding: 30px 0; }
.callstrip__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.callstrip p { margin: 0; font-size: 19px; max-width: 620px; }
.callstrip b { display: block; font-size: 23px; }
.callstrip__links { display: flex; gap: 10px; flex-wrap: wrap; }

/* inner page banner */
.pbanner { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.pbanner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pbanner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19,31,63,.9), rgba(19,31,63,.55)); }
.pbanner__body { position: relative; z-index: 2; padding-top: 54px; padding-bottom: 54px; }
.pbanner h1 { color: #fff; font-size: clamp(36px, 5vw, 54px); }
.pbanner p { color: #e2e7f1; font-size: 19px; max-width: 600px; margin: 10px 0 0; }
.crumbs { font-size: 15px; margin-bottom: 14px; color: #c4cee3; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; }

/* category page */
.listing { padding: 50px 0 70px; }
.listing__grid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.side { position: sticky; top: 140px; display: grid; gap: 18px; }
.side__box { border: 1px solid var(--border); border-radius: 6px; padding: 18px 18px 14px; }
.side__box h2 { font-size: 20px; margin-bottom: 10px; }
.side__cats { list-style: none; margin: 0; padding: 0; }
.side__cats a { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.side__cats li:first-child a { border-top: 0; }
.side__cats a:hover { color: var(--blue); }
.side__cats a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.side__cats span { color: var(--grey); font-size: 15px; }
.side__box--navy { background: var(--navy); border-color: var(--navy); color: #dbe2f0; }
.side__box--navy h2 { color: #fff; }
.side__box--navy p { font-size: 16px; }
.side__box--navy a { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; padding: 4px 0; font-size: 16px; word-break: break-all; }
.side__box--navy svg { width: 16px; height: 16px; color: var(--blue-light); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .listing { padding: 30px 0 50px; }
  .listing__grid { grid-template-columns: 1fr; }
  .side { position: static; order: 2; }
}
@media (max-width: 480px) {
  .grid { gap: 12px; }
  .card__body { padding: 12px 12px 13px; gap: 5px; }
  .card__name { font-size: 16.5px; }
  .card__desc { font-size: 14.5px; -webkit-line-clamp: 2; }
}

/* about page */
.story { padding: 64px 0; }
.story__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.story__text h2 { font-size: 28px; margin: 28px 0 10px; }
.story__text h2:first-child { margin-top: 0; }
.story__text p { color: var(--grey); }
.story__fig { margin: 0; position: sticky; top: 140px; }
.story__fig img { border-radius: 6px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.supply { padding: 0 0 70px; }
.supply h2 { font-size: 30px; margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; text-decoration: none; background: var(--navy); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,31,63,0) 40%, rgba(19,31,63,.85)); }
.tile span { position: absolute; left: 16px; bottom: 12px; z-index: 2; color: #fff; font-weight: 700; font-size: 21px; }
.tile:hover img { transform: scale(1.05); }
@media (max-width: 800px) { .story__grid { grid-template-columns: 1fr; gap: 30px; } .story__fig { position: static; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile span { font-size: 17px; } }

/* careers */
.careers { padding: 64px 0 80px; }
.careers__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.careers h2 { font-size: 32px; margin-bottom: 12px; }
.careers__intro { color: var(--grey); font-size: 19px; }
.careers__sub { font-size: 22px; margin: 30px 0 6px; }
.roles { list-style: none; margin: 0; padding: 0; }
.roles li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.roles h3 { font-size: 19px; margin-bottom: 4px; }
.roles p { color: var(--grey); margin: 0; }
.apply { background: var(--navy); color: #dbe2f0; padding: 30px; border-radius: 6px; }
.apply h2 { color: #fff; font-size: 28px; }
.apply a:not(.btn) { color: #fff; }
.apply address { font-style: normal; color: #fff; margin-bottom: 22px; }
@media (max-width: 900px) { .careers__grid { grid-template-columns: 1fr; gap: 36px; } }

/* contact */
.contact { padding: 60px 0 80px; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: stretch; }
.contact__cards { display: grid; gap: 14px; align-content: start; }
.ccard { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); text-decoration: none; font-size: 20px; line-height: 1.4; }
a.ccard:hover { border-color: var(--blue); }
.ccard > svg { width: 26px; height: 26px; color: var(--blue); margin-top: 3px; }
.ccard b { display: block; font-size: 15px; color: var(--grey); font-weight: 500; }
.ccard span { word-break: break-word; }
.ccard__map { display: inline-block; margin-top: 8px; font-size: 16px; font-weight: 700; }
.contact__note { color: var(--grey); font-size: 16px; margin-top: 6px; }
.contact__map { min-height: 420px; border-radius: 6px; overflow: hidden; background: var(--stone); }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* credits */
.credits { padding: 50px 0 70px; }
.credits__scroll { overflow-x: auto; }
.credits table { width: 100%; border-collapse: collapse; font-size: 16px; }
.credits th, .credits td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.credits th { background: var(--stone-light); color: var(--navy); }

/* footer */
.foot { background: var(--navy-dark); color: #b9c4db; padding-top: 56px; font-size: 16.5px; }
.foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.foot .brand { color: #fff; margin-bottom: 16px; }
.foot .brand__logo { height: 46px; }
.foot__brand p { max-width: 320px; }
.foot h3 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }
.foot a { color: #b9c4db; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot address { font-style: normal; margin-bottom: 10px; }
.foot__by a { color: #fff; font-weight: 700; text-decoration: none; }
.foot__by a:hover { text-decoration: underline; }
.foot__base { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14.5px; }
@media (max-width: 900px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } .foot__base { flex-direction: column; gap: 4px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .card:hover { transform: none; }
}
