/* Vikzaro Archive: additions on top of styles.css (sample document, decisions, tables, steps, form, screenshots) */

:root {
  --ok: #4cc38a;
  --ok-tint: rgba(76, 195, 138, 0.14);
  --wait: #f0b44c;
  --wait-tint: rgba(240, 180, 76, 0.14);
  --bad: #f07a7a;
  --bad-tint: rgba(240, 122, 122, 0.14);
}

:root[data-theme="light"] {
  --ok: #1b7a43;
  --ok-tint: #e3f4ea;
  --wait: #8a5a00;
  --wait-tint: #fff3d6;
  --bad: #a42828;
  --bad-tint: #fbe6e6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-product {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-strong);
}

.brand-product .brand-name {
  font-weight: 600;
  font-size: 1.02rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line-soft);
}

/* ----- Sample document (hero) ------------------------------------------ */
.sample {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-size: 0.9rem;
}

.sample-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.sample-head > div {
  min-width: 0;
}

.sample-head h2 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}

.sample-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill.wait { background: var(--wait-tint); color: var(--wait); }
.pill.ok { background: var(--ok-tint); color: var(--ok); }

.sample table {
  width: 100%;
  border-collapse: collapse;
}

.sample td {
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--muted);
}

.sample td.val {
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sample .total td {
  font-weight: 700;
  color: var(--text-strong);
  border-bottom: 0;
}

.decisions {
  padding: 0.9rem 1.25rem 1.1rem;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.decisions-label {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.decisions ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dec {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.dec.ok { border-color: var(--ok); color: var(--ok); }
.dec.warn { border-color: var(--wait); color: var(--wait); }
.dec.bad { border-color: var(--bad); color: var(--bad); }

.sample-note {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

/* ----- Steps: three or four per row ------------------------------------- */
.steps.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text-strong);
}

@media (max-width: 1000px) {
  .steps.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .steps.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .steps.four {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sample td,
  .sample-head,
  .decisions {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}

/* ----- Tables (decisions) ------------------------------------------------ */
.table-wrap {
  margin-top: 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table caption {
  text-align: left;
  padding: 1rem 1.2rem 0.4rem;
  font-weight: 600;
  color: var(--text-strong);
}

.data-table th,
.data-table td {
  padding: 0.75rem 1.2rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.data-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.data-table tbody th {
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  color: var(--muted);
}

.table-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 70ch;
}

@media (max-width: 620px) {
  .data-table tbody th {
    white-space: normal;
  }

  .data-table th,
  .data-table td {
    padding: 0.65rem 0.8rem;
  }

  /* the decisions as stacked rows on phones: decision, what happens, status */
  .decisions-table thead {
    display: none;
  }

  .decisions-table tr,
  .decisions-table th,
  .decisions-table td {
    display: block;
  }

  .decisions-table tbody tr {
    border-top: 1px solid var(--line);
    padding: 0.4rem 0 0.7rem;
  }

  .decisions-table tbody th,
  .decisions-table td {
    border-top: 0;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

  .decisions-table td.st {
    display: inline-block;
    margin-left: 0.8rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
  }
}

/* ----- Features in groups ------------------------------------------------ */
.feature-groups .card h3 {
  margin-bottom: 0.1rem;
}

@media (min-width: 621px) and (max-width: 900px) {
  .cards.three-cols.feature-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ----- Screenshots ------------------------------------------------------- */
.shots-desktop {
  display: grid;
  gap: 1.6rem;
}

.shots-phone {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 1.6rem;
  justify-content: center;
}

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (min-width: 901px) {
  .shots-desktop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shots-desktop .shot:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .shots-phone {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

/* ----- Demo form: two fields per row on wide screens ------------------- */
.demo-list {
  margin: 0 0 1.4rem;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

.contact-form .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.contact-form .pair > * {
  min-width: 0;
}

@media (max-width: 620px) {
  .contact-form .pair {
    grid-template-columns: 1fr;
  }
}

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.2rem 0 1rem;
}

.consent input {
  margin-top: 0.2rem;
}

.demo-signin {
  margin-top: 1.2rem;
  color: var(--muted);
}

.demo-signin a {
  color: var(--accent-ink);
  font-weight: 600;
}

/* Cloudflare Turnstile widget above the submit button */
.turnstile {
  margin: 0.25rem 0 1rem;
  min-height: 65px;
}

/* ----- Price line in the demo section ----------------------------------- */
.demo-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  margin: 0;
}

.demo-price strong {
  color: var(--text-strong);
  font-size: 1.15rem;
}

.demo-price span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ----- Presentation video (same as smarthome.vikzaro.com) ------------- */
.video-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.video-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  border: 0;
  background: rgba(10, 7, 4, 0.28);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background 0.18s ease;
}

.video-play:hover,
.video-play:focus-visible {
  background: rgba(10, 7, 4, 0.12);
}

.video-play:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: -3px;
}

.video-play-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  transition: transform 0.18s ease;
}

.video-play-icon::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 26px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--accent-contrast);
}

.video-play:hover .video-play-icon {
  transform: scale(1.06);
}

.video-play-label {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(10, 7, 4, 0.72);
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .video-play-icon { width: 64px; height: 64px; }
  .video-play-icon::after { left: 26px; top: 20px; border-width: 12px 0 12px 20px; }
}

/* ----- Header fit: the wider Vikzaro logo next to the long menu -------- */
@media (min-width: 1081px) {
  .site-header .brand-logo {
    height: 22px;
  }

  nav[aria-label="Principal"],
  .header-right {
    gap: 0.75rem;
  }
}

@media (min-width: 1081px) and (max-width: 1200px) {
  nav[aria-label="Principal"] {
    gap: 0.6rem;
  }

  nav[aria-label="Principal"] a {
    font-size: 0.8rem;
  }
}
