/* ==========================================================================
   Levantix — styles
   Brand: maroon + steel grey from the logo, Trajan-style display type.
   Logical properties (inline/block) are used throughout so the Arabic
   (dir="rtl") version mirrors without extra rules.
   ========================================================================== */

:root {
  /* Colour */
  --maroon: #6e1423;
  --maroon-700: #58101c;
  --wine: #2c0a11;        /* deep surface for the contact band */
  --wine-2: #3d0f19;
  --steel: #8b8e93;       /* the grey stroke of the logo */
  --brass: #d2b48c;       /* the lettering on the container */
  --ink: #1f1a1c;
  --muted: #5f585b;
  --rule: #e2dfe0;
  --mist: #f3f3f4;
  --paper: #ffffff;
  --focus: #b0823e;

  /* Type */
  --font-display: "Marcellus", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Scale (1.25 minor third-ish, fluid at the top end) */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4.5rem, 8vw, 7.5rem);
  --header-h: 76px;
  --radius: 6px;
}

:root[lang="ar"] {
  --font-display: "Amiri", "Times New Roman", serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[lang="ar"] body { line-height: 1.8; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--maroon);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-sm { min-height: 42px; padding: .6rem 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-700); }

.btn-light { background: #fff; color: var(--maroon); }
.btn-light:hover { background: #f4e9eb; }

.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.text-link {
  color: var(--maroon);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  text-decoration-color: rgba(110,20,35,.35);
  transition: text-decoration-color .2s;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 6px 24px -18px rgba(44,10,17,.45);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  flex: none;
}
.brand-mark { width: auto; height: 46px; }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding-inline-start: .85rem;
  border-inline-start: 1px solid var(--rule);
}
.brand-name {
  font-family: "Marcellus", serif; /* the wordmark stays Latin in both languages */
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: .2em;
  color: var(--maroon);
}
.brand-tag {
  font-size: .72rem;
  line-height: 1.2;
  color: var(--muted);
  letter-spacing: .02em;
}

.nav {
  display: flex;
  gap: 2rem;
  margin-inline-start: auto;
}
.nav a {
  position: relative;
  padding-block: .4rem;
  font-weight: 500;
  font-size: .98rem;
  text-decoration: none;
  color: var(--ink);
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--maroon);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.nav a:hover { color: var(--maroon); }
.nav a:hover::after,
.nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav a[aria-current="true"] { color: var(--maroon); }

.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.lang-toggle {
  min-height: 42px;
  padding: .4rem .8rem;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--maroon); color: var(--maroon); }
.lang-toggle[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-toggle[lang="en"] { font-family: "Hanken Grotesk", sans-serif; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--maroon);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: .5rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--rule);
  background: #fff;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a:not(.btn) {
  padding-block: .85rem;
  border-bottom: 1px solid var(--mist);
  text-decoration: none;
  font-weight: 500;
}
.mobile-nav .btn { margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(820px, calc(100svh - var(--header-h)));
  display: flex;
  color: #fff;
  background: var(--wine);
  overflow: hidden;
}
.hero-media img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(34,7,13,.92) 0%, rgba(58,12,22,.78) 38%, rgba(58,12,22,.2) 72%, rgba(58,12,22,0) 100%),
    linear-gradient(0deg, rgba(34,7,13,.85) 0%, rgba(34,7,13,0) 38%);
}
[dir="rtl"] .hero-shade {
  background:
    linear-gradient(270deg, rgba(34,7,13,.92) 0%, rgba(58,12,22,.78) 38%, rgba(58,12,22,.2) 72%, rgba(58,12,22,0) 100%),
    linear-gradient(0deg, rgba(34,7,13,.85) 0%, rgba(34,7,13,0) 38%);
}
[dir="rtl"] .hero-media img { transform: scaleX(-1); object-position: 30% center; }

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3.5rem;
  padding-block: clamp(4rem, 10vh, 7rem) 2.5rem;
}

.hero-copy { max-width: 40rem; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -.005em;
  text-wrap: balance;
}
:root[lang="ar"] .hero-title { line-height: 1.3; font-weight: 700; }

.hero-lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: rgba(255,255,255,.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

/* Route: rule + diamonds, echoing the ornament under the logo wordmark */
.route {
  --dot: 11px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 820px;
  padding-top: 1.75rem;
}
.route::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2);
  inset-inline-start: calc(var(--dot) / 2);
  inset-inline-end: calc(100% / 3 - var(--dot) / 2);
  height: 1px;
  background: linear-gradient(90deg, var(--brass), rgba(210,180,140,.55));
  transform-origin: left center;
  animation: route-draw 1.4s cubic-bezier(.6,.1,.2,1) .35s both;
}
[dir="rtl"] .route::before {
  transform-origin: right center;
  background: linear-gradient(270deg, var(--brass), rgba(210,180,140,.55));
}
.route-stop {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding-inline-end: 1rem;
}
.route-dot {
  position: absolute;
  top: calc(-1.75rem);
  inset-inline-start: 0;
  width: var(--dot);
  height: var(--dot);
  background: var(--brass);
  transform: rotate(45deg) scale(0);
  animation: route-dot .35s ease-out both;
}
.route-stop:nth-child(1) .route-dot { animation-delay: .3s; }
.route-stop:nth-child(2) .route-dot { animation-delay: .95s; }
.route-stop:nth-child(3) .route-dot { animation-delay: 1.6s; }
.route-city {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.3;
}
.route-role {
  font-size: var(--step--1);
  color: rgba(255,255,255,.7);
}

