/*
  Styles page (styles.html) and the teaser on the home page.
  Uses the tokens of docs.css; --a and --b are the two colors of each style,
  set inline on each section and only used for decoration (swatches, rules).
*/

.styles-page {
  max-width: none;
  padding-block: 2rem 4rem;
}

.styles-hero {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.styles-hero__kicker,
.style__kicker {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.styles-hero h1 {
  font-size: clamp(2.25rem, 7vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.styles-hero h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.style-chips {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.style-chips li,
.style__highlights li,
.included__grid li {
  margin: 0;
}

.style-chips a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--field);
  border-radius: 999px;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

.style-chips a:hover {
  background: var(--surface);
}

.style-chips a:focus-visible,
.styles-teaser a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 0 0 1px var(--field);
}

/* One style */

.style {
  display: grid;
  gap: 1.5rem;
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}

.style__shots {
  position: relative;
  padding: 0 16% 2rem 0;
}

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot--desktop {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border), 0 24px 48px -24px rgb(0 0 0 / 0.35);
  background: var(--surface);
}

.shot--desktop::before {
  /* Simple browser bar, drawn in CSS. */
  content: "";
  display: block;
  height: 22px;
  background:
    radial-gradient(circle at 12px 11px, var(--field) 4px, transparent 5px),
    radial-gradient(circle at 26px 11px, var(--field) 4px, transparent 5px),
    radial-gradient(circle at 40px 11px, var(--field) 4px, transparent 5px),
    var(--surface);
  border-bottom: 1px solid var(--border);
}

.shot--mobile {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 19%;
  max-width: 150px;
  border: 5px solid #111;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 40px -16px rgb(0 0 0 / 0.45);
  background: #111;
}

.style__text h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
}

.style__default {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--field);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.style__tagline {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.style__highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.style__kicker::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 0 0 1px var(--field);
  vertical-align: -0.05em;
}

.style__highlights li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.style__highlights li::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 0 3px var(--b);
}


.style__actions {
  margin: 1.75rem 0 0;
}

/* Demo video card: thumbnail and text, links to YouTube (no embedded player, keeps the page light). */

.style__video {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

.style__video:hover {
  border-color: var(--field);
}

.style__video:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.style__video-thumb {
  position: relative;
  display: block;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--border);
}

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

/* Play mark drawn in CSS: a disc in the style's dark color, a triangle in its light color. */
.style__video-thumb::before,
.style__video-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.style__video-thumb::before {
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 0 2px var(--b);
}

.style__video-thumb::after {
  width: 0.75rem;
  height: 0.875rem;
  margin: -0.4375rem 0 0 -0.25rem;
  background: var(--b);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.style__video-text {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.style__video-label {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
  font-weight: 600;
}

.style__video-title {
  font-weight: 600;
  line-height: 1.3;
}

.style__video-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.styles-cta__video {
  margin-top: 1rem;
}

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

@media (min-width: 900px) {
  .style {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    padding-block: 4.5rem;
  }

  .style--flip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  }

  .style--flip .style__shots {
    order: 2;
  }

  .style--flip .style__shots {
    padding: 0 0 2rem 16%;
  }

  .style--flip .shot--mobile {
    right: auto;
    left: 0;
  }
}

/* Included in every style */

.included {
  border-top: 1px solid var(--border);
  padding-block: 3rem;
}

.included h2,
.styles-cta h2 {
  border: 0;
  padding: 0;
  margin-top: 0;
}

.included__grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
}

.included__grid li {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  font-weight: 600;
}

.styles-cta {
  text-align: center;
  background: var(--surface);
  border-radius: 16px;
  padding: 2.5rem var(--gutter);
}

.styles-cta a.button {
  margin: 0.25rem;
}

a.button--ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--field);
}

a.button--ghost:hover {
  background: var(--bg);
}

/* Teaser on the home page */

.styles-teaser {
  margin: 1.5rem 0 2rem;
}

.styles-teaser a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
}

.styles-teaser img {
  display: block;
  width: 100%;
  height: auto;
}

.styles-teaser span {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--muted);
}

.styles-teaser strong {
  display: block;
  color: var(--fg);
}
