/* Reset and shared primitives */

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

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@supports not (overflow-x: clip) {
    html {
        overflow-x: hidden;
    }
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100%;
}

.skip-link {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 2147483647;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--ground);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.15s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Aphrodite waitlist */

.waitlist-page {
    /* Near-monochrome ground so the magenta wordmark is the only saturated
       element on the page. */
    --ground: #fcfbf9;
    --ink: #14120f;
    --ink-soft: #6f6a64;
    --line: rgba(20, 18, 15, 0.16);
    --accent: #ff66c4;
    --danger: #a8322f;
    --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: "Playfair Display", "Iowan Old Style", Georgia, serif;

    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-weight: 400;
    font-optical-sizing: auto;
    color: var(--ink);
    background: var(--ground);
    overflow-x: clip;
}

.waitlist-stage {
    width: min(100% - 2.75rem, 30rem);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding:
        max(4rem, env(safe-area-inset-top))
        0
        max(4rem, env(safe-area-inset-bottom));
    animation: waitlist-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.waitlist-brand {
    margin-bottom: 3.25rem;
}

.logo {
    display: block;
    width: 170px;
    height: auto;
    margin: 0 auto;
}

.waitlist-copy {
    text-align: center;
    margin-bottom: 3.25rem;
}

.waitlist-copy h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6.5vw, 2.6rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--ink);
}

.waitlist-copy p {
    margin-top: 0.9rem;
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--ink-soft);
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

/* The display above outranks the UA stylesheet's [hidden] rule, so the
   success handler's form.hidden = true needs this to actually hide it. */
.waitlist-form[hidden] {
    display: none;
}

.waitlist-field {
    display: flex;
    flex-direction: column;
}

.waitlist-field label {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ink-soft);
}

.waitlist-field input,
.waitlist-field textarea {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0.55rem 0;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    outline: none;
    resize: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.waitlist-field textarea {
    min-height: 4.5rem;
    line-height: 1.55;
}

.waitlist-field input:hover,
.waitlist-field textarea:hover {
    border-bottom-color: rgba(20, 18, 15, 0.34);
}

.waitlist-field input:focus,
.waitlist-field textarea:focus {
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 0 var(--accent);
}

/* Autofill paints its own background, which would break the underline
   fields. Mask it with the page ground. */
.waitlist-field input:-webkit-autofill,
.waitlist-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--ground) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.waitlist-submit {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0.75rem auto 0;
    border: none;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    padding: 0.6rem 0.1rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.waitlist-submit:hover:not(:disabled) {
    border-color: var(--accent);
}

.waitlist-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.waitlist-submit:disabled {
    opacity: 0.5;
    cursor: wait;
}

.waitlist-submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.waitlist-submit .btn-spinner {
    display: none;
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(20, 18, 15, 0.25);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: waitlist-spin 0.7s linear infinite;
    margin-right: 0.55rem;
    vertical-align: -1px;
}

.waitlist-submit.loading .btn-spinner {
    display: inline-block;
}

/* Shown by waitlist.js, which sets display directly. */
.error-message {
    display: none;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--danger);
}

.waitlist-success {
    text-align: center;
    padding: 1rem 0;
    animation: waitlist-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.waitlist-success-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 2.15rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.waitlist-success-title:focus {
    outline: none;
}

.waitlist-success-body {
    margin-top: 0.8rem;
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--ink-soft);
}

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

@keyframes waitlist-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .waitlist-stage {
        width: min(100% - 2.25rem, 30rem);
        justify-content: flex-start;
        padding-top: max(3.25rem, env(safe-area-inset-top));
    }

    .waitlist-brand,
    .waitlist-copy {
        margin-bottom: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .waitlist-stage,
    .waitlist-success {
        animation: none;
    }

    .waitlist-submit .btn-spinner {
        animation: none;
    }

    .waitlist-submit:active:not(:disabled) {
        transform: none;
    }
}
