*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

::selection {
    background: white
}

body {
    --white: #fff;
    --snow: color(display-p3 400% 400% 400%);
    
    font-family: Georgia;
    background: var(--white);
}
  
  
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    text-align: center;
    padding: 56px 48px;
    max-width: 800px;
    margin: 0 auto;
}

h1,
p,
a {
    background: var(--snow);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-wrap: balance;
}

h1 {
    font-size: 112px;
    font-weight: 700;
}

p,
a {
    font-size: 40px;
    line-height: 140%;
}

hr {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--snow) 50%,
        transparent 100%
    );
    border: none;
}

.colors {
    --red: color(display-p3 170% 110% 110%);
    --yellow: color(display-p3 170% 170% 110%);
    --green: color(display-p3 110% 170% 110%);
    --cyan: color(display-p3 110% 170% 170%);
    --blue: color(display-p3 110% 110% 170%);
    --pink: color(display-p3 170% 110% 170%);

    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    margin-top: 24px;
}

.colors:hover {
    --red: color(display-p3 170% 0% 0%);
    --yellow: color(display-p3 170% 170% 0%);
    --green: color(display-p3 0% 170% 0%);
    --cyan: color(display-p3 0% 170% 170%);
    --blue: color(display-p3 0% 0% 170%);
    --pink: color(display-p3 170% 0% 170%);
}

.colors * + * {
    margin-left: -12px;
}

.color {
    width: 56px;
    height: 56px;
    background: var(--snow);
    border-radius: 50%;
    border: 4px solid var(--white);
}

.red {
    background-color: var(--red);
}
.yellow {
    background-color: var(--yellow);
}
.green {
    background-color: var(--green);
}
.cyan {
    background-color: var(--cyan);
}
.blue {
    background-color: var(--blue);
}
.pink {
    background-color: var(--pink);
}

a {
    display: block;
    text-decoration: none;
    border: 4px solid var(--snow);
    border-radius: 16px;
    padding: 4px 16px;
}*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

::selection {
    background: white
}

body {
    --white: #fff;
    --snow: color(display-p3 400% 400% 400%);
    
    font-family: Georgia;
    background: var(--white);
}
  
  
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    text-align: center;
    padding: 56px 48px;
    max-width: 800px;
    margin: 0 auto;
}

h1,
p,
a {
    background: var(--snow);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-wrap: balance;
}

h1 {
    font-size: 112px;
    font-weight: 700;
}

p,
a {
    font-size: 40px;
    line-height: 140%;
}

hr {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--snow) 50%,
        transparent 100%
    );
    border: none;
}

.colors {
    --red: color(display-p3 170% 110% 110%);
    --yellow: color(display-p3 170% 170% 110%);
    --green: color(display-p3 110% 170% 110%);
    --cyan: color(display-p3 110% 170% 170%);
    --blue: color(display-p3 110% 110% 170%);
    --pink: color(display-p3 170% 110% 170%);

    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    margin-top: 24px;
}

.colors:hover {
    --red: color(display-p3 170% 0% 0%);
    --yellow: color(display-p3 170% 170% 0%);
    --green: color(display-p3 0% 170% 0%);
    --cyan: color(display-p3 0% 170% 170%);
    --blue: color(display-p3 0% 0% 170%);
    --pink: color(display-p3 170% 0% 170%);
}

.colors * + * {
    margin-left: -12px;
}

.color {
    width: 56px;
    height: 56px;
    background: var(--snow);
    border-radius: 50%;
    border: 4px solid var(--white);
}

.red {
    background-color: var(--red);
}
.yellow {
    background-color: var(--yellow);
}
.green {
    background-color: var(--green);
}
.cyan {
    background-color: var(--cyan);
}
.blue {
    background-color: var(--blue);
}
.pink {
    background-color: var(--pink);
}

a {
    display: block;
    text-decoration: none;
    border: 4px solid var(--snow);
    border-radius: 16px;
    padding: 4px 16px;
}

@media (dynamic-range: high) and (color-gamut: p3) {
  body {
    --snow: color(display-p3 400% 400% 400%);
  }
  .colors {
    --red: color(display-p3 220% 110% 110%);
    --yellow: color(display-p3 220% 220% 110%);
    --green: color(display-p3 110% 220% 110%);
    --cyan: color(display-p3 110% 220% 220%);
    --blue: color(display-p3 110% 110% 220%);
    --pink: color(display-p3 220% 110% 220%);
  }
  .colors:hover {
    --red: color(display-p3 220% 0% 0%);
    --yellow: color(display-p3 220% 220% 0%);
    --green: color(display-p3 0% 220% 0%);
    --cyan: color(display-p3 0% 220% 220%);
    --blue: color(display-p3 0% 0% 220%);
    --pink: color(display-p3 220% 0% 220%);
  }
}