/* ==========================================================================
   Templates section — CSS lifted verbatim from
   docs/research/css/index.f9761eab.pretty.css (selectors: .headline*,
   .templates*, .template-carousel*, .paging-indicator*, .loader*, .controls*,
   .ai-dots*). Source breakpoints only: 375 / 600 / 744 / 1020 / 1280 / 1440.
   ========================================================================== */

/* --------------------------------------------------------- headline (shared) */
.headline {
  padding: 80px var(--grid-gutter-width) 64px;
}
@media (width >= 1020px) {
  .headline {
    grid-template-columns: repeat(2, calc((var(--grid-column-width) * 6) + (var(--grid-gutter-width) * 5)));
    gap: 0 var(--grid-gutter-width);
    grid-template-rows: auto 1fr;
    align-items: flex-start;
    display: grid;
  }
}
@media (width >= 1280px) {
  .headline {
    padding: 120px var(--grid-gutter-width) 80px;
  }
}
.headline--no-padding-top { padding-top: 0; }

.headline__title {
  max-width: calc((var(--grid-column-width) * 11) + (var(--grid-gutter-width) * 10));
  text-wrap: balance;
}
@media (width >= 375px) {
  .headline__title { max-width: calc((var(--grid-column-width) * 10) + (var(--grid-gutter-width) * 9)); }
}
@media (width >= 744px) {
  .headline__title { max-width: calc((var(--grid-column-width) * 8) + (var(--grid-gutter-width) * 7)); }
}
@media (width >= 1020px) {
  .headline__title {
    max-width: calc((var(--grid-column-width) * 5) + (var(--grid-gutter-width) * 4));
    grid-row: 1 / 3;
  }
}

.headline__cta-container { width: 100%; margin-top: 40px; }
@media (width >= 1020px) {
  .headline__cta-container { grid-column: 2; }
  .headline__cta-container:nth-child(2) {
    grid-row: 1 / 3;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
    margin-top: 0;
    display: flex;
  }
}
.headline__cta { text-align: center; width: 100%; }
@media (width >= 744px) {
  .headline__cta { width: auto; }
}

/* ------------------------------------------------------- templates headline
   `.headline` is declared in more than one stylesheet (see ui/bento.css) and
   its >=1280 shorthand `padding: 120px … 80px` carries a padding-bottom. At
   equal specificity that shorthand wins or loses purely on CSS-chunk order, so
   the `.templates__headline` overrides are scoped to `#templates` to pin the
   cascade the way the source resolves it: 40px / 80px (>=744) / 120px (>=1280).
   The source sheet declares the >=1280 value twice (40px then 120px); the
   later block wins, so 120px is the effective value. */
