/* Custom properties */

:root {
  --ui-bg-primary: #fcfcfb;
  --ui-bg-gradient-end: #e7e7f0;
  --ui-bg-primary-gradient: linear-gradient(150deg, var(--ui-bg-primary) 0%, var(--ui-bg-gradient-end) 100%);
  --ui-bg-secondary: #f5f5f4;
  --ui-bg-bright: #ffffff;

  --text-primary: #18181b;


  --text-h1-size-min: 3rem;
  --text-h1-line-height-min: 1.2em;
  --text-h1-weight: 800;
  --text-h1-width: 100;
  --text-h1-YTLC: 500;

  --text-p-size-min: 1rem;
  --text-p-line-height-min: 1.4em;
  --text-p-weight: 400;
  --text-p-width: 100;
  --text-p-YTLC: 500;
}




.visually-hidden {
  clip: rect(0 0 0 0); /* Legacy support for older browsers */
  clip-path: inset(50%); /* Modern approach */
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Reset */

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* HTML elements */
body {
  background: var(--ui-bg-primary-gradient);
  color: var(--text-primary);
  font-family: "Nunito Sans", "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: var(--text-h1-size-min);
  line-height: var(--text-h1-line-height-min);
  font-weight: var(--text-h1-weight);
  margin: 0;
  padding: 0;
}

p {
  font-size: var(--text-p-size-min);
  line-height: var(--text-p-line-height-min);
  font-weight: var(--text-p-weight);
  margin: 0;
  padding: 0;
}

* + p {
  margin-top: 1rem;
}

figure {
  margin: 0;
  padding: 0;
}

* + figure {
  margin-top: 1rem;
}

img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typographic details */

blockquote {
  margin: 0;
  padding: 0
}

p + blockquote {
  margin-top: 1ch;
}

blockquote p {
  font-size: 2.75rem;
  font-weight: 250;
  font-style: italic;
  line-height: 1.15;
}

blockquote p::before {
  content: "“";
}

blockquote p::after {
  content: "”";
}

.demo-title {
  writing-mode: sideways-lr;
  color: hsla(0, 0%, 50%, 0.25);
  float: left;
  font-size: 8.5vh;
  font-stretch: 85%;
  font-weight: 925;
  position: fixed;
  z-index: -1;
}

/* Layout */

.content-layout__content {
  max-width: min(85ch, 90vw);
  margin: 0 auto;
  padding: 4rem 0;
}

.content-layout__cards {
  clear: both;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 94vw;
  margin-left: auto;
  margin-right: auto;
}

@media screen and (min-width: 38rem) {
  .content-layout__cards {
    grid-template-columns: 1fr 1fr;
    margin-left: -5vw;
    margin-right: -5vw;
  }
}

@media screen and (min-width: 75rem) {
  .content-layout__cards {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-left: -10vw;
    margin-right: -10vw;
  }
}

/* Components */

.buy-now {
  background-color: var(--ui-bg-bright);
  border-radius: 0.5rem;
  border: solid 1px var(--ui-bg-gradient-end);
  width: 10rem;
  float: right;
  margin-left: 1rem;
  margin-right: -5vw;
  padding: 1rem 0.75rem;
}

.buy-now h3 {
  line-height: 1.15;
  margin: 0;
}
.card {
  background-color: var(--ui-bg-bright);
  border-radius: 0.5rem;
  border: solid 1px var(--ui-bg-gradient-end);
  overflow: hidden;
  container-type: inline-size;
  display: grid;
  align-items: start;
}
.card__contents {
  display: grid;
  grid-auto-flow: row;
  gap: 1rem;
  height: 100%;
  align-items: start;
  grid-template-rows: max-content 1fr;
}
@container (min-width: 300px) {
  .card__contents {
    grid-auto-flow: column;
  }
}
.card__image {
  background-color: var(--ui-bg-secondary);
  overflow: hidden;
}
.card__image img {
  max-width: 100%;
  object-fit: contain;
}
.card__content {
  display: grid;
  height: 100%;
  justify-content: start;
  padding: .75rem;
}
.card__bottom-align {
  align-content: end;
  display: grid;
  grid-auto-flow: column;
  justify-content: space-between;
  padding-block-start: .75rem;
}
.card__title {
  margin: 0;
  padding: 0;
  line-height: 1.1;
  align-content: center;
}
.card__description {
  margin-top: 0;
}

.card__price {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
}

.card__button {
  text-indent: -999em;
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  border: solid 1px var(--ui-bg-gradient-end);
  background: var(--ui-bg-primary-gradient);
  display: flex;
  align-items: center;
  justify-items: center;
  padding: 0;
}

.card__button:after {
  content: '+';
  text-indent: 0;
  display: block;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.7rem;
  height: 2rem;
  width: 2rem;
  padding-left: 0.1rem;
}

figure:has(.image-shape-wrap) {
  margin-top: 0;
}

.image-shape-wrap {
  shape-image-threshold: .2; 
  shape-margin: 1.5em; 
  width: 32vw; 
  display: block; 
  margin-top: 2.5vh; 
  padding-bottom: 0.5em;
}
.image-shape-wrap.left {
  padding-right: 1vw; 
}
.image-shape-wrap.right {
  padding-left: 1vw; 
}
@media screen and (min-width: 28em) {
  .image-shape-wrap.left {
    float: left; 
  }
  .image-shape-wrap.right {
    float: right; 
  }
}
