/* ==========================================================================
   Examples — "Przykładowe zastosowania"
   Illustrative scenarios, clearly labelled as examples. Each one runs from the
   situation, through the solution (marked with the spark — where the problem
   meets AI), to what could change.
   ========================================================================== */

/* Text on the left, the eye on the right — the eye never sits under text. */
.examples__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem clamp(2rem, 5vw, 5rem);
}

.examples__intro {
  max-width: 44rem;
}

/* ---- The eye ----------------------------------------------------------------------
   The footage is a white iris on black, like the wireframe hands of the hero. The
   circular mask fades the square frame into the page, so only the iris remains. */

.examples__eye {
  width: clamp(17rem, 9rem + 20vw, 30rem);
  aspect-ratio: 1;
  margin: 0;
}

.examples__eye-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 80%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 80%, transparent 100%);
}

.examples__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
}

/* Cards with a little depth: a surface that is lighter at the top, and a
   one-pixel highlight on the upper edge. */
.example {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--color-line-soft);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, var(--color-surface-2), var(--color-surface-1) 70%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07);
}

.example__label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.example__title {
  margin-top: 0.75rem;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  font-weight: 400;
  font-variation-settings: "opsz" 32;
  line-height: 1.2;
  text-wrap: balance;
}

/* ---- Situation -> solution -> change ---------------------------------------- */

.example__flow {
  margin-top: 2rem;
}

.example__step {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}

.example__step:last-child {
  padding-bottom: 0;
}

/* marker */
.example__step::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.55);
}

/* dotted thread to the next marker */
.example__step::after {
  content: "";
  position: absolute;
  top: 1.15rem;
  bottom: 0.35rem;
  left: 2px;
  width: 2px;
  background: radial-gradient(circle, rgb(255 255 255 / 0.4) 0 1px, transparent 1.4px) center top / 2px 10px repeat-y;
}

.example__step:last-child::after {
  display: none;
}

/* the solution is where the problem meets AI: the spark, in the accent colour */
.example__step--solution::before {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.example__step--solution dt {
  color: var(--color-accent);
}

.example__step dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--color-text-subtle);
}

.example__step dd {
  margin-top: 0.4rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}

.example__step--solution dd {
  color: var(--color-text);
}

/* ---- What happens by itself, and what a person decides ---------------------- */

.example__roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--color-line-soft);
  border-radius: 1rem;
  background: var(--color-line-soft);
}

.example__role {
  padding: 1rem 1.1rem 1.15rem;
  background: var(--color-surface-1);
}

.example__role dt {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--color-text-subtle);
}

/* the system: a ring; a person: a solid dot */
.example__role dt::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.example__role--auto dt::before {
  box-shadow: inset 0 0 0 1.5px var(--color-text-muted);
}

.example__role--human dt::before {
  background: var(--color-text);
}

.example__role dd {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.example__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 2rem;
}

.example__tags li {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* ---- Tablet and phone --------------------------------------------------------- */

@media (max-width: 1023.98px) {
  .examples__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* the eye opens the section, above the heading */
  .examples__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .examples__eye {
    order: -1;
    justify-self: center;
    width: min(24rem, 78vw);
  }
}

@media (max-width: 639.98px) {
  .example__roles {
    grid-template-columns: minmax(0, 1fr);
  }
}
