:root{
  /* Extended palette */
  --PageBackground:#EEECE9;   /* Alabaster */
  --BlockBackground:#99B3B7;  /* Pewter */
  --PrimaryAccent:#9D7960;    /* Bronze */
  --SecondaryAccent:#1B2824;  /* Obsidian */
  --MainText:#1B2824;         /* Obsidian */
  --SupportingText:#304E4D;   /* Slate */
  --OnDarkText:#EEECE9;       /* Alabaster */

  /* Theme (LIGHT page) */
  --bg: var(--PageBackground);
  --text: var(--MainText);
  --muted: rgba(48,78,77,.78);
  --card: rgba(255,255,255,.58);
  --card-strong: rgba(255,255,255,.72);
  --line: rgba(27,40,36,.14);

  --radius: 18px;
  --shadow: 0 18px 55px rgba(27,40,36,.12);
  --shadow-soft: 0 14px 40px rgba(27,40,36,.10);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 650px at 20% 8%, rgba(157,121,96,.16), transparent 60%),
    radial-gradient(900px 520px at 85% 28%, rgba(153,179,183,.18), transparent 55%),
    var(--bg);
  color:var(--text);
}

.wrap{
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 22px 56px;
}

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  flex-wrap:wrap;
  padding-bottom: 18px;
}

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

.logo-box{
  width:56px; height:56px;
  border-radius: 16px;
  background: rgba(27,40,36,1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 auto;
}
.logo-box img{
  width:100%; height:100%;
  object-fit:contain;
  padding: 9px;
  display:block;
}

.brand h1{
  margin:0;
  font-size:18px;
  line-height:1.2;
  letter-spacing: .2px;
}
.brand p{
  margin:4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-right{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

nav{
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  align-items:center;
}
nav a{
  color: var(--muted);
  text-decoration:none;
  font-size: 14px;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
nav a:hover{
  color: var(--text);
  border-bottom-color: rgba(27,40,36,.20);
}

/* Language switcher */
.lang{
  display:flex;
  gap: 8px;
  align-items:center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.46);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-soft);
}
.lang button{
  border:0;
  background: transparent;
  color: rgba(27,40,36,.70);
  font-weight: 800;
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .35px;
}
.lang button[aria-pressed="true"]{
  background: var(--SecondaryAccent);
  color: var(--OnDarkText);
}

/* Spacing helpers */
.section{ margin-top: 46px; }
.section-tight{ margin-top: 30px; }
.stack-12{ display:grid; gap:12px; }
.stack-18{ display:grid; gap:18px; }
.stack-26{ display:grid; gap:26px; }

.pill{
  display:inline-flex; gap:10px; align-items:center;
  padding:9px 13px;
  border:1px solid var(--line);
  border-radius:999px;
  color: rgba(27,40,36,.72);
  font-size:13px;
  width: fit-content;
  background: rgba(255,255,255,.44);
  box-shadow: var(--shadow-soft);
}
.dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--PrimaryAccent);
  box-shadow: 0 0 0 3px rgba(157,121,96,.18);
}

.hero{
  margin-top: 18px;
  padding: 18px 0 0;
}
.hero h2{
  margin:0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.6px;
  max-width: 18ch;
}
.hero p{
  margin:0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 78ch;
}

.btns{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 6px;
}
.btn{
  display:inline-block;
  text-decoration:none;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.52);
  box-shadow: var(--shadow-soft);
}
.btn.primary{
  background: var(--PrimaryAccent);
  color: var(--OnDarkText);
  border-color: rgba(157,121,96,.55);
}
.btn:hover{ transform: translateY(-1px); }

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items:start;
}
.col6{ grid-column: span 6; }
.col12{ grid-column: span 12; }

h3{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: .1px;
}
ul{
  margin: 10px 0 0 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.75;
}
.muted{ color: var(--muted); font-size: 13px; line-height:1.6; }

