* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'PT Sans', sans-serif;
    font-size: 18px;
    color: #555;
    max-height: 100vh;
}

p {
    font-family: 'PT Sans', sans-serif;
    -webkit-margin-before: 0;
    -webkit-margin-after: 0;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    margin-top: .25em;
    margin-bottom: .75em;
    font-size: 20px;
}

h1,
h2,
h3,
h4 {
    font-family: 'PT Serif', serif;
    font-weight: 400;
    -webkit-margin-before: 0;
    -webkit-margin-after: 0;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    padding: 0;
    line-height: 1em;
}

h2,
h3,
h4 {
    margin-top: .25em;
    color: #666;
}

h1 {
    font-size: 39px;
    color: #E67700;
}

h2 {
    font-size: 34px;
}

h3 {
    font-size: 30px;
}

h4 {
    font-size: 26px;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(136, 166, 72, 0.5);
}

a:not(header a):hover,
a:not(header a):focus {
    color: #E67700;
}

main em {
    font-family: 'PT serif', serif;
    font-weight: bold;
    white-space: nowrap;
    color: #777;
}

.button-link {
    text-decoration: none;
    padding: 0.5em 2ch 0.6em;
    display: inline-block;
    border: 2px solid currentColor;
    color: #4b864b;
    line-height: 1;
    border-radius: 1em;
    transition: .125s color ease-in-out;
    margin-left: -.125ch;
    font-size: 25px;
    margin-top: .5rem;
}

.button-link:hover,
.button-link:focus {
    color: #E67700;
}


/*--------------------------------------------------------
	IMAGES, Objects
--------------------------------------------------------*/

ul {
    -webkit-margin-before: 0;
    -webkit-margin-after: 0;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    -webkit-padding-start: 0;
}

li {
    list-style: none;
}


/*--------------------------------------------------------
						HEADER
--------------------------------------------------------*/

header {
    width: calc(100% - 60px);
    height: 85px;
    background: white;
    position: fixed;
    top: 0;
    padding: 15px 0;
    left: 30px;
    right: 30px;
    z-index: 10;
    max-width: 1300px;
    margin-right: auto;
    margin-left: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px 20px;
}

header::after {
    /*header background to cover up masked icons*/
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: -1;
}

#back-to-top {
    text-decoration: none;
}

#logo-column svg {
    position: relative;
    bottom: -1px;
    /*Adjust centering optically*/
    max-width: 100%;
}


/* Navigation */

#top-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    text-align: right;
    color: #999;
}

#top-menu li {
    position: relative;
    z-index: 2;
}

#top-menu li::after {
    /*Covers up the slight gap that text shows through between list items during animations*/
    content: '';
    background: white;
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: -5px;
    right: -10px;
    z-index: -1;
}

#top-menu li:nth-child(2)::after {
    left: 0;
}

#top-menu li:first-child {
    z-index: 1;
    right: -6em;
    transition: right var(--beat);
}

#top-menu li:first-child a {
    color: #888;
}

[class*="section-"]:not(.section-1) #top-menu>li:first-child {
    right: 0;
}

#top-menu a {
    text-decoration: none;
}

#top-menu svg * {
    transition: .25s ease-out fill;
}

#next-button {
    background: none;
    border: 0;
    height: 0;
    opacity: 0;
    position: fixed;
    z-index: 98;
    left: calc(50% - (36.92px / 2));
    bottom: 12.5vh;
    cursor: pointer;
}

html:not(.start) #next-button {
    /* If animation is cancelled or doesn't load */
    opacity: 1;
}

#next-button:focus {
    outline: none;
}

.next-arrow {
    /*Hide button until triggered*/
    transition: calc(var(--beat) * 1)transform;
}

.next-arrow polyline {
    fill: none;
    stroke: #9ccc33;
    stroke-miterlimit: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 10;
    transition: stroke var(--beat);
}

#next-button:is(:hover, :focus) polyline {
    stroke: #E67700;
}

.section-7 .next-arrow {
    transform: rotate(180deg);
}

@media (max-width: 700px) {
    header {
        padding: 10px 15px;
        left: 0;
        right: 0;
        height: unset;
        margin: unset;
        width: 100%;
        flex-wrap: wrap;
    }
    .home-link svg {
        /* width: 180px; */
    }
    .back-to {
        display: none;
    }
}