#templates .templates__headline {
  background-color: var(--bordeaux);
  padding-bottom: 40px;
}
@media (width >= 744px) {
  #templates .templates__headline { padding-bottom: 80px; }
}
@media (width >= 1280px) {
  #templates .templates__headline { padding-bottom: 120px; }
}
.templates__headline-title {
  text-align: center;
  margin: 0 auto;
  text-wrap: auto;
}
@media (width >= 744px) {
  .templates__headline-title { text-align: left; margin-left: 0; }
}
.templates__headline-cta { display: none; }
@media (width >= 744px) {
  .templates__headline-cta { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .templates__headline-cta .cta--secondary {
    transition:
      color .2s cubic-bezier(.645, .045, .355, 1),
      background-color .2s cubic-bezier(.645, .045, .355, 1),
      box-shadow .2s cubic-bezier(.645, .045, .355, 1);
  }
}

.templates__icon-box {
  width: 22px;
  height: 1em;
  margin-right: 12px;
  display: inline-block;
  position: relative;
}
/* The source's `top: -2px` was an optical nudge tuned to Clarkson's cap
   height. Under Neue Haas Unica the glyph measured 2px below the label's
   centre, so this is re-tuned by measurement to sit dead-centre. */
.templates__icon { width: 22px; height: 22px; position: absolute; top: -4px; left: 0; }

/* ------------------------------------------------------------------ ai-dots */
.ai-dots {
  --defaultTransform: scale(1) translate(0%, 0%);
  --defaultTiming: 14s;
  aspect-ratio: 1;
  width: 22px;
  animation: 14s cubic-bezier(.645, .045, .355, 1) infinite rotateAnimation;
  position: relative;
}
@media (prefers-reduced-motion: reduce) { .ai-dots { animation: none; } }
.ai-dots__dot {
  background: var(--primitive-black);
  transform-origin: 50%;
  border-radius: 100%;
  position: absolute;
}
@media (prefers-reduced-motion: no-preference) {
  .ai-dots__dot { transition: background-color .2s cubic-bezier(.645, .045, .355, 1); }
}
.ai-dots__dot--large {
  width: 59.5%; height: 59.5%;
  animation: scaleAnimationLarge var(--defaultTiming) linear infinite;
  top: 4%; left: 0;
}
.ai-dots__dot--medium {
  width: 38.13%; height: 38.13%;
  animation: scaleAnimationMedium var(--defaultTiming) linear infinite;
  top: 40%; right: 0;
}
.ai-dots__dot--small {
  width: 24%; height: 24%;
  animation: scaleAnimationSmall var(--defaultTiming) linear infinite;
  bottom: 6%; left: 30%;
}
@media (prefers-reduced-motion: reduce) { .ai-dots__dot { animation: none; } }

@keyframes rotateAnimation {
  0%   { transform: rotate(0); }
  22%  { transform: rotate(240deg); }
  44%  { transform: rotate(480deg); }
  66%  { transform: rotate(720deg); }
  to   { transform: rotate(720deg); }
}
@keyframes scaleAnimationLarge {
  0%   { transform: var(--defaultTransform); }
  11%  { transform: scale(.403) translate(-20%, -30%); }
  22%  { transform: scale(.403) translate(-20%, -30%); }
  33%  { transform: scale(.64) translate(40%, -45%); }
  44%  { transform: scale(.64) translate(40%, -45%); }
  55%  { transform: var(--defaultTransform); }
  to   { transform: var(--defaultTransform); }
}
@keyframes scaleAnimationMedium {
  0%   { transform: var(--defaultTransform); }
  11%  { transform: scale(1.56) translate(-10%, -33%); }
  22%  { transform: scale(1.56) translate(-10%, -33%); }
  33%  { transform: scale(.63) translate(10%, -85%); }
  44%  { transform: scale(.63) translate(10%, -85%); }
  55%  { transform: var(--defaultTransform); }
  to   { transform: var(--defaultTransform); }
}
@keyframes scaleAnimationSmall {
  0%   { transform: var(--defaultTransform); }
  11%  { transform: scale(1.59) translate(-45%, -30%); }
  22%  { transform: scale(1.59) translate(-45%, -30%); }
  33%  { transform: scale(2.48) translate(5%, -15%); }
  44%  { transform: scale(2.48) translate(5%, -15%); }
  55%  { transform: var(--defaultTransform); }
  to   { transform: var(--defaultTransform); }
}

/* --------------------------------------------------------- templates shell */
.templates {
  background-color: var(--bordeaux);
  padding: 80px 0;
}
@media (width >= 1280px) {
  .templates { padding: 120px 0; }
}
.templates--no-padding-top { padding-top: 0; }

/* ---------------------------------------------------------- paging indicator */
.paging-indicator {
  --paging-indicator-background-color: #0000000d;
  --paging-indicator-dot-color: #00000069;
  --paging-indicator-progress-color: var(--primitive-black);
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: flex;
}
.paging-indicator--is-light {
  --paging-indicator-background-color: #fff3;
  --paging-indicator-dot-color: #ffffff59;
  --paging-indicator-progress-color: var(--primitive-white);
}
.paging-indicator__dot {
  --paging-indicator-dot-width: 4px;
  --paging-indicator-dot-height: 4px;
  width: var(--paging-indicator-dot-width);
  height: var(--paging-indicator-dot-height);
  background-color: var(--paging-indicator-dot-color);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .paging-indicator__dot { width: 4px; height: 4px; }
}
.paging-indicator__dot-progress {
  width: var(--indicator-progress);
  background-color: var(--paging-indicator-progress-color);
  border-radius: 3px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
@media (prefers-reduced-motion: reduce) {
  .paging-indicator__dot-progress { width: 100%; }
}

/* -------------------------------------------------------- mobile carousel */
.templates__mobile { overflow: hidden; }
@media (width >= 744px) {
  .templates__mobile { display: none; }
}
.templates__mobile-carousel-wrapper {
  --available-height: calc(var(--inner-height) - var(--global-nav-height));
  --container-aspect-ratio: 1.8;
  --container-width: calc((var(--grid-column-width) * 6) + (var(--grid-gutter-width) * 7));
  --container-height: min(calc(var(--container-aspect-ratio) * var(--container-width)), var(--available-height));
  width: 100%;
  height: var(--container-height);
  position: relative;
}
@media (width >= 375px) {
  .templates__mobile-carousel-wrapper { --container-aspect-ratio: 2; }
}
.templates__mobile-carousel-item {
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  display: flex;
  position: absolute;
  transition:
    left .5s cubic-bezier(.25, .46, .45, .94),
    right .5s cubic-bezier(.25, .46, .45, .94),
    transform .5s cubic-bezier(.25, .46, .45, .94),
    opacity .5s cubic-bezier(.25, .46, .45, .94);
}
.templates__mobile-carousel-item--is-active { z-index: 1; }
.templates__mobile-carousel-item-content {
  width: var(--container-width);
  height: var(--container-height);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 16px #0000001a;
}
/* Source art was a full-page 640x2338 screenshot, so `contain` filled the very
   tall (1:2) mobile card. Vitoria's frames are 2:3 / 3:2, so they are covered
   instead. Paint-only: the card's own width/height are unchanged and it already
   clips with `overflow: hidden`. */
.templates__mobile-carousel-image {
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.templates__mobile-carousel-item-touch-area {
  width: calc((var(--grid-column-width) * 3) + (var(--grid-gutter-width) * 3));
  background-color: #0000;
  height: 100%;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}
.templates__mobile-carousel-item-touch-area--right { left: auto; right: 0; }
.templates__mobile-carousel-item-touch-area--is-visible { display: block; }

.templates__mobile-chrome-wrapper {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  display: flex;
}
.templates__mobile-carousel-paging-indicator { margin: 40px 0; }
.templates__mobile-cta-container {
  width: 100%;
  padding: 0 var(--grid-gutter-width);
  justify-content: center;
  display: flex;
}
.templates__mobile-cta {
  text-align: center;
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .templates__mobile-carousel-item { transition: none; }
}

/* ------------------------------------------------------------------ loader */
.loader {
  flex-direction: column;
  align-items: center;
  display: flex;
}
.loader__square {
  background-color: var(--primitive-black);
  width: 24px;
  height: 24px;
  transform-style: preserve-3d;
  animation-name: flip;
  animation-duration: 1.6s;
  animation-timing-function: cubic-bezier(.66, 0, .34, 1);
  animation-iteration-count: infinite;
}
.loader__text { margin-top: 16px; }
@keyframes flip {
  0%    { transform: rotateY(0); }
  12.5% { transform: rotateY(0); }
  50%   { transform: rotateY(180deg); }
  62.5% { transform: rotateY(180deg); }
  to    { transform: rotate(180deg); }
}

/* ---------------------------------------------------------------- controls */
.play-icon { fill: none; color: var(--primitive-black); }
.controls {
  cursor: pointer;
  background: #0000004d;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  display: flex;
  overflow: hidden;
}
.controls--has-blur { backdrop-filter: blur(25px); }
.controls__button-svg { stroke: none; fill: none; }

/* --------------------------------------------------------- desktop carousel */
.templates__template-carousel {
  --card-width: calc((var(--grid-column-width) * 5) + (var(--grid-gutter-width) * 4));
  --card-aspect-ratio: 16 / 10;
  --card-height: calc(var(--card-width) / (var(--card-aspect-ratio)));
  flex-direction: column;
  gap: 32px;
  width: 100%;
  display: none;
  position: relative;
  overflow: hidden;
}
@media (width >= 744px) {
  .templates__template-carousel { display: flex; }
}
@media (width >= 1020px) {
  .templates__template-carousel {
    --card-width: calc((var(--grid-column-width) * 4) + (var(--grid-gutter-width) * 3));
  }
}
.templates__template-carousel-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.templates__template-carousel-loader--is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.templates__template-carousel-cards {
  width: calc(2 * var(--card-width) + calc(var(--grid-gutter-width) * 2));
  height: var(--card-height);
  margin-left: var(--grid-gutter-width);
  left: calc((var(--grid-column-width) * 1) + (var(--grid-gutter-width) * 1));
  display: flex;
  position: relative;
}
@media (width >= 1020px) {
  .templates__template-carousel-cards {
    left: calc((var(--grid-column-width) * 2) + (var(--grid-gutter-width) * 2));
  }
}
.templates__template-carousel-slide {
  width: calc(2 * var(--card-width) + calc(var(--grid-gutter-width) * 2));
  justify-content: flex-start;
  align-items: center;
  gap: var(--grid-gutter-width);
  display: flex;
  position: absolute;
}
/* The track holds every slide; stepping translates it by one card + gutter. */
.templates__template-carousel-track {
  --step: calc(var(--card-width) + var(--grid-gutter-width));
  align-items: center;
  gap: var(--grid-gutter-width);
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: translate3d(calc(var(--track-offset) * var(--step) * -1), 0, 0);
  transition: transform .5s cubic-bezier(.25, .46, .45, .94);
}
.templates__template-carousel-track--no-transition { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .templates__template-carousel-track { transition: none; }
}

.template-carousel__thumbnail {
  width: var(--card-width);
  height: var(--card-height);
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  flex-shrink: 0;
  transition: box-shadow .5s cubic-bezier(.25, .46, .45, .94);
  display: block;
  position: relative;
  overflow: hidden;
}
.template-carousel__thumbnail:hover,
.template-carousel__thumbnail:focus {
  box-shadow: 0 39px 23px #0000000d, 0 17px 17px #00000017, 0 4px 9px #0000001a;
}
.template-carousel__thumbnail:hover .template-carousel__thumbnail-name,
.template-carousel__thumbnail:focus .template-carousel__thumbnail-name { opacity: 1; }
/* The source art was always 1500x2000 (3:4), which filled the 425x566 card at
   `height: auto`. Vitoria's picks are 2:3, 3:4 and two landscape frames, so the
   wrapper is pinned to the card and the image covers it. Paint-only: the
   wrapper is absolutely positioned inside a card with an explicit
   width/height and `overflow: hidden`, so nothing outside can be resized. */
.template-carousel__thumbnail-background-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.template-carousel__thumbnail-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.template-carousel__thumbnail-name {
  opacity: 0;
  background: #0000008a;
  transition: opacity .5s cubic-bezier(.25, .46, .45, .94);
  position: absolute;
  bottom: 12px;
  left: 12px;
  /* padding / radius not present in the source sheet — matched to `.feature-tag` */
  border-radius: 30px;
  margin: 0;
  padding: 8px 12px;
}

/* ------------------------------------------------------------------ toolbar */
.template-carousel__toolbar {
  width: 100%;
  padding: 0 var(--grid-gutter-width);
  visibility: hidden;
  justify-content: space-between;
  align-items: center;
  display: flex;
}
.template-carousel__toolbar--loaded { visibility: visible; }
.template-carousel__toolbar--blueprint { position: relative; }
.template-carousel__toolbar-controls-group {
  align-items: center;
  gap: 8px;
  display: flex;
}
.template-carousel__toolbar-controls {
  border: 1px solid var(--color-gray-200);
  background: #ffffff4d;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  padding: 10px 11px;
  overflow: hidden;
}
/* prev/next variant: the 16px chevron needs the padding released */
.template-carousel__toolbar-controls--step {
  padding: 0;
  justify-content: center;
  align-items: center;
  color: var(--primitive-black);
  display: flex;
  transition: opacity .15s cubic-bezier(.455, .03, .515, .955);
}
.template-carousel__toolbar-controls--prev { transform: rotate(90deg); }
.template-carousel__toolbar-controls--next { transform: rotate(-90deg); }

/* The toolbar sits on the bordeaux ground, so the two pills are drawn in the
   light palette: a white chevron behind a hairline, rather than the black one
   the rules above set for a white page. Same treatment `#tools` gives its own
   prev/next controls. */
#templates .template-carousel__toolbar-controls {
  border-color: color-mix(in srgb, var(--primitive-white) 30%, transparent);
  background: transparent;
}
#templates .template-carousel__toolbar-controls--step { color: var(--primitive-white); }
/* „Alle anzeigen" holds its text directly, with no `.text--light` span inside
   it to inherit from, so it is coloured here rather than by a class. */
#templates .template-carousel__cta { color: var(--primitive-white); }
.template-carousel__cta {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-transform: uppercase;
  font-family: "Neue Haas Unica", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}
