/* Demo page styling — this is the HOST SITE, deliberately independent of the
   widget. It uses relative (rem) units so the font-size feature is visible. */

:root {
  --demo-fg: #1f2933;
  --demo-muted: #52606d;
  --demo-bg: #ffffff;
  --demo-surface: #f0f4f8;
  --demo-accent: #0b7285;
  --demo-border: #d9e2ec;
  --demo-maxw: 960px;

  /* ── Netigo Accessibility Widget: white-label colors (optional) ──
     These override the widget UI's look from the host page. Uncomment / edit
     to re-skin the widget. Full token list in src/ui/theme.css. */
  /*
  --na-theme-accent: #e2007a;
  --na-theme-accent-fg: #ffffff;
  --na-theme-accent-weak: #ffe3f1;
  --na-theme-focus: #ff8a00;
  --na-theme-radius: 10px;
  */
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--demo-fg);
  background: var(--demo-bg);
  line-height: 1.6;
}

.wrap {
  max-width: var(--demo-maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--demo-accent);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--demo-border);
  position: sticky;
  top: 0;
  background: var(--demo-bg);
  z-index: 10;
}
.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--demo-fg);
}
.brand span {
  color: var(--demo-accent);
}
.nav {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
}

/* Hero */
.hero {
  background: var(--demo-surface);
  padding: 4rem 0;
}
.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem;
  line-height: 1.2;
}
.lead {
  font-size: 1.25rem;
  color: var(--demo-muted);
  max-width: 46rem;
}
.hero__actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 3rem 0;
}
.section--muted {
  background: var(--demo-surface);
}
.section h2 {
  font-size: 1.9rem;
  margin-top: 0;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.card h3 {
  margin-top: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-family: system-ui, sans-serif;
  border: 1px solid var(--demo-accent);
  border-radius: 0.5rem;
  padding: 0.65rem 1.2rem;
  background: var(--demo-bg);
  color: var(--demo-accent);
  text-decoration: none;
  cursor: pointer;
}
.btn--primary {
  background: var(--demo-accent);
  color: #fff;
}

/* Form */
.form {
  display: grid;
  gap: 1.25rem;
  max-width: 32rem;
  font-family: system-ui, sans-serif;
}
.field {
  display: grid;
  gap: 0.4rem;
  border: 0;
  padding: 0;
  margin: 0;
}
.field legend {
  padding: 0;
  font-weight: 600;
}
label {
  font-weight: 600;
}
input[type="text"],
input[type="email"],
input[type="search"],
select,
textarea {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--demo-border);
  border-radius: 0.5rem;
  width: 100%;
}
textarea {
  resize: vertical;
}
.choice {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.25rem;
}
.form__actions {
  display: flex;
  gap: 0.75rem;
}

/* Accordion */
.accordion__item + .accordion__item {
  margin-top: 0.75rem;
}
.accordion__trigger {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 600;
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
}
.accordion h3 {
  margin: 0;
}
.accordion__panel {
  padding: 0.5rem 1rem 1rem;
}

/* Test guide */
.testguide {
  background: #0b3d5c;
  color: #fff;
}
.testguide a {
  color: #ffe08a;
}
.testguide h2 {
  margin-top: 0;
}
.testguide__grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.testguide__grid li {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

/* Blockquote */
blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--demo-accent);
  background: rgba(11, 114, 133, 0.06);
  font-style: italic;
}

/* Media */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.media-figure {
  margin: 0;
}
.media-figure img,
.media-el,
.bg-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.6rem;
  display: block;
}
.bg-image {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='260'%3E%3Cdefs%3E%3CradialGradient id='r' cx='0.3' cy='0.3'%3E%3Cstop offset='0' stop-color='%2334d399'/%3E%3Cstop offset='1' stop-color='%23065f46'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='400' height='260' fill='url(%23r)'/%3E%3Cpath d='M0 200 L120 120 L220 180 L320 90 L400 150 L400 260 L0 260 Z' fill='%23064e3b' opacity='0.7'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}
.media-figure figcaption {
  margin-top: 0.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--demo-muted);
}
.audio-row,
.animation-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.hint {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--demo-muted);
}

/* Animations (Test: reduce motion) */
.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(11, 114, 133, 0.3);
  border-top-color: var(--demo-accent);
  border-radius: 50%;
  animation: demo-spin 0.9s linear infinite;
}
.pulse {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--demo-accent);
  animation: demo-pulse 1.1s ease-in-out infinite;
}
.bar-anim {
  display: inline-block;
  width: 120px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--demo-accent), #34d399, var(--demo-accent));
  background-size: 200% 100%;
  animation: demo-slide 1.4s linear infinite;
}
@keyframes demo-spin {
  to { transform: rotate(360deg); }
}
@keyframes demo-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}
@keyframes demo-slide {
  to { background-position: 200% 0; }
}

/* Dynamically loaded content (AJAX/SPA demo) */
.dyn-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.dyn-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.dyn-block {
  animation: demo-fade-in 0.3s ease;
}
.dyn-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0.5rem 0;
}
.dyn-field {
  display: block;
  font-size: 0.95rem;
  color: var(--demo-muted);
}
.dyn-field input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--demo-border);
  border-radius: 6px;
  font: inherit;
}
@keyframes demo-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--demo-border);
  margin-top: 2rem;
}