@media (max-width: 650px) {
    #top-menu li:first-child {
        display: none;
    }
}

@media (max-width: 550px) {
    header {
        justify-content: center;
    }
    .back-to {
        display: none;
    }
    #top-menu {
        transform: scale(.8);
        gap:
    }
}


/*--------------------------------------------------------
					Index / Main Body
--------------------------------------------------------*/

main {
    height: calc(100vh - 85px);
    height: 100vh;
    overflow: hidden auto;
    scroll-snap-type: y mandatory;
    padding: 0 30px;
}

section {
    height: inherit;
    scroll-snap-align: start;
    display: grid;
    position: relative;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: auto;
    max-width: 1300px;
}


/*--------------------------------------------------------
					Landing Section
--------------------------------------------------------*/

#landing-section h1,
#service-list {
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    top: -5.5vh;
    /*Adjust centering optically*/
}

#landing-section h1 {
    z-index: 1;
    justify-self: flex-end;
}

#service-list {
    overflow: clip;
}

#service-list li {
    font-size: clamp(20px, 3vh, 28px);
    line-height: 1;
    padding: .25em 0;
    transform: translateX(-100%);
    transition: calc(var(--beat) / 2) transform ease-in-out;
    color: white;
    /* Hide list items when page loads */
}

html:not(.start) #service-list li {
    /* If animation doesn't load or is cancelled, reset this */
    transform: unset;
    color: #555;
}

#service-list a {
    text-decoration: none;
    letter-spacing: -.03em;
}

#service-list label {
    cursor: pointer;
}

#services h1 {
    text-align: right;
}


/*--------------------------------------------------------
					Products Sections
--------------------------------------------------------*/

.product-logo,
.description {
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    top: -20px;
    /*Adjust centering optically*/
    font-size: 30px;
}

.product-logo {
    display: grid;
    grid-template-columns: 2fr auto 1fr;
}

.product-logo a {
    grid-column: 2;
}

.product-logo svg {
    max-width: 100%;
}

.description p {
    font-size: clamp(20px, calc(4vh - 5px), 33px);
    line-height: 1.3em;
    letter-spacing: -.0125ch;
    font-family: 'PT Serif', serif;
    color: #666;
    width: clamp(385px, 30vw, 576px);
}


/*--------------------------------------------------------
		Service, Support, About Sections
--------------------------------------------------------*/

.description {
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    top: -20px;
    /*Adjust centering optically*/
}

#sales-section {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#support-section form,
#sales-section form {
    margin-top: auto;
    margin-bottom: auto;
}

#contact-sales {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
    grid-gap: 20px 30px;
}

#contact-sales h1 {
    margin-bottom: .5rem;
}

#contact-sales h1,
#contact-sales .contact-radio,
#contact-sales .radio-inputs,
#contact-sales textarea[name="message"] {
    grid-column: span 2;
}

#contact-sales input[type="text"],
#contact-sales input[type="tel"],
#contact-sales input[type="email"],
#contact-sales input[type="url"],
#contact-sales select,
textarea[name="message"] {
    min-height: 44px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    color: #666;
    padding: 5px;
    box-sizing: border-box;
    font-family: 'pt sans', sans-serif;
    font-size: 16px;
    transition: .25s all;
}

#contact-sales input[type="text"]:active,
#contact-sales input[type="tel"]:active,
#contact-sales input[type="email"]:active,
#contact-sales input[type="url"]:active,
#contact-sales select:active,
textarea[name="message"]:active,
#contact-sales input[type="text"]:focus,
#contact-sales input[type="tel"]:focus,
#contact-sales input[type="email"]:focus,
#contact-sales input[type="url"]:focus,
#contact-sales select:focus,
textarea[name="message"]:focus {
    color: #333;
    border: 1px solid #aaa;
    outline: none;
    box-shadow: 1.79px 2.69px 10px rgba(0, 0, 0, 0.1);
    filter: progid: DXImageTransform.Microsoft.dropshadow(OffX=1.79, OffY=2.69, Color='#000000');
}

#contact-sales select {
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}


/*vvv Adds browser-agnostic down arrow vvv*/

#contact-sales .select-arrow {
    position: relative;
    font-size: 12px;
}

#contact-sales .select-arrow:after {
    content: '\25bc';
    z-index: 2;
    position: absolute;
    right: 5px;
    color: #777;
    top: 12px;
    pointer-events: none;
}