/* ---------- Carousel (fixed drift) ---------- */
.carousel{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.35);
  box-shadow: var(--shadow-soft);
}

.slides{
  display:flex;
  gap: 0;                /* prevent any spacing */
  width: 100%;
  transition: transform 420ms ease;
  will-change: transform;
  transform: translateX(0);
}

/* IMPORTANT: figure has default margins in browsers; remove them */
figure.slide{
  margin: 0;             /* fixes drifting */
  min-width: 100%;
  width: 100%;
  position: relative;
  aspect-ratio: 1024 / 559; /* matches your images; reduces perceived cropping */
  background: rgba(0,0,0,.08);
  flex: 0 0 100%;
}

.slide img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
  object-position: center; /* ensures true centering */
}

/* --- Proper RTL brand alignment --- */
/* --- RTL: put brand content on the right, and logo to the right of the name --- */
html[dir="rtl"] header{
  flex-direction: row-reverse;     /* brand on the right, top-right tools on the left */
}

html[dir="rtl"] .brand{
  flex-direction: row-reverse;     /* logo appears to the right of the text block */
  justify-content: flex-start;
}

html[dir="rtl"] .brand > div{
  text-align: right;
}

/* --- RTL fix for carousel: keep slider mechanics LTR, captions RTL --- */
html[dir="rtl"] .carousel,
html[dir="rtl"] .slides{
  direction: ltr;
}

html[dir="rtl"] .caption{
  direction: rtl;
}

/* Keep captions readable regardless of light page theme */
.overlay{
  position:absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(27,40,36,.78) 0%,
      rgba(27,40,36,.20) 55%,
      rgba(27,40,36,.10) 100%
    );
}

.caption{
  position:absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
  color: var(--OnDarkText);
}
.cap-text{ max-width: 70ch; }
.cap-title{
  font-weight: 850;
  letter-spacing: .2px;
  margin: 0;
  font-size: 16px;
}
.cap-sub{
  margin: 6px 0 0;
  color: rgba(238,236,233,.82);
  font-size: 13px;
  line-height: 1.5;
}

.controls{
  position:absolute;
  top: 12px;
  right: 12px;
  display:flex;
  gap: 8px;
  z-index: 5;
}
.ctrl{
  border: 1px solid rgba(238,236,233,.28);
  background: rgba(27,40,36,.42);
  color: var(--OnDarkText);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
  cursor:pointer;
  user-select:none;
  backdrop-filter: blur(6px);
}
.ctrl:hover{ background: rgba(27,40,36,.56); }

.dots{
  display:flex;
  justify-content:center;
  gap: 8px;
  padding: 12px 0 0;
}
.dotbtn{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(27,40,36,.22);
  background: rgba(27,40,36,.10);
  cursor:pointer;
}
.dotbtn[aria-current="true"]{
  background: var(--PrimaryAccent);
  border-color: rgba(157,121,96,.60);
}

footer{
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid rgba(27,40,36,.14);
  color: var(--muted);
  font-size: 12px;
}

/* Language blocks */
[data-lang]{ display:none; }
[data-lang].active{ display:block; }

/* RTL adjustments */
html[dir="rtl"] body{ font-family: system-ui, "Tahoma", "Arial", sans-serif; }
html[dir="rtl"] nav{ flex-direction: row-reverse; }
html[dir="rtl"] .brand{ flex-direction: row-reverse; }
html[dir="rtl"] ul{ margin-left:0; margin-right:18px; }
html[dir="rtl"] .caption{ direction: rtl; }
html[dir="rtl"] .controls{ right:auto; left:12px; }

@media (max-width: 860px){
  .hero h2{ font-size: 36px; max-width: 22ch; }
  .wrap{ padding-top: 54px; }
}
@media (max-width: 760px){
  .grid{ gap: 16px; }
  .col6{ grid-column: span 12; }
  .top-right{ width:100%; justify-content:space-between; }
  .hero{ padding-top: 8px; }
}
