:root {
    --c-bg: #FFFEF7;
    --c-purple: #2B135E;
    --c-pink: #EC3995;
    --c-text: #231F20;
    --c-muted: #E5E5E5;
    --c-placeholder: #B9B9B9;
    --c-focus: #FFD400;
}

@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62.5% 125%;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    background-color: var(--c-bg);
    font-family: "Archivo", sans-serif;
}

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

[hidden] {
    display: none !important;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes eyebrow-reveal {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(10px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes caret-blink {
    50% {
        opacity: 0;
    }
}

.navigation {
    min-height: 120px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 30px;
}

.logo {
    height: 60px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 30px;
    margin-left: auto;
}

.nav-link {
    color: var(--c-purple);
    font-size: 21px;
    font-weight: 500;
    font-stretch: 90%;
    transition: color 180ms ease;
}

.nav-link:hover {
    color: var(--c-pink);
}

.nav-link-short {
    display: none;
}

.hero {
    background-image: url("img/oc.webp");
    background-color: var(--c-pink);
    background-position: right center;
    background-repeat: no-repeat;
    height: 440px;
}

.hero-wrapper {
    box-sizing: border-box;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.eyebrow {
    justify-self: start;
    color: var(--c-bg);
    background-color: var(--c-text);
    font-size: 32px;
    font-weight: 800;
    font-stretch: 62.5%;
    padding: 9px 12px;
    margin-top: -10px;
    text-transform: uppercase;
    line-height: 1;
    transform: translateY(10px);
    animation: eyebrow-reveal 500ms 80ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.eyebrow-text {
    display: inline-block;
    transform: translateY(0.5px);
}

.hero-title {
    align-self: center;
    margin: 0;
    color: var(--c-bg);
    font-size: 64px;
    font-weight: 800;
    font-stretch: 90%;
    line-height: 1;
    animation: hero-reveal 650ms 180ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-title-changing {
    display: inline;
}

.hero-title-caret {
    width: 5px;
    height: 0.88em;
    display: inline-block;
    margin-left: 6px;
    vertical-align: -0.08em;
    background-color: var(--c-bg);
    animation: caret-blink 900ms steps(1, end) infinite;
}

.hero-subtitle {
    color: var(--c-bg);
    font-size: 32px;
    font-weight: 600;
    font-stretch: 90%;
    animation: hero-reveal 550ms 360ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.wrapper > section {
    margin-top: 40px;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
}

.scroll-reveal.is-visible {
    animation: rise-in 650ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal-item {
    opacity: 0;
}

.scroll-reveal.is-visible .scroll-reveal-item {
    animation: fade-in 550ms var(--reveal-delay, 0ms) both ease-out;
}

.section-header {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
}

.section-header-number {
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--c-bg);
    background-color: var(--c-pink);
    font-size: 32px;
    font-weight: 800;
    font-stretch: 62.5%;
    text-transform: uppercase;
}

.section-header-title {
    box-sizing: border-box;
    height: 48px;
    margin: 0;
    padding: 0 9px;
    display: flex;
    align-items: center;
    border: 2pt solid var(--c-text);
    background-color: transparent;
    color: var(--c-text);
    font-size: 32px;
    font-weight: 800;
    font-stretch: 62.5%;
    text-transform: uppercase;
}

.section-intro {
    display: block;
    color: var(--c-text);
    font-size: 24px;
    font-weight: 500;
    font-stretch: 90%;
    margin: 0;
}

.semicondensed {
    font-stretch: 90%;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.template-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    border: 2pt solid var(--c-text);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.template-card:hover {
    transform: translateY(-6px);
    box-shadow: 6px 6px 0 var(--c-purple);
}

.template-tag {
    align-self: flex-start;
    padding: 6px 9px;
    color: var(--c-bg);
    background-color: var(--c-text);
    font-size: 18px;
    font-weight: 800;
    font-stretch: 62.5%;
}

.template-tag-text {
    display: inline-block;
    transform: translateY(-0.5px);
}

.template-card-title {
    margin: 0;
    padding: 16px 16px;
    color: var(--c-text);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
}

.template-card-button {
    align-self: stretch;
    margin: auto 16px 16px;
    padding: 9px 10px 10px 10px;
    border: 0;
    color: var(--c-bg);
    background-color: var(--c-pink);
    font-family: 'Archivo', sans-serif;
    font-size: 28px;
    font-stretch: 62.5%;
    font-weight: 800;
    min-height: 50px;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.template-card-button:hover {
    background-color: var(--c-purple);
}

.template-card-button:active,
.send-action:active {
    transform: translateY(2px);
}

@media (max-width: 700px) {
    .template-grid {
        grid-template-columns: 1fr;
    }
}

.section-following {
    margin-top: 60px;
}

.wrapper > .section-following {
    margin-top: 60px;
}

#personalise {
    scroll-margin-top: 30px;
}

.section-components {
    margin-top: 30px;
}

.personalise-form {
    margin-top: 30px;
}

.wrapper > .personalise-form {
    margin-top: 30px;
}

.personalise-form form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 36px;
}

.subject-recipient-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 36px;
    margin-top: 30px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-top-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 40px;
}

.form-field label,
.concerns-fieldset legend {
    display: block;
    margin-bottom: 12px;
    color: var(--c-purple);
    font-size: 18px;
    font-weight: 700;
    font-stretch: 90%;
    line-height: 1;
}

.form-field,
.select-wrapper {
    min-width: 0;
}

.form-lock-message {
    margin: 30px 0 0;
    color: var(--c-purple);
    font-size: 24px;
    font-weight: 600;
    font-stretch: 90%;
}

.sender-name-field .form-lock-message {
    margin-top: 0;
}

.required-mark,
.optional-mark {
    color: var(--c-pink);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 12px;
    height: 12px;
    border-right: 3px solid var(--c-text);
    border-bottom: 3px solid var(--c-text);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.select-wrapper select,
.compound-input,
.subject-field input,
.sender-name-field input,
.textarea-field textarea {
    box-sizing: border-box;
    width: 100%;
    border: 2px solid var(--c-text);
    border-radius: 0;
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: inherit;
    font-size: 24px;
    font-stretch: 90%;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.select-wrapper select {
    height: 50px;
    padding: 0 52px 0 14px;
    appearance: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

select:disabled,
input:disabled,
textarea:disabled,
button:disabled {
    cursor: not-allowed;
}

select:disabled,
input:disabled,
textarea:disabled {
    background-color: var(--c-muted);
}

.subject-field {
    grid-column: 1 / span 2;
}

.sender-name-field {
    grid-column: 1 / span 2;
    grid-row: 3;
}

.subject-field input,
.sender-name-field input {
    height: 50px;
    display: block;
    padding: 0 14px;
    outline: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compound-input {
    height: 50px;
    display: flex;
    align-items: stretch;
}

.compound-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-right: 2px solid var(--c-text);
    white-space: nowrap;
}

.compound-input input {
    min-width: 0;
    flex: 1;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--c-text);
    font: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-wrapper:focus-within,
.compound-input:focus-within,
.concern-option:focus-within label,
.concern-option label:focus,
.concern-option:active label,
.template-card:focus,
.template-card:focus-within,
.template-card:active,
.subject-field input:focus,
.sender-name-field input:focus,
.send-action:focus,
.textarea-field textarea:focus,
.letter-preview-field:focus-within .letter-preview {
    outline: 3px solid var(--c-focus);
    outline-offset: 0;
}

.select-wrapper select:focus,
.compound-input input:focus,
.template-card-button:focus {
    outline: none;
}

.compound-input input::placeholder,
.textarea-field textarea::placeholder,
.subject-field input::placeholder,
.sender-name-field input::placeholder {
    color: var(--c-placeholder);
    opacity: 1;
}

.concerns-fieldset {
    grid-column: 1 / span 2;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.recipient-fieldset {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.concerns-fieldset legend {
    width: 100%;
    padding: 0;
}

.concerns-list {
    display: grid;
    gap: 10px;
}

.concern-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.concern-option label {
    box-sizing: border-box;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 2px solid var(--c-text);
    color: var(--c-text);
    background-color: var(--c-bg);
    font-size: 24px;
    font-stretch: 90%;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.concern-option label:hover {
    transform: translateX(4px);
}

.checkbox-mark {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: block;
    position: relative;
    background-color: var(--c-muted);
    transition: background-color 180ms ease, transform 180ms ease;
}

.concern-option input:checked + label .checkbox-mark {
    background-color: var(--c-pink);
    transform: rotate(8deg) scale(1.05);
}

.concern-option input:checked + label .checkbox-mark::before,
.concern-option input:checked + label .checkbox-mark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 3px;
    background-color: var(--c-bg);
    transform: translate(-50%, -50%) rotate(45deg);
}

.concern-option input:checked + label .checkbox-mark::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.textarea-field {
    grid-column: 1 / span 2;
    margin: 0;
}

.textarea-field textarea {
    height: 50px;
    min-height: 200px;
    display: block;
    padding: 12px 14px;
    resize: vertical;
}

.letter-preview-field {
    width: calc((100% - 40px) * 2 / 3 + 20px);
    margin-top: 30px;
}

.letter-preview {
    box-sizing: border-box;
    width: 100%;
    min-height: 250px;
    display: block;
    padding: 16px;
    border: 2px solid var(--c-text);
    border-radius: 0;
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: inherit;
    font-size: 24px;
    font-stretch: 90%;
    resize: vertical;
}

.letter-preview::placeholder {
    color: var(--c-placeholder);
    opacity: 1;
}

.send-actions {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.send-action {
    padding: 9px 16px 10px;
    font-family: inherit;
    font-size: 28px;
    font-weight: 800;
    font-stretch: 62.5%;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.send-action-primary {
    color: var(--c-bg);
    background-color: var(--c-pink);
}

.send-action-secondary {
    color: var(--c-bg);
    background-color: var(--c-text);;
}

.send-action:hover {
    box-shadow: 5px 5px 0 var(--c-purple);
    transform: translate(-2px, -2px);
}

.send-action:disabled {
    color: var(--c-placeholder);
    background-color: var(--c-muted);
    box-shadow: none;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-reveal,
    .scroll-reveal-item,
    .scroll-reveal.is-visible,
    .scroll-reveal.is-visible .scroll-reveal-item {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .hero-title-caret {
        animation: none;
    }
}

#footer {
    font-size: 18px;
    font-stretch: 90%;
    margin: 90px 0 60px;
}

.ssa {
    font-weight: 700;
    font-stretch: 62.5%;
    text-transform: uppercase;
}

.footer-cont {
    margin-top: -10px;
}

.footer-small {
    font-size: 12px;
}

@media (max-width: 1100px) {
    .navigation {
        align-items: center;
    }

    .nav-links {
        gap: 10px 30px;
    }

    .nav-link {
        font-size: 18px;
    }

    .hero-title {
        font-size: clamp(44px, 7vw, 64px);
    }

    .hero-subtitle {
        font-size: clamp(24px, 4vw, 32px);
    }

    .template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .personalise-form form,
    .subject-recipient-form {
        column-gap: 24px;
    }

    .letter-preview-field {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .section-intro br {
        display: none;
    }

    .navigation {
        min-height: 0;
        display: block;
        padding: 20px 20px 24px;
    }

    .logo {
        width: min(267px, 100%);
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .nav-links {
        justify-content: center;
        margin-top: 18px;
        text-align: center;
    }

    .nav-link-full {
        display: none;
    }

    .nav-link-short {
        display: inline;
    }

    .nav-link {
        font-size: 17px;
        line-height: 1.2;
    }

    .hero {
        height: auto;
        min-height: 430px;
        background-position: 68% center;
        background-size: cover;
    }

    .hero-wrapper {
        min-height: 430px;
        padding: 28px 20px 32px;
    }

    .eyebrow {
        font-size: clamp(22px, 7vw, 32px);
    }

    .hero-title {
        font-size: clamp(38px, 10vw, 54px);
        line-height: 1.02;
    }

    .hero-subtitle {
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.1;
    }

    .wrapper {
        padding: 0 20px;
    }

    .wrapper > section,
    .wrapper > .section-following {
        margin-top: 44px;
    }

    .section-header {
        gap: 8px;
        margin-bottom: 16px;
    }

    .section-header-number,
    .section-header-title {
        height: 42px;
    }

    .section-header-number {
        width: 42px;
        flex: 0 0 42px;
        font-size: 27px;
    }

    .section-header-title {
        min-width: 0;
        padding: 0 7px;
        font-size: clamp(21px, 6vw, 28px);
        line-height: 1;
    }

    .section-intro {
        font-size: 20px;
        line-height: 1.15;
    }

    .template-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 24px;
    }

    .template-card {
        min-height: 220px;
    }

    .template-card-title {
        font-size: 25px;
    }

    .template-card-button {
        margin: auto 12px 12px;
        font-size: 23px;
    }

    .personalise-form,
    .wrapper > .personalise-form {
        margin-top: 24px;
    }

    .personalise-form form,
    .subject-recipient-form,
    .form-top-row {
        display: block;
    }

    .form-field + .form-field,
    .concerns-fieldset,
    .sender-name-field,
    .subject-field,
    .recipient-fieldset {
        margin-top: 28px;
    }

    .form-field label,
    .concerns-fieldset legend {
        font-size: 17px;
        line-height: 1.15;
    }

    .select-wrapper select,
    .compound-input,
    .subject-field input,
    .sender-name-field input,
    .concern-option label {
        min-height: 52px;
        height: auto;
    }

    .select-wrapper select,
    .subject-field input,
    .sender-name-field input,
    .compound-input {
        font-size: 20px;
    }

    .compound-input-prefix {
        padding: 0 10px;
    }

    .concern-option label {
        font-size: 20px;
        line-height: 1.15;
    }

    .letter-preview-field {
        margin-top: 24px;
    }

    .letter-preview {
        min-height: 280px;
        font-size: 20px;
    }

    .form-lock-message {
        font-size: 20px;
        line-height: 1.15;
    }

    .send-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
    }

    .send-action {
        width: 100%;
        min-height: 50px;
        font-size: 24px;
    }

    #footer {
        margin: 64px 0 36px;
        font-size: 16px;
        line-height: 1.2;
    }
}