/* Buy domain name hero (task 18, design "Buy A3"): centred like /domain-registration, light pink, with
   the host's top 3 TLDs as price tags under the search bar and the next 4 as small tags around the
   title. Every text is 14px or bigger. */

.buy-hero {
  --buy-hero-bg: var(--pink-100);
  overflow: clip;
  background: var(--buy-hero-bg);
  color: var(--foreground);
  text-align: center;
}

.buy-hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 80px));
  margin: auto;
  padding-top: 60px;
}

.buy-hero-eyebrow {
  margin: 0 0 20px;
  font: 700 14px/1.5 var(--font-overpass);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.buy-hero h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(46px, 4.6vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.buy-hero-subtitle {
  max-width: 820px;
  margin: 18px auto 0;
  font: 400 29px/1.25 var(--font-uni-neue);
  text-wrap: balance;
}

.buy-hero-search {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 30px auto 0;
}

.buy-hero-search form {
  display: flex;
  align-items: stretch;
  padding: 7px;
  border: 2px solid var(--foreground);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 0 #1e1e411f;
}

.buy-hero-search form:focus-within {
  outline: 3px solid var(--foreground);
  outline-offset: 4px;
}

.buy-hero-search input {
  min-width: 0;
  flex: 1;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font: 600 20px/1.3 var(--font-uni-neue);
  text-align: left;
  outline: none;
}

.buy-hero-search input::placeholder {
  color: #69647c;
  opacity: 1;
}

.buy-hero-search button[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 25px;
  border: 0;
  border-radius: 7px;
  background: var(--foreground);
  color: #fff;
  font: 800 20px/1.3 var(--font-uni-neue);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s;
}

.buy-hero-search button[type='submit']:hover {
  background: var(--foreground-light);
}

.buy-hero-search button[type='submit']:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.buy-hero-search [data-icon] {
  font-size: 17px;
}

.buy-hero-search-hint {
  margin: 12px 0 0;
  font: 400 14px/1.6 var(--font-nunito);
}

.buy-hero-search-hint button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.buy-hero-search-hint button:hover {
  color: #a3154d;
}

.buy-hero-search-hint button:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 4px;
}

/* tag shapes: a stretched SVG outline with a hard shadow, and a punched hole */
.buy-hero-shape {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(5px 6px 0 var(--foreground));
}

.buy-hero-shape path {
  fill: var(--tag);
  stroke: var(--foreground);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.buy-hero-hole {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid var(--foreground);
  border-radius: 50%;
  background: var(--buy-hero-bg);
}

/* price tags */
/* One row: when the tags need more room than the row has, they get narrower and their texts wrap. */
.buy-hero-tags {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.buy-hero-tags li {
  min-width: 0;
}

.buy-hero-tags[hidden],
.buy-hero-tags li[hidden],
.buy-hero-minis[hidden],
.buy-hero-minis li[hidden] {
  display: none;
}

.buy-hero-tags li:nth-child(1) {
  --tag: rgb(var(--yellow));
}

.buy-hero-tags li:nth-child(2) {
  --tag: #fff;
}

.buy-hero-tags li:nth-child(3) {
  --tag: var(--blue);
}

.buy-hero-tag {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 250px;
  padding: 15px 20px 15px 52px;
  color: var(--foreground);
  text-align: left;
  text-decoration: none;
  transition: translate 0.2s;
}

.buy-hero-tag:hover {
  translate: 0 -4px;
}

.buy-hero-tag:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 6px;
}

.buy-hero-tag strong {
  font: 800 32px/1 var(--font-uni-neue);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.buy-hero-tag-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.buy-hero-first {
  font: 800 16px/1.3 var(--font-nunito);
  text-wrap: balance;
}

.buy-hero-renewal {
  font: 400 14px/1.35 var(--font-nunito);
  text-wrap: balance;
}

.buy-hero-vat {
  color: #4d4a60;
  font: 400 14px/1.35 var(--font-nunito);
}

.buy-hero-vat[hidden] {
  display: none;
}

/* small tags around the title */
.buy-hero-minis {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: min(1290px, calc(100vw - 60px));
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.buy-hero-minis li {
  position: absolute;
  animation: buy-hero-bob 5s ease-in-out infinite;
}

.buy-hero-minis li:nth-child(1) {
  top: 66px;
  left: 40px;
  --tag: var(--purple-200);
  --turn: -12deg;
}

.buy-hero-minis li:nth-child(2) {
  top: 56px;
  right: 30px;
  --tag: var(--green);
  --turn: 11deg;
  animation-duration: 5.4s;
  animation-delay: -1.8s;
}

.buy-hero-minis li:nth-child(3) {
  top: 222px;
  left: 4px;
  --tag: rgb(var(--yellow));
  --turn: 8deg;
  animation-duration: 5.8s;
  animation-delay: -3.1s;
}

.buy-hero-minis li:nth-child(4) {
  top: 214px;
  right: 0;
  --tag: var(--orange);
  --turn: -9deg;
  animation-duration: 5.2s;
  animation-delay: -2.5s;
}

.buy-hero-minis li:has(a:hover),
.buy-hero-minis li:focus-within {
  animation-play-state: paused;
}

.buy-hero-mini {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 118px;
  padding: 44px 20px 20px;
  color: var(--foreground);
  text-decoration: none;
  rotate: var(--turn);
  pointer-events: auto;
  transition:
    rotate 0.24s,
    scale 0.24s;
}

.buy-hero-mini:hover,
.buy-hero-mini:focus-visible {
  rotate: 0deg;
  scale: 1.07;
}

.buy-hero-mini:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 6px;
}

.buy-hero-mini .buy-hero-hole {
  top: 19px;
  left: 50%;
  margin: 0 0 0 -7px;
}

.buy-hero-mini strong {
  font: 800 32px/1 var(--font-uni-neue);
  white-space: nowrap;
}

/* features */
.buy-hero-features {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
  margin: 46px 0 0;
  padding: 24px 0 28px;
  border-top: 1px solid #1e1e4129;
  list-style: none;
}

.buy-hero-features li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font: 700 17px/1.35 var(--font-uni-neue);
  text-align: left;
}

.buy-hero-features svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes buy-hero-bob {
  0%,
  100% {
    translate: -3px 6px;
  }
  50% {
    translate: 5px -10px;
  }
}

@media (max-width: 1300px) {
  .buy-hero-minis {
    width: calc(100vw - 60px);
  }
  .buy-hero-minis li:nth-child(1) {
    left: 6px;
  }
  .buy-hero-minis li:nth-child(2) {
    right: 0;
  }
  .buy-hero-minis li:nth-child(3) {
    left: -14px;
  }
  .buy-hero-minis li:nth-child(4) {
    right: -16px;
  }
  .buy-hero-mini {
    min-width: 104px;
  }
  .buy-hero-mini strong {
    font-size: 27px;
  }
}

@media (max-width: 1180px) {
  /* Three tags of equal width; the prices sit under the TLD. */
  .buy-hero-tags {
    gap: 16px;
  }
  .buy-hero-tags li {
    flex: 1 1 0;
    min-width: 0;
    max-width: 330px;
  }
  .buy-hero-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: 100%;
    min-width: 0;
    padding: 16px 16px 16px 48px;
  }
  .buy-hero-tag strong {
    font-size: 30px;
  }
  .buy-hero-first {
    font-size: 15px;
  }
  .buy-hero-minis {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 24px;
    width: 100%;
    height: auto;
    margin: 30px 0 0;
    transform: none;
  }
  .buy-hero-minis li:nth-child(n) {
    position: relative;
    inset: auto;
  }
  .buy-hero-minis li:nth-child(n + 4) {
    display: none;
  }
  .buy-hero-mini {
    padding: 38px 16px 16px;
  }
}

@media (max-width: 900px) {
  .buy-hero-features {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .buy-hero-features li {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .buy-hero-tags {
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
  }
  .buy-hero-tags li {
    flex: none;
    max-width: none;
  }
  /* The TLD and the prices sit side by side; the prices move under the TLD when a long TLD
     leaves them too little room. */
  .buy-hero-tag {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    height: auto;
    padding: 14px 18px 14px 56px;
  }
  .buy-hero-tag strong {
    min-width: 84px;
    font-size: 30px;
  }
  .buy-hero-tag-text {
    flex: 1 1 170px;
  }
  .buy-hero-tag .buy-hero-hole {
    left: 23px;
  }
  .buy-hero-minis {
    gap: 12px;
    margin-top: 26px;
  }
  .buy-hero-mini {
    min-width: 0;
    padding: 34px 13px 13px;
  }
  .buy-hero-mini strong {
    font-size: 24px;
  }
  .buy-hero-mini .buy-hero-hole {
    top: 15px;
  }
}

@media (max-width: 650px) {
  .buy-hero-inner {
    width: calc(100% - 40px);
    padding-top: 38px;
  }
  .buy-hero-eyebrow {
    margin-bottom: 16px;
  }
  .buy-hero h1 {
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.08;
  }
  .buy-hero-subtitle {
    margin-top: 14px;
    font-size: 22px;
    line-height: 1.3;
  }
  .buy-hero-search {
    margin-top: 24px;
  }
  .buy-hero-search form {
    padding: 6px;
  }
  .buy-hero-search input {
    padding: 12px 8px;
    font-size: 16px;
  }
  .buy-hero-search button[type='submit'] {
    gap: 10px;
    padding: 12px 15px;
    font-size: 16px;
  }
  .buy-hero-tag {
    padding-right: 14px;
  }
  .buy-hero-tag strong {
    font-size: 27px;
  }
  .buy-hero-first {
    font-size: 15px;
  }
  .buy-hero-features {
    margin-top: 34px;
    padding-block: 22px;
  }
  .buy-hero-features li {
    font-size: 16px;
  }
}

@media (max-width: 359px) {
  .buy-hero-tag {
    padding-left: 50px;
  }
  .buy-hero-tag strong {
    min-width: 70px;
    font-size: 23px;
  }
  .buy-hero-tag .buy-hero-hole {
    left: 20px;
  }
  .buy-hero-search input {
    font-size: 15px;
  }
  .buy-hero-search button[type='submit'] {
    padding-inline: 12px;
  }
}

/* Small phones: the long placeholders (de "Finde deinen Domainnamen", pl, fr) fit at 14px. */
@media (max-width: 420px) {
  .buy-hero-search input {
    padding-inline: 4px;
    text-overflow: ellipsis;
  }
  .buy-hero-search input::placeholder {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buy-hero-minis li {
    animation: none;
  }
  .buy-hero-tag,
  .buy-hero-mini,
  .buy-hero-search button[type='submit'] {
    transition: none;
  }
  .buy-hero-tag:hover {
    translate: none;
  }
}