/*^^^ End browser-agnostic down arrow ^^^*/

.multiple-choice {
    display: inline-flex;
    align-items: center;
    position: relative;
    bottom: -2px;
}

.multiple-choice label {
    font-size: 16px;
    margin-right: 2ch;
}

textarea[name="message"] {
    min-height: 140px;
    resize: none;
}

#contact-sales [type="submit"] {
    grid-column: 1/-1;
    display: block;
    border: 1px solid #cccccc;
    border-radius: 5px;
    color: #666;
    padding: 5px;
    box-sizing: border-box;
    font-family: 'pt sans', sans-serif;
    font-size: 16px;
    width: fit-content;
}

@media (max-width: 767px) {
    #contact-sales {
        grid-gap: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    }
}

@media (max-width: 500px) {
    #contact-sales {
        grid-gap: 5px 15px;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
}


/* Support Section */

.youtube-pitch {
    font-size: 14px;
    line-height: 16px;
    max-width: 209px;
    display: block;
    position: relative;
    left: -10px;
    /*Compensates for ragged right edge in center alignment*/
    margin: 0 auto;
}

.youtube-pitch {
    justify-self: center;
    margin: 0;
}

#support-section svg {
    -ms-transform: scale(2);
    -webkit-transform: scale(2);
    transform: scale(2);
    margin-right: 7px;
    vertical-align: top;
    float: left;
    margin-right: 1em;
}

#support-section .youtube-icon .background {
    display: none;
}

#support-section .youtube-icon .lozenge {
    fill: #e62d27;
}


/* About Section */

#about-section article {
    margin: auto;
    max-width: 1110px;
    line-height: 1.35em;
    column-count: auto;
    column-gap: 3ch;
    column-width: 36ch;
    position: relative;
    grid-column: 1/-1;
}

#about-section article h1 {
    margin-bottom: 3vh;
    column-span: all;
}

#about-section article h1 {
    margin-bottom: 3vh;
    column-span: all;
}

#about-section .call-to-action {
    padding-top: 5vh;
    column-span: all;
    display: block;
}

#about-section .call-to-action em {
    font-size: 1.4em;
    letter-spacing: -.025ch;
    color: #777;
    font-weight: normal;
}

#about-section img[src="images/cv-portrait.jpg"] {
    float: left;
    display: inline-block;
    border-radius: 50%;
    max-height: 140px;
    margin-top: 1em;
    shape-outside: circle(50%);
    left: -1em;
    top: -1em;
    position: relative;
}


/*--------------------------------------------------------

--------------------------------------------------------*/

@media (max-width: 900px) {
    section {
        margin: unset;
        display: flex;
        flex-direction: column;
        gap: 9px;
    }
    .description,
    #support-section form,
    #sales-section form,
    #landing-section h1,
    #service-list,
    .product-logo,
    .description {
        margin-top: unset;
        margin-bottom: unset;
        top: unset;
    }
    section>:first-child {
        margin-top: auto !important;
    }
    section>:last-child {
        margin-bottom: auto !important;
    }
    .product-logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .description p {
        width: unset;
    }
    #sales-section form {
        margin-bottom: auto !important;
    }
    #about-section img[src="images/cv-portrait.jpg"] {
        display: none;
    }
    h1 {
        font-size: 30px;
    }
    #about-section article h1 {
        margin-bottom: 10px;
    }
}

@media (max-width: 767px) {
    main {
        padding-left: 15px;
        padding-right: 15px;
    }
}


/*--------------------------------------------------------
						Footer
--------------------------------------------------------*/

footer {
    max-width: 1300px;
    margin: 0 auto;
    position: absolute;
    padding-top: 1em;
    padding-bottom: 1vh;
    bottom: 0;
    background: white;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    gap: 0 20px;
    flex-wrap: wrap;
}

footer:is(section>:last-child) {
    margin-bottom: 0 !important;
}


/* footer::after {
    content: '';
    position: absolute;
    width: 570vw;
    background: white;
    left: -50vw;
    display: block;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
} */

footer p,
footer ul,
footer li {
    display: inline-block;
    margin-right: .25em;
}

footer ul {
    display: flex;
    gap: 1ch;
}

footer svg .background {
    width: 30px;
    height: 30px;
}

@media (max-width: 600px) {
    footer ul {
        gap: 2px;
    }
}