/* =========================================================
   1top.company — "Ras Al Khaimah" design system (v3, 2026-10)
   Warm sand + Al Hamra clay + Gulf sea. RTL first, mobile first.
   ========================================================= */

:root {
  --ink: #13232a;
  --ink-2: #2b3c43;
  --muted: #56646a;
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f3ebdf;
  --line: #e6dacb;
  --line-strong: #d4c3ad;
  --clay: #b4471f;
  --clay-ink: #8f3615;
  --clay-soft: #f6e3d8;
  --sea: #0e5e6f;
  --sea-soft: #dcecef;
  --palm: #1d7a4b;
  --palm-ink: #15603a;
  --amber-soft: #fbf0d9;
  --amber-ink: #7a5212;
  --focus: #0e5e6f;

  --font-display: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(19, 35, 42, .06), 0 2px 8px rgba(19, 35, 42, .05);
  --shadow-2: 0 2px 4px rgba(19, 35, 42, .06), 0 12px 32px rgba(19, 35, 42, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1ebe2; --ink-2: #d9d1c5; --muted: #a9b3b6;
    --bg: #0f191d; --surface: #152329; --surface-2: #1b2d34;
    --line: #26393f; --line-strong: #34494f;
    --clay: #e0784f; --clay-ink: #f09670; --clay-soft: #3a2219;
    --sea: #6cc0cf; --sea-soft: #16343b;
    --palm: #3fb47b; --palm-ink: #6fd29f;
    --amber-soft: #352a14; --amber-ink: #f0c879; --focus: #6cc0cf;
  }
}
:root[data-theme="dark"] {
  --ink: #f1ebe2; --ink-2: #d9d1c5; --muted: #a9b3b6;
  --bg: #0f191d; --surface: #152329; --surface-2: #1b2d34;
  --line: #26393f; --line-strong: #34494f;
  --clay: #e0784f; --clay-ink: #f09670; --clay-soft: #3a2219;
  --sea: #6cc0cf; --sea-soft: #16343b;
  --palm: #3fb47b; --palm-ink: #6fd29f;
  --amber-soft: #352a14; --amber-ink: #f0c879; --focus: #6cc0cf;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.7 var(--font-body);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 5.6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.85rem); }
h3 { font-size: 1.12rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
.latin { font-family: "IBM Plex Sans", var(--font-body); direction: ltr; unicode-bidi: isolate; }
p.latin { text-align: right; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 28px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- icons ---------- */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; color: var(--ink); font: 700 1.35rem/1 var(--font-display); }
.brand b { color: var(--clay); font-weight: 700; }
.brand small { font: 500 .78rem/1 var(--font-body); color: var(--muted); margin-inline-start: 8px; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 10px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; margin-inline-start: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; inset-inline: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 12px 16px; }
  .nav a { padding: 14px 12px; border-radius: 10px; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding-block: 14px 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--clay); text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 28px 30px; overflow: hidden; }
.hero::before {
  /* geometric 8-point star lattice, a nod to RAK mashrabiya work */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d9c6ad' stroke-width='1'%3E%3Cpath d='M28 6l6.4 15.6L50 28l-15.6 6.4L28 50l-6.4-15.6L6 28l15.6-6.4z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}
[data-theme="dark"] .hero::before { opacity: .12; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; color: var(--clay-ink); background: var(--clay-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { max-width: 22ch; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 64ch; margin-top: 14px; }
.ridge { display: block; width: 100%; height: 26px; color: var(--line-strong); margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; max-width: 760px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.stat b { display: block; font: 700 1.5rem/1.2 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- search + filters ---------- */
.finder { position: sticky; top: 64px; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-block: 1px solid var(--line); padding-block: 12px; }
.finder .row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .finder .row { grid-template-columns: 1fr 220px; } }
.field { position: relative; }
.field .i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input, .select {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; padding: 10px 14px;
}
.input { padding-inline-start: 42px; }
.input:focus, .select:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px var(--sea-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 500 .92rem/1 var(--font-body);
  cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chip small { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .8; }
.result-line { margin-top: 10px; font-size: .9rem; color: var(--muted); min-height: 1.4em; }

/* ---------- sections & cards ---------- */
.section { padding-block: 34px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-head .count { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-intro { color: var(--muted); margin-bottom: 18px; max-width: 70ch; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag.clay { background: var(--clay-soft); color: var(--clay-ink); }
.tag.sea { background: var(--sea-soft); color: var(--sea); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.card h3 a:hover { color: var(--clay); }
.card .en { font-size: .88rem; color: var(--muted); margin-top: -6px; }
.card .meta { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.card .actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.card .src { position: relative; z-index: 1; font-size: .76rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; border: 1px solid transparent; font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-call { background: var(--ink); color: var(--bg); }
.btn-call:hover { background: var(--ink-2); color: var(--bg); }
.btn-wa { background: var(--palm); color: #fff; }
.btn-wa:hover { background: var(--palm-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 54px; padding: 14px 22px; font-size: 1.05rem; border-radius: 14px; }
.btn .num { font-family: "IBM Plex Sans", var(--font-body); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.card .actions .btn { flex: 1; }

.empty { display: none; text-align: center; padding: 40px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.is-filtering .empty.show { display: block; }
.hidden-by-filter { display: none !important; }

/* ---------- info panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel h2 { font-size: 1.3rem; margin-bottom: 10px; }
.panel ul { margin: 0; padding-inline-start: 1.2em; }
.panel li { margin-bottom: 6px; }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; } }
.cta-band { background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta-band h2 { color: var(--bg); font-size: 1.35rem; }
.cta-band p { color: color-mix(in srgb, var(--bg) 78%, transparent); margin: 6px 0 0; }
.cta-band .btn-ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 45%, transparent); }
.cta-band .btn-ghost:hover { border-color: var(--bg); }
.area-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.area-list a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .92rem; }
.area-list a:hover { background: var(--clay-soft); color: var(--clay-ink); }
.area-list small { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- shop profile ---------- */
.profile { display: grid; gap: 18px; grid-template-columns: 1fr; padding-block: 18px 34px; }
@media (min-width: 960px) { .profile { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.p-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden; }
.p-head { border-top: 4px solid var(--clay); }
.p-head h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); position: relative; }
.p-head .en { font-size: 1.05rem; color: var(--muted); margin-top: 4px; }
.p-head .desc { margin-top: 12px; color: var(--ink-2); }
.p-cta { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 560px) { .p-cta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-cta .btn { width: 100%; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); font-size: .92rem; padding-inline-end: 18px; white-space: nowrap; }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts dd .num { direction: ltr; unicode-bidi: isolate; font-family: "IBM Plex Sans", var(--font-body); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); color: var(--amber-ink); border-radius: var(--r-md); padding: 14px 16px; font-size: .93rem; }
.note .i { margin-top: 3px; }
.note p { margin: 0; }
.side { display: grid; gap: 16px; }
@media (min-width: 960px) { .side { position: sticky; top: 84px; } }
.side h2 { font-size: 1.15rem; margin-bottom: 8px; }
.links-col { list-style: none; margin: 0; padding: 0; }
.links-col li { border-bottom: 1px solid var(--line); }
.links-col li:last-child { border-bottom: 0; }
.links-col a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; text-decoration: none; color: var(--ink); }
.links-col a:hover { color: var(--clay); }

/* mobile sticky action bar (shop page) */
.dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.dock .btn { flex: 1; }
@media (min-width: 960px) { .dock { display: none; } }
.has-dock { padding-bottom: 84px; }
@media (min-width: 960px) { .has-dock { padding-bottom: 0; } }

/* ---------- footer ---------- */
.foot { margin-top: 30px; border-top: 1px solid var(--line); background: var(--surface); padding-block: 34px 22px; font-size: .93rem; }
.foot .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot h3 { font-size: .95rem; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--clay); text-decoration: underline; }
.foot .fine { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s var(--ease) both; }
  .rise:nth-child(2) { animation-delay: .05s; } .rise:nth-child(3) { animation-delay: .1s; } .rise:nth-child(4) { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- area table (RAK hub) ---------- */
.area-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.area-table th, .area-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.area-table thead th { font-size: .88rem; color: var(--muted); font-weight: 600; }
.area-table tbody th { font-weight: 600; }
.area-table a { font-weight: 600; }
