/* GeoRestrict documentation — warm arctic palette, July 2026. */

:root {
  --paper: #fffaf0;
  --paper-deep: #f4ecdd;
  --surface: #ffffff;
  --ink: #17324d;
  --ink-soft: #52677a;
  --muted: #718296;
  --teal: #2e8b7d;
  --teal-soft: #d9f1eb;
  --coral: #d9574c;
  --coral-soft: #ffe1dc;
  --gold: #e8a526;
  --gold-soft: #fff0c8;
  --sky: #4f85b5;
  --sky-soft: #e0eef9;
  --berry: #7b5ea7;
  --border: #ded7c9;
  --shadow: 0 18px 50px rgba(23, 50, 77, 0.10);
  --shadow-small: 0 8px 24px rgba(23, 50, 77, 0.08);
  --sidebar-width: 286px;
  --content-max: 1080px;
  --radius: 22px;
  --radius-small: 13px;
  --fast: 160ms ease;
  --medium: 320ms cubic-bezier(.2, .8, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 180, 169, .24), transparent 22rem),
    radial-gradient(circle at 22% 90%, rgba(140, 213, 199, .20), transparent 24rem),
    var(--paper);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .32;
  pointer-events: none;
  background-image: radial-gradient(rgba(79, 133, 181, .28) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to left, #000, transparent 70%);
}

img { max-width: 100%; }

a {
  color: var(--teal);
  text-decoration-thickness: .09em;
  text-underline-offset: .18em;
  transition: color var(--fast);
}

a:hover { color: var(--coral); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

p { margin: 0 0 1.1rem; color: var(--ink-soft); }
strong { color: var(--ink); }
em { color: var(--berry); }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

h1 { margin: 0 0 .75rem; font-size: clamp(2.2rem, 5vw, 4.4rem); color: var(--ink); }
h2 { margin: 3.3rem 0 1rem; font-size: clamp(1.55rem, 3vw, 2.15rem); color: var(--teal); }
h3 { margin: 2.1rem 0 .65rem; font-size: 1.28rem; color: var(--ink); }
h4 { margin: 1.7rem 0 .45rem; font-size: 1.05rem; color: var(--coral); }

.content-inner > h2::before,
.changelog-version h2::before {
  content: "";
  display: inline-block;
  width: .55rem;
  height: 1.25rem;
  margin-right: .65rem;
  border-radius: 1rem;
  background: currentColor;
  transform: rotate(8deg);
}

.content-inner > h2:nth-of-type(4n + 2) { color: var(--coral); }
.content-inner > h2:nth-of-type(4n + 3) { color: var(--sky); }
.content-inner > h2:nth-of-type(4n + 4) { color: var(--berry); }

ul, ol { margin: .6rem 0 1.4rem 1.4rem; padding: 0; color: var(--ink-soft); }
li { margin: .4rem 0; padding-left: .25rem; }
li::marker { color: var(--coral); font-weight: 700; }

hr { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--border); }

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 20% 4%, rgba(140, 213, 199, .24), transparent 12rem),
    linear-gradient(165deg, #17324d 0%, #10263c 68%, #183c52 100%);
  border-right: 7px solid var(--gold);
  transition: transform var(--medium);
}

.sidebar-header { padding: 1.5rem 1.35rem 1.25rem; }

.sidebar-logo {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: .75rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

.sidebar-logo img {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.sidebar-logo span {
  color: #b9d5de;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: .55rem .8rem 1.25rem; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .72rem;
  margin: .25rem 0;
  padding: .72rem .82rem;
  color: #dce9ee;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .91rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--fast), transform var(--fast), border-color var(--fast);
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  transform: translateX(3px);
}

.sidebar-nav a.active {
  color: var(--ink);
  background: var(--gold-soft);
  border-color: rgba(242, 184, 75, .55);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .18);
}

.ui-icon { display: block; width: 1em; height: 1em; overflow: visible; }
.nav-icon { display: inline-grid; width: 1.35rem; place-items: center; color: var(--teal-soft); }
.nav-icon .ui-icon { width: 1.08rem; height: 1.08rem; }
.sidebar-nav a.active .nav-icon { color: var(--teal); }

.sidebar-footer {
  padding: 1.15rem 1.35rem 1.5rem;
  color: #b9d5de;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .76rem;
}

.sidebar-footer a { color: #fff; font-weight: 700; }

/* Main shell */
.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 4rem clamp(1.5rem, 5vw, 5.2rem) 6rem;
}

.content-inner { max-width: var(--content-max); margin: 0 auto; }

.page-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 2.4rem;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(23, 50, 77, .12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-small);
}

.page-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -4rem;
  bottom: -6.5rem;
  width: 17rem;
  height: 17rem;
  border: 3.5rem solid var(--teal-soft);
  border-radius: 50%;
}