@keyframes route-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes route-dot  { to { transform: rotate(45deg) scale(1); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.12;
  color: var(--maroon);
  text-wrap: balance;
}
:root[lang="ar"] .section-title { font-weight: 700; line-height: 1.35; }

.section-lead {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.services-intro {
  position: sticky;
  top: calc(var(--header-h) + 2.5rem);
}
.services-intro .text-link { display: inline-block; margin-top: 1.75rem; }

.service-list { border-top: 1px solid var(--rule); }
.service {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
}
.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-top: .15rem;
  color: var(--maroon);
}
.service h3 {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
}
.service p {
  margin-top: .5rem;
  max-width: 36rem;
  color: var(--muted);
}

/* ---------- Process ---------- */
.process { background: var(--mist); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 2.75rem;
}
/* connecting rule between steps */
.step::before {
  content: "";
  position: absolute;
  top: 1rem;
  inset-inline: 2.5rem -2rem;
  height: 1px;
  background: var(--steel);
  opacity: .5;
}
.step:last-child::before { display: none; }
.step-num {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-family: "Marcellus", serif;
  font-size: 1rem;
  color: #fff;
  background: var(--maroon);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); /* diamond, like the logo ornament */
}
.step h3 {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
}
.step p {
  margin-top: .6rem;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.about-media {
  position: relative;
}
.about-media::before {
  /* offset steel frame, a nod to the grey stroke in the logo */
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  z-index: -1;
}
[dir="rtl"] .about-media::before { inset: 1.25rem 1.25rem -1.25rem -1.25rem; }
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.about-copy p {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--muted);
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.facts dt {
  font-size: var(--step--1);
  color: var(--muted);
}
.facts dd {
  margin-top: .3rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--wine);
  background-image: radial-gradient(ellipse at 0% 0%, var(--wine-2) 0%, transparent 60%);
  color: #fff;
}
.contact .section-title { color: #fff; }
.contact .section-lead { color: rgba(255,255,255,.75); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-list .icon { color: var(--brass); margin-top: .2rem; }
.contact-list div { display: flex; flex-direction: column; }
.contact-label {
  font-size: var(--step--1);
  color: rgba(255,255,255,.6);
}
.contact-list a {
  font-size: var(--step-1);
  text-decoration: none;
}
.contact-list a:hover { text-decoration: underline; text-underline-offset: .25em; }

.quote-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-size: .95rem;
  font-weight: 500;
}
.optional { color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1px solid #cfcacc;
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: #9a9396; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(110,20,35,.15);
}
.field input[aria-invalid="true"] { border-color: #b3261e; }
.form-error {
  padding: .7rem .9rem;
  border-inline-start: 3px solid #b3261e;
  background: #fbeceb;
  color: #7d1a14;
  font-size: .95rem;
}
.form-error[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-copy { color: var(--muted); font-size: var(--step--1); }
.site-footer .brand-mark { height: 40px; }
.site-footer .brand-name { font-size: 1.35rem; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f9d55;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
  transition: transform .25s, opacity .25s, visibility .25s, background-color .2s;
}
.wa-float:hover { background: #17864a; transform: translateY(-2px); }
/* Hidden while the hero (which has its own WhatsApp button) is on screen */
.wa-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 1.4rem; }
  .brand-tag { display: none; }
}

@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .header-actions { margin-inline-start: auto; }

  .services-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .services-intro { position: static; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.75rem; }
  .step:nth-child(2)::before { display: none; }

  .about-media { margin-inline-end: 1.25rem; }
}

@media (max-width: 600px) {
  :root { --header-h: 68px; }
  .brand-mark { height: 40px; }
  .brand-name { font-size: 1.35rem; }
  .brand-text { padding-inline-start: .7rem; }

  .hero-inner { gap: 3rem; padding-block: 3.5rem 2rem; }
  .hero-actions .btn { flex: 1 1 100%; }

  .route { grid-template-columns: 1fr; gap: 1.25rem; padding-top: 0; padding-inline-start: 1.75rem; }
  .route::before {
    top: .35rem; bottom: .9rem;
    inset-inline: calc(var(--dot) / 2 - .5px) auto;
    width: 1px; height: auto;
    transform-origin: top center;
    animation-name: route-draw-y;
  }
  [dir="rtl"] .route::before { transform-origin: top center; }
  .route-dot { top: .4rem; inset-inline-start: -1.75rem; }

  .steps { grid-template-columns: 1fr; }
  .step::before { display: none; }

  .facts { grid-template-columns: 1fr; gap: 1rem; }
  .field-row { grid-template-columns: 1fr; }

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

@keyframes route-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
