/* Shared styles for cnrcode.com (Cloudflare Pages static site). */

:root {
  --bg: #0b1220;
  --bg2: #0f1b31;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.14);
  --brand: #62e7ff;
  --brand2: #7c5cff;
  --ok: #3ef4a2;
  --warn: #ffd36e;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 600px at 20% -10%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(98, 231, 255, 0.25), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-color: var(--bg2);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--line);
  transform: translateY(-200%);
  z-index: 999;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.6);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 0 4px rgba(98, 231, 255, 0.12);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid rgba(98, 231, 255, 0.7);
  padding-bottom: 3px;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-primary {
  border-color: rgba(98, 231, 255, 0.35);
  background: linear-gradient(135deg, rgba(98, 231, 255, 0.18), rgba(124, 92, 255, 0.14));
}

.hero {
  padding: 54px 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 26px;
  align-items: start;
}

.hero-grid-stack {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

h1,
h2,
h3 {
  margin: 0;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.06;
  letter-spacing: -0.5px;
  margin-top: 14px;
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: 34px;
  }
}

.lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
}

.panel h3 {
  font-size: 15px;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.panel ul {
  margin: 0;
  padding-left: 18px;
}

.panel li {
  color: var(--text);
  margin: 8px 0;
  line-height: 1.5;
}

.section {
  padding: 22px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 20px;
}

.section-title p {
  color: var(--muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(500px 240px at 20% 0%, rgba(98, 231, 255, 0.18), transparent 60%),
    radial-gradient(420px 240px at 90% 15%, rgba(124, 92, 255, 0.12), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
}

.card > * {
  position: relative;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card .card-links {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.feature h3 {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 8px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius);
}

.img-placeholder {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.portrait-9-16 {
  aspect-ratio: 9 / 16;
}

.two-up-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.two-up-grid > * {
  min-width: 0;
}

.gallery-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery-row-3 > * {
  min-width: 0;
}

.gallery-thumb {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.gallery-thumb:focus-visible {
  outline: 2px solid rgba(98, 231, 255, 0.7);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 18px;
}

.lightbox-overlay[data-open="true"] {
  display: flex;
}

.lightbox-dialog {
  width: 100%;
  max-width: 980px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 18, 32, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.lightbox-media {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.lightbox-media img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 12px;
}

.lightbox-controls .counter {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-close {
  margin-left: auto;
}

@media (max-width: 900px) {
  .gallery-row-3 {
    grid-template-columns: 1fr;
  }
}

.img-placeholder::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(90deg, transparent, rgba(98, 231, 255, 0.18), transparent);
  transform: rotate(18deg);
  opacity: 0;
  transition: opacity 160ms ease;
}

.img-placeholder:hover::after {
  opacity: 1;
}

.fixed-720-405 {
  max-width: 720px;
  height: 405px;
}

.fixed-900-506 {
  max-width: 900px;
  height: 506px;
}

.fixed-600-340 {
  max-width: 600px;
  height: 340px;
}

.fixed-640-360 {
  max-width: 640px;
  height: 360px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 22px 0 34px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.6;
}

/* Content pages */
.page {
  padding: 22px 0 10px;
}

.page h1 {
  font-size: 34px;
  margin-top: 12px;
  letter-spacing: -0.35px;
}

.breadcrumbs {
  margin: 6px 0 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.cta-band {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(98, 231, 255, 0.28);
  background: linear-gradient(135deg, rgba(98, 231, 255, 0.1), rgba(124, 92, 255, 0.07));
}

.quote {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 16px;
}

.quote blockquote {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  font-size: 15px;
}

.quote footer {
  border-top: 0;
  margin-top: 12px;
  padding-top: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.tagrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 999px;
}

.stub-note {
  border: 1px solid rgba(255, 211, 110, 0.35);
  background: rgba(255, 211, 110, 0.08);
  padding: 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.contact-email {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(98, 231, 255, 0.3);
  background: rgba(98, 231, 255, 0.08);
  font-weight: 800;
}

@media (max-width: 900px) {
  .container {
    padding: 0 14px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(11, 18, 32, 0.97);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    z-index: 30;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a[aria-current="page"] {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    background: rgba(98, 231, 255, 0.14);
  }

  .cards {
    gap: 12px;
  }

  .card {
    margin: 0 2px;
  }

  .hero {
    padding-top: 34px;
  }

  .page {
    padding-top: 30px;
  }

  .breadcrumbs {
    margin: 10px 0 16px;
  }

  .page h1 {
    margin-top: 8px;
    margin-bottom: 10px;
  }
}

