/* Linkwing site styles. One file, no frameworks, system fonts only. */
:root {
  --sky-1: #1268F0;
  --sky-2: #3AC4FA;
  --bg: #FFFFFF;
  --bg-soft: #F3F8FF;
  --card: #FFFFFF;
  --text: #0E1726;
  --muted: #4A5568;
  --line: #DCE5F2;
  --link: #0B55CF;
  --accent: #1268F0;
  --code-bg: #EEF3FB;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 8px 24px rgba(18, 104, 240, .08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1120;
    --bg-soft: #0F192C;
    --card: #131F36;
    --text: #E9EFF8;
    --muted: #A9B6CA;
    --line: #243453;
    --link: #86BEFF;
    --accent: #5AA2FF;
    --code-bg: #1A2742;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Rounded", "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.skip {
  position: absolute; inset-inline-start: -999px; top: 8px;
  background: #fff; color: #0E1726; padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { inset-inline-start: 8px; }

/* ---------- Header / hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--sky-1) 0%, var(--sky-2) 100%);
  color: #fff;
}
.hero a { color: #fff; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.01em;
}
.brand { flex-shrink: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 18px; font-weight: 600; font-size: 15px; min-width: 0; }
.nav > a { text-decoration: none; opacity: .95; }
.nav > a:hover { text-decoration: underline; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); font-weight: 600;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 5;
  margin: 0; padding: 8px; list-style: none; min-width: 190px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.lang li a {
  display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); text-decoration: none;
}
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--bg-soft); }

.hero-grid {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center;
  padding-block: 36px 64px;
}
.hero h1 {
  font-family: "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-size: clamp(36px, 6vw, 60px); line-height: 1.05; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 14px;
}
.hero h1 .sub {
  display: block; font-size: .5em; font-weight: 700; opacity: .95; margin-top: 12px; letter-spacing: -.01em;
}
.lede { font-size: 19px; line-height: 1.55; margin: 0 0 26px; max-width: 40em; }
.hero .lede { color: #fff; }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #0B3E99 !important; text-decoration: none; font-weight: 800;
  padding: 14px 24px; border-radius: 999px; box-shadow: 0 6px 20px rgba(6, 40, 110, .25);
}
.cta:hover { transform: translateY(-1px); }
.cta svg { width: 20px; height: 20px; }
.cta-note { margin: 12px 0 0; font-size: 14px; opacity: .92; }

.hero-shot { justify-self: center; }
.phone {
  width: 100%; max-width: 280px; border-radius: 34px; display: block;
  background: rgba(255, 255, 255, .25);
  box-shadow: 0 20px 50px rgba(3, 30, 90, .35);
}

.hero.slim .hero-grid { grid-template-columns: 1fr; padding-block: 20px 44px; }
.hero.slim h1 { font-size: clamp(30px, 4.6vw, 46px); }

/* ---------- Content ---------- */
main { display: block; }
section { padding: 56px 0; }
section.soft { background: var(--bg-soft); }

h2 {
  font-family: "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.015em;
  margin: 0 0 16px;
}
h3 { font-size: 20px; line-height: 1.3; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-inline-start: 1.3em; }
li { margin: 4px 0; }

.muted { color: var(--muted); }

.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 22px 0 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px;
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 18px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.kavi-row { display: grid; grid-template-columns: 1fr 200px; gap: 28px; align-items: center; }
.kavi-row img { width: 200px; height: auto; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 18px;
  overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img {
  width: 100%; border-radius: 22px; border: 1px solid var(--line); background: var(--bg-soft); display: block;
}
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.shots figcaption b { color: var(--text); display: block; }

.table-wrap { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; background: var(--card); }
caption { text-align: start; padding: 12px 14px 4px; font-weight: 700; }
th, td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; }

code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 6px; }
pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 12px; overflow-x: auto; line-height: 1.5;
}
pre code { background: none; padding: 0; }

.note {
  border-inline-start: 4px solid var(--accent); background: var(--bg-soft);
  padding: 12px 16px; border-radius: 10px; margin: 18px 0;
}

.faq h3 { margin-top: 26px; }
.faq h3:first-of-type { margin-top: 8px; }

.guide-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.guide-list a.card { text-decoration: none; color: var(--text); display: block; }
.guide-list a.card:hover { border-color: var(--accent); }
.guide-list a.card span { color: var(--muted); font-size: 15px; display: block; margin-top: 6px; }

.crumbs { font-size: 14px; margin: 0 0 12px; opacity: .95; }
.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; opacity: .7; }

article.guide { padding: 44px 0 20px; }
article.guide h2 { margin-top: 40px; font-size: clamp(23px, 3vw, 28px); }
article.guide .meta { color: var(--muted); font-size: 15px; }

.cta-band { text-align: center; }
.cta-band .cta { background: linear-gradient(160deg, var(--sky-1), var(--sky-2)); color: #fff !important; }

.disclaimer { font-size: 14.5px; color: var(--muted); }

footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 15px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 0 0 14px; padding: 0; list-style: none; }
footer.site p { color: var(--muted); }

[dir="rtl"] body { font-family: -apple-system, "SF Arabic", "Geeza Pro", system-ui, sans-serif; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 48px; }
  .hero-shot .phone { max-width: 220px; }
  .kavi-row { grid-template-columns: 1fr; }
  .kavi-row img { width: 150px; }
  .nav > a.hide-sm { display: none; }
  .nav { gap: 12px; font-size: 14px; }
  section { padding: 44px 0; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 400px) {
  .brand { font-size: 18px; }
  .nav > a[href$="guides/"], .nav > a[href$="#faq"] { display: none; }
}