.page-header h1 { display: flex; align-items: center; gap: .8rem; }
.page-header p { max-width: 48rem; margin: 0; font-size: 1.08rem; color: var(--ink-soft); }

.header-icon {
  display: inline-grid;
  width: 1.45em;
  height: 1.45em;
  flex: 0 0 auto;
  place-items: center;
  background: var(--gold-soft);
  border-radius: 40% 60% 55% 45%;
  color: var(--teal);
  font-size: .66em;
  transform: rotate(-4deg);
}
.header-icon .ui-icon { width: .92em; height: .92em; }

/* Home */
.brand-banner {
  display: block;
  width: 100%;
  margin-bottom: 2rem;
  background: var(--surface);
  border: 1px solid rgba(23, 50, 77, .12);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  margin: 2.25rem 0;
}

.home-intro h1 { font-size: clamp(2.3rem, 6vw, 4.8rem); }
.home-intro h1 span { color: var(--coral); }
.home-intro p { max-width: 45rem; font-size: 1.15rem; }

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1rem;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
}

.version-pill::before { content: ""; width: .55rem; height: .55rem; background: #fff; border-radius: 50%; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.3rem 0 0; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem 1.05rem;
  color: #fff;
  background: var(--ink);
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--shadow-small);
}
.button:hover { color: #fff; background: var(--coral); }
.button-secondary { color: var(--ink); background: var(--gold-soft); box-shadow: none; }
.button-secondary:hover { color: var(--ink); background: #f8d987; }

.feature-grid, .features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.75rem;
}

.feature-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  background: rgba(255, 255, 255, .84);
  border: 1px solid var(--border);
  border-top: 6px solid var(--teal);
  border-radius: 18px;
  box-shadow: var(--shadow-small);
  transition: transform var(--fast), box-shadow var(--fast);
}

