/**
 * Chi siamo: a letter from GoWeddy, why it exists, the couples who chose it, who it is for, what it
 * believes. The page language comes from product.css.
 */

/* ── Opening: an open envelope hangs past the end of the gold field, its letter already out ── */
.gw-cs-hero {
    --cs-overlap: 2.5rem;
    --field-inset: 0 0 var(--cs-overlap);
}
.gw-cs-hero__grid { grid-template-columns: minmax(0, 26rem) minmax(0, 27rem); }
.gw-cs-hero__copy { margin-bottom: calc(var(--cs-overlap) + 2.5rem); }

/* Everything is in cqi of the envelope's width (100cqi): the letter keeps its lines and its place
   at every width. The envelope is the bottom 53cqi; the letter stands 115cqi tall out of it. */
.gw-cs-letter { position: relative; align-self: end; aspect-ratio: 1 / 1.25; container-type: inline-size; }
.gw-cs-letter__shadow { position: absolute; inset: auto 4% -6%; height: 12%; border-radius: 50%; background: hsl(34 52% 20% / .25); filter: blur(18px); }
.gw-cs-letter__flap { position: absolute; inset: auto 0 53cqi; height: 45cqi; background: linear-gradient(hsl(38 45% 88%), hsl(36 40% 84%)); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.gw-cs-letter__back,
.gw-cs-letter__pocket { position: absolute; inset: auto 0 0; height: 53cqi; border-radius: 0 0 16px 16px; }
.gw-cs-letter__back { background: hsl(36 40% 84%); }
/* The V of the front: the letter stays readable above its sides and deepest in the middle. */
.gw-cs-letter__pocket {
    background: linear-gradient(170deg, hsl(38 48% 92%), hsl(36 42% 86%));
    box-shadow: 0 40px 70px -40px hsl(34 52% 20% / .55);
    clip-path: polygon(0 0, 50% 36%, 100% 0, 100% 100%, 0 100%);
}
/* Clips the letter at the bottom of the envelope, so it rises out of it and never shows below.
   It starts 3rem higher than the envelope only to leave room for the letter's shadow. */
.gw-cs-letter__slot { position: absolute; inset: -3rem 0 0; overflow: hidden; }
/* The letter rises folded in half, then its upper half opens towards the reader: the words on
   its face, the signature on the half that stays. --fold is where the crease runs. */
.gw-cs-letter__paper {
    --fold: 46cqi;
    position: absolute;
    top: 3rem;
    left: 11%;
    right: 11%;
    height: 115cqi;
    perspective: 1600px;
    font-family: 'Cormorant Garamond', serif;
    color: #3d2a20;
    animation: gw-cs-letter-out 1.3s cubic-bezier(.22, 1, .36, 1) .3s both;
}
@keyframes gw-cs-letter-out { from { transform: translateY(var(--letter-from, 75cqi)); } }
.gw-cs-letter__upper,
.gw-cs-letter__lower { position: absolute; left: 0; right: 0; }
.gw-cs-letter__upper {
    z-index: 1;
    top: 0;
    height: var(--fold);
    transform-origin: 50% 100%;
    transform-style: preserve-3d;
    animation: gw-cs-letter-unfold 1.1s cubic-bezier(.55, 0, .25, 1) 1.45s both;
}
@keyframes gw-cs-letter-unfold { from { transform: rotateX(-180deg); } }
.gw-cs-letter__face,
.gw-cs-letter__upper::after { position: absolute; inset: 0; border-radius: 6px 6px 0 0; backface-visibility: hidden; }
.gw-cs-letter__face { padding: 6.5cqi 5.8cqi 0; background: #fffdf9; }
/* The back of the folded half, the only side seen while the letter rises. */
.gw-cs-letter__upper::after { content: ''; background: linear-gradient(hsl(36 38% 90%), hsl(38 45% 95%)); transform: rotateX(180deg); }
.gw-cs-letter__lower {
    top: var(--fold);
    bottom: 0;
    padding-top: 6cqi;
    border-radius: 0 0 6px 6px;
    background: #fffdf9;
    box-shadow: inset 0 1px 0 hsl(34 28% 88%), 0 18px 40px -26px hsl(34 52% 20% / .45);
}
.gw-cs-letter__paper p { margin: 0 0 2cqi; font-size: 4.45cqi; line-height: 1.42; text-wrap: pretty; }
.gw-cs-letter__paper .gw-cs-letter__hello { margin-bottom: 1.6cqi; font-size: 5.55cqi; font-style: italic; font-weight: 600; color: hsl(var(--gw-wine)); }
.gw-cs-letter__paper .gw-cs-letter__sign { margin: 0; font-family: 'Great Vibes', cursive; font-size: 8.5cqi; line-height: 1; text-align: center; color: hsl(var(--gw-wine)); }
/* The photographed wax of the couples' envelopes, in the wine; the letter pressed into the same wax. */
.gw-cs-letter__seal {
    --wax: hsl(340 39% 46%);
    --wax-img: url(../img/intro/seal-wax.webp) center / contain no-repeat;
    position: absolute;
    bottom: calc(53cqi * .64);
    left: 50%;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 15.5cqi;
    height: 15.5cqi;
    padding-top: .5cqi;
    font-family: Georgia, serif;
    font-size: 7.4cqi;
    font-weight: 700;
    color: var(--wax);
    text-shadow: .03em .05em .03em rgb(0 0 0 / .45), -.02em -.03em .01em rgb(255 255 255 / .35);
    filter: drop-shadow(.4cqi .8cqi .9cqi hsl(34 52% 20% / .35));
    translate: -50% 50%;
}
.gw-cs-letter__seal::before,
.gw-cs-letter__seal::after {
    content: "";
    position: absolute;
    inset: -8%;
    z-index: -1;
}
.gw-cs-letter__seal::before { background: var(--wax); -webkit-mask: var(--wax-img); mask: var(--wax-img); }
.gw-cs-letter__seal::after { background: var(--wax-img); mix-blend-mode: hard-light; }

/* ── The couples: three real ones, the first in full height ── */
.gw-cs-mosaic { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .9rem; aspect-ratio: 1 / 1.05; }
.gw-cs-mosaic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.gw-cs-mosaic img:first-child { grid-row: span 2; }
.gw-cs-couples__cta { display: inline-block; }

/* ── Why: the reason beside its heading, then the numbers under a hairline ── */
.gw-cs-why__grid {
    display: grid;
    grid-template-columns: minmax(0, 24rem) minmax(0, 32rem);
    justify-content: center;
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
}
.gw-cs-why__head h2 { margin: .8rem 0 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12; text-wrap: balance; }
.gw-cs-why__head h2 em { font-style: italic; color: hsl(var(--gw-wine)); }
.gw-cs-why__text p { margin: 0 0 1.1rem; font-size: 1.02rem; line-height: 1.7; color: hsl(var(--gw-muted-fg)); }
.gw-cs-why__text p:last-child { margin-bottom: 0; }
.gw-cs-figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 60rem;
    margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
    padding: 0;
    border-top: 1px solid hsl(var(--gw-border));
    list-style: none;
}
.gw-cs-figures li { display: flex; flex-direction: column; gap: .45rem; padding: 1.5rem 1.25rem 0; }
.gw-cs-figures li + li { border-left: 1px solid hsl(var(--gw-border)); }
.gw-cs-figures b { font-family: var(--gw-font-serif); font-size: clamp(1.9rem, 3.2vw, 2.4rem); font-weight: 500; line-height: 1; color: hsl(var(--gw-wine)); }
.gw-cs-figures small { font-size: .5em; color: hsl(var(--gw-muted-fg)); }
.gw-cs-figures span { font-size: .88rem; line-height: 1.4; color: hsl(var(--gw-muted-fg)); }

/* ── Two worlds: the couple's tools in their own tints, the professionals' panel in Pro's ── */
.gw-cs-worlds__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.gw-cs-world { display: flex; flex-direction: column; padding: clamp(1.75rem, 3.5vw, 2.5rem); overflow: hidden; border-radius: 1.75rem; }
.gw-cs-world h3 { margin: 0 0 .6rem; font-family: var(--gw-font-serif); font-size: clamp(1.5rem, 2.4vw, 1.85rem); font-weight: 500; line-height: 1.2; color: hsl(var(--field-ink)); }
.gw-cs-world > p { max-width: 30rem; margin: 0 0 1.5rem; line-height: 1.6; color: hsl(var(--gw-fg) / .8); }
.gw-cs-tools,
.gw-cs-pro { margin: 0; padding: 0; list-style: none; }
.gw-cs-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.gw-cs-tools a,
.gw-cs-pro li { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem .6rem .6rem; border-radius: 1rem; background: hsl(0 0% 100% / .75); }
.gw-cs-tools a { height: 100%; font-size: .92rem; font-weight: 600; line-height: 1.25; text-decoration: none; color: hsl(var(--gw-fg)); transition: background .25s ease; }
.gw-cs-tools a:hover { background: #fff; }
.gw-cs-tools a:focus-visible { outline: 2px solid hsl(var(--gw-wine)); outline-offset: 2px; }
.gw-cs-tools__icon,
.gw-cs-pro li > i { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: hsl(var(--field-base)); color: hsl(var(--field-ink)); }
.gw-cs-tools__go { margin-left: auto; font-size: .9rem; color: hsl(var(--gw-muted-fg)); transition: transform .3s ease, color .3s ease; }
.gw-cs-tools a:hover .gw-cs-tools__go { color: hsl(var(--gw-wine)); transform: translateX(3px); }
.gw-cs-tools { margin-bottom: 1.75rem; }
.gw-cs-pro { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.75rem; }
.gw-cs-pro li { font-size: .88rem; line-height: 1.4; color: hsl(var(--gw-muted-fg)); }
.gw-cs-pro b { display: block; font-size: .95rem; font-weight: 600; color: hsl(var(--gw-fg)); }
.gw-cs-world__actions { align-self: flex-start; margin-top: auto; }
/* Half a row is narrower than the Home's band: a tighter padding keeps the two calls side by side, and the professionals'
   pair takes the whole width, half each; where both no longer fit, one under the other. */
@media (min-width: 576px) {
    .gw-cs-world__actions > a { padding-inline: .8rem; }
    .gw-cs-world__actions--half { align-self: stretch; gap: .6rem; }
    .gw-cs-world__actions--half > a { flex: 1 1 calc(50% - .3rem); min-width: max-content; }
}

/* ── Values: four facts, two by two ── */
.gw-cs-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; max-width: 52rem; margin: 0 auto; }
/* Who holds these values: their names above the photo that closes the band. */
.gw-cs-team { max-width: 38rem; margin: clamp(2.75rem, 5.5vw, 4rem) auto clamp(1.75rem, 3.5vw, 2.5rem); text-align: center; color: hsl(var(--gw-muted-fg)); }

/* Two panels side by side leave each tool a narrow cell: the name keeps the room of the arrow. */
@media (min-width: 992px) {
    .gw-cs-tools__go { display: none; }
}
@media (max-width: 991.98px) {
    .gw-cs-hero { --cs-overlap: 12rem; }
    .gw-cs-hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.25rem; }
    .gw-cs-hero__copy { margin-bottom: 0; }
    .gw-cs-letter { width: 100%; max-width: 30rem; justify-self: center; }
    .gw-cs-mosaic { max-width: 30rem; }
    .gw-cs-why__grid { grid-template-columns: minmax(0, 1fr); row-gap: 1.25rem; }
    .gw-cs-worlds__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    .gw-cs-hero { padding-bottom: 2.25rem; }
    .gw-cs-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gw-cs-figures li { padding: 1.25rem 1rem 1.25rem 0; }
    .gw-cs-figures li + li { border-left: 0; }
    .gw-cs-figures li:nth-child(even) { padding-left: 1rem; border-left: 1px solid hsl(var(--gw-border)); }
    .gw-cs-figures li:nth-child(n + 3) { border-top: 1px solid hsl(var(--gw-border)); }
    .gw-cs-values { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .gw-cs-team { margin-inline: 0; text-align: left; }
}
@media (max-width: 575.98px) {
    .gw-cs-hero__cta,
    .gw-cs-couples__cta { display: block; text-align: center; }
    .gw-cs-tools { grid-template-columns: minmax(0, 1fr); }
    .gw-cs-world__actions { align-self: stretch; flex-direction: column; }
    /* A phone gets a wider sheet and larger type; the envelope grows taller so the words stay above its front. */
    .gw-cs-letter { --letter-from: 82cqi; aspect-ratio: 1 / 1.32; }
    .gw-cs-letter__paper { --fold: 58cqi; left: 6%; right: 6%; height: 122cqi; }
    .gw-cs-letter__lower { padding-top: 5cqi; }
    .gw-cs-letter__paper p { font-size: 5.2cqi; }
    .gw-cs-letter__paper .gw-cs-letter__hello { font-size: 6.4cqi; }
    .gw-cs-letter__paper .gw-cs-letter__sign { font-size: 10cqi; }
}
@media (prefers-reduced-motion: reduce) {
    .gw-cs-letter__paper,
    .gw-cs-letter__upper { animation: none; }
    .gw-cs-tools a,
    .gw-cs-tools__go { transition: none; }
}