.feature-card:nth-child(2), .feature-card:nth-child(6) { border-top-color: var(--coral); }
.feature-card:nth-child(3) { border-top-color: var(--gold); }
.feature-card:nth-child(4) { border-top-color: var(--sky); }
.feature-card:nth-child(5) { border-top-color: var(--berry); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { display: inline-grid; width: 2.7rem; height: 2.7rem; place-items: center; color: var(--teal); background: var(--paper-deep); border-radius: 12px; }
.feature-icon .ui-icon { width: 1.45rem; height: 1.45rem; }
.feature-card:nth-child(2) .feature-icon, .feature-card:nth-child(6) .feature-icon { color: var(--coral); }
.feature-card:nth-child(3) .feature-icon { color: #9b6d0a; }
.feature-card:nth-child(4) .feature-icon { color: #3f77a5; }
.feature-card:nth-child(5) .feature-icon { color: var(--berry); }
.feature-card h3 { margin: .95rem 0 .4rem; font-size: 1.08rem; }
.feature-card p { margin: 0; font-size: .91rem; line-height: 1.6; }

.connection-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
  counter-reset: flow;
}

.connection-step {
  position: relative;
  min-height: 10rem;
  padding: 1.4rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  counter-increment: flow;
}

.connection-step::before {
  content: counter(flow, decimal-leading-zero);
  display: block;
  margin-bottom: .65rem;
  color: var(--coral);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.connection-step strong { display: block; margin-bottom: .35rem; }
.connection-step p { margin: 0; font-size: .9rem; }

/* Alerts and cards */
.alert, .callout {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.2rem;
  color: var(--ink);
  border: 1px solid transparent;
  border-left-width: 7px;
  border-radius: var(--radius-small);
}
.alert p, .callout p { margin: 0; color: inherit; }
.alert-info, .callout-info { background: var(--sky-soft); border-color: var(--sky); }
.alert-warning, .callout-warning { background: var(--gold-soft); border-color: var(--gold); }
.callout-tip { background: var(--teal-soft); border-color: var(--teal); }

.glass-card {
  margin: 1.2rem 0;
  padding: 1.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-small);
}

/* Code */
code {
  padding: .13rem .38rem;
  color: #255e75;
  background: var(--sky-soft);
  border: 1px solid #c6deef;
  border-radius: 5px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: .86em;
}

.code-block-wrapper { position: relative; margin: 1rem 0 1.75rem; }
.code-label {
  display: inline-block;
  padding: .24rem .72rem;
  color: #fff;
  background: var(--teal);
  border-radius: 8px 8px 0 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

pre {
  margin: 0;
  padding: 1.35rem;
  overflow-x: auto;
  color: #edf7f7;
  background: var(--deep-ink, #10263c);
  border: 1px solid #284962;
  border-radius: 0 var(--radius-small) var(--radius-small) var(--radius-small);
  box-shadow: var(--shadow-small);
  font: .84rem/1.68 "Cascadia Code", Consolas, monospace;
}
pre code { padding: 0; color: inherit; background: none; border: 0; font: inherit; }

.copy-btn {
  position: absolute;
  top: 2.6rem;
  right: .65rem;
  padding: .38rem .7rem;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  cursor: pointer;
  font: 700 .72rem "Segoe UI", sans-serif;
}
.copy-btn:hover, .copy-btn.copied { background: var(--teal); }

.syn-key, .syn-cmd { color: #8cd5c7; }
.syn-str { color: #f8d987; }
.syn-num, .syn-list { color: #ffb4a9; }
.syn-bool { color: #c9b3e6; }
.syn-cmt { color: #9fb4c2; font-style: italic; }
.syn-perm { color: #f2b84b; }
.syn-plh { color: #9cc8ed; }

/* Tables */
.table-wrapper { margin: 1.2rem 0 2rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-small); box-shadow: var(--shadow-small); }
table { width: 100%; border-collapse: collapse; background: rgba(255, 255, 255, .8); font-size: .88rem; }
th { padding: .85rem 1rem; color: #fff; background: var(--ink); text-align: left; white-space: nowrap; }
td { padding: .78rem 1rem; color: var(--ink-soft); border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--paper); }
tbody tr:hover { background: var(--teal-soft); }
tr:last-child td { border-bottom: 0; }

/* FAQ / troubleshooting accordions */
.faq-item { margin: .85rem 0; overflow: hidden; background: rgba(255, 255, 255, .86); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-small); }
.faq-item:nth-of-type(4n + 2) { border-left: 5px solid var(--coral); }
.faq-item:nth-of-type(4n + 3) { border-left: 5px solid var(--gold); }
.faq-item:nth-of-type(4n + 4) { border-left: 5px solid var(--sky); }

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: 750 1rem/1.35 "Segoe UI", sans-serif;
  text-align: left;
}
.faq-question:hover { background: var(--paper); }
.faq-question::after { content: "+"; color: var(--coral); font-size: 1.45rem; font-weight: 500; transition: transform var(--fast); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--medium), padding var(--medium); }
.faq-item.open .faq-answer { max-height: 70rem; padding: 0 1.25rem 1.15rem; }
.faq-answer p:last-child, .faq-answer ol:last-child, .faq-answer ul:last-child { margin-bottom: 0; }

/* Changelog */
.changelog-version { position: relative; margin: 1.2rem 0 2rem; padding: 1.5rem 1.55rem; background: rgba(255, 255, 255, .84); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-small); }
.changelog-version h2 { margin: 0 0 .25rem; color: var(--teal); }
.release-date { color: var(--muted); font-size: .85rem; font-weight: 700; }
.changelog-tag { display: inline-block; margin-left: .45rem; padding: .24rem .62rem; border-radius: 999px; font-size: .68rem; letter-spacing: .04em; vertical-align: middle; }
.tag-latest { color: #fff; background: var(--coral); }
.tag-major { color: #fff; background: var(--sky); }
.tag-initial { color: var(--ink); background: var(--gold-soft); }
.changelog-list { margin: .8rem 0 0; list-style: none; }
.changelog-list li { position: relative; padding-left: 1.25rem; }
.changelog-list li::before { content: ""; position: absolute; left: 0; top: .72rem; width: .48rem; height: .48rem; background: var(--teal); border-radius: 50%; }
.changelog-list .fixed::before { background: var(--coral); }
.changelog-list .changed::before, .changelog-list .improved::before { background: var(--sky); }
.changelog-list .removed::before { background: var(--gold); }

/* Animation and mobile menu */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity 520ms ease, transform 520ms ease; }
.fade-in.visible { opacity: 1; transform: none; }

.hamburger {
  display: none;
  position: fixed;
  top: .85rem;
  left: .85rem;
  z-index: 200;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 12px;
  cursor: pointer;
}
.hamburger span { display: block; width: 21px; height: 2px; margin: 4px auto; background: #fff; border-radius: 2px; transition: transform var(--fast), opacity var(--fast); }
.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(16, 38, 60, .58); backdrop-filter: blur(4px); }

@media (max-width: 980px) {
  .hamburger { display: block; }
  .sidebar { transform: translateX(-105%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0; padding-top: 5.3rem; }
}

@media (max-width: 760px) {
  .feature-grid, .features-grid, .connection-flow { grid-template-columns: 1fr; }
  .home-intro { grid-template-columns: 1fr; gap: .7rem; }
  .brand-banner { border-radius: 16px; }
  .main-content { padding-inline: 1rem; }
  .page-header { border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .fade-in { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; }
  body::before, .sidebar, .hamburger, .copy-btn { display: none !important; }
  .main-content { margin: 0; padding: 1rem; }
  .page-header, .feature-card, .faq-item, .changelog-version { box-shadow: none; }
  .fade-in { opacity: 1; transform: none; }
}
