:root {
    --ink: #221e1a;
    --secondary-ink: #302a25;
    --quiet-line: rgba(39, 33, 26, .42);
    --focus: #7a5434;
    --paper: rgba(233, 226, 216, .72);
}

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

html { min-width: 320px; background: #a79b87; }

body {
    position: relative;
    min-width: 320px;
    min-height: 100svh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: #a79b87;
    font-family: "Archivo", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: var(--focus); }

.scene-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: #b0a593 url("../assets/images/focubo-editorial-bedroom-wide.jpg") 50% 50% / cover no-repeat;
}

.scene-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(35, 31, 25, .105);
}

.site-header {
    position: absolute;
    z-index: 4;
    top: 4.6%;
    left: 5.2%;
}

.wordmark {
    display: inline-block;
    padding: 2px 0;
}

.wordmark img {
    display: block;
    width: clamp(110px, 8vw, 136px);
    height: auto;
}

main { position: absolute; inset: 0; z-index: 2; }

.editorial-note {
    position: absolute;
    color: var(--secondary-ink);
}

.editorial-index,
.eyebrow {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(9px, .7vw, 11px);
    font-weight: 400;
    letter-spacing: .22em;
    line-height: 1.5;
}

.editorial-note p {
    margin: 10px 0 0;
    font-size: clamp(13px, 1.22vw, 18px);
    font-weight: 360;
    letter-spacing: -.012em;
    line-height: 1.28;
}

.editorial-note--first {
    top: 18.3%;
    left: 5.2%;
    width: 190px;
}

.editorial-note--second {
    top: 47.3%;
    left: 78%;
    width: min(19%, 252px);
}

.centerpiece {
    position: absolute;
    top: 32.2%;
    left: 50%;
    width: min(calc(100% - 180px), 850px);
    text-align: center;
    transform: translateX(-50%);
}

.eyebrow { letter-spacing: .26em; }

h1 {
    display: inline-block;
    max-width: 100%;
    margin: clamp(19px, 2vw, 31px) 0 0;
    /* La altura disponible también limita el titular: evita que invada el formulario. */
    font-size: clamp(42px, min(5.33vw, 8.5svh), 86px);
    font-weight: 300;
    letter-spacing: -.052em;
    line-height: .99;
    font-variation-settings: "wdth" 125;
    font-stretch: 125%;
}

h1 span { display: block; white-space: nowrap; }

.waitlist-form {
    position: absolute;
    z-index: 3;
    top: 67.4%;
    left: 50%;
    width: clamp(320px, 33.3vw, 500px);
    min-height: 118px;
    margin: 0;
    padding: 21px 35px 17px;
    border-radius: 15px;
    background: var(--paper);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
}

.form-heading {
    margin: 0;
    font-size: clamp(13px, 1vw, 16px);
    font-weight: 390;
    letter-spacing: -.016em;
    line-height: 1.4;
    text-align: center;
}

.form-input-row {
    display: flex;
    align-items: stretch;
    min-height: 40px;
    margin-top: 13px;
    border-bottom: 1px solid var(--quiet-line);
}

.form-input-row:focus-within {
    border-bottom-color: var(--focus);
    box-shadow: 0 1px 0 var(--focus);
}

.form-input-row input {
    flex: 1;
    min-width: 0;
    padding: 0 3px;
    border: 0;
    outline: none;
    color: var(--ink);
    background: transparent;
    font-size: clamp(13px, 1vw, 16px);
    letter-spacing: -.01em;
}

.form-input-row input::placeholder {
    color: rgba(48, 42, 37, .63);
    opacity: 1;
}

.waitlist-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 0 0 10px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(9px, .78vw, 12px);
    font-weight: 400;
    letter-spacing: .16em;
    white-space: nowrap;
    cursor: pointer;
}

.button-arrow {
    font-family: "Archivo", Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    transition: transform 180ms ease;
}

.waitlist-button:disabled { opacity: .58; cursor: progress; }
.waitlist-button:disabled .button-arrow { transform: none; }

.form-status {
    margin: 0;
    color: var(--secondary-ink);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.form-status:empty { display: none; }
.form-status:not(:empty) { margin-top: 12px; }
.form-status.is-error { color: #733020; }
.form-status.is-success { color: #304b32; }

.sr-only,
.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.turnstile-slot { width: 100%; }

.site-footer {
    position: absolute;
    z-index: 3;
    inset: 0;
    pointer-events: none;
}

.editorial-note--third {
    bottom: 3%;
    left: 5.2%;
}

.site-footer nav {
    position: absolute;
    right: 5.2%;
    bottom: 6.1%;
    display: flex;
    gap: 21px;
    color: rgba(34, 30, 26, .75);
    font-size: 11px;
    line-height: 1.4;
    pointer-events: auto;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 10px;
    left: 10px;
    padding: 12px 16px;
    color: var(--ink);
    background: #f1ece3;
    transform: translateY(-160%);
}

.skip-link:focus { transform: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.form-input-row input:focus-visible { outline: none; }

@media (hover: hover) and (pointer: fine) {
    .waitlist-button:hover .button-arrow { transform: translateX(3px); }
    .site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

@media (max-width: 800px) {
    .scene-backdrop {
        background-image: url("../assets/images/focubo-editorial-bedroom.jpeg");
        background-position: 50% 44%;
    }
    .site-header { top: 4.2%; left: 8.8%; }
    .wordmark img { width: 110px; }

    .editorial-index, .eyebrow { font-size: 9px; }
    .editorial-note p { margin-top: 5px; font-size: 14px; line-height: 1.23; }

    .editorial-note--first {
        top: 15%;
        left: 8.8%;
        width: 160px;
    }

    .centerpiece {
        top: 30%;
        width: calc(100% - 46px);
    }

    h1 {
        margin-top: 18px;
        font-size: clamp(27px, 8.8vw, 39px);
        font-weight: 355;
        line-height: .96;
        letter-spacing: -.052em;
    }

    .editorial-note--second {
        top: 53.2%;
        left: 65%;
        width: 31%;
    }

    .desktop-break { display: none; }

    .waitlist-form {
        top: 69%;
        width: calc(100% - 68px);
        max-width: 346px;
        min-height: 106px;
        padding: 17px 22px 14px;
        border-radius: 15px;
    }

    .form-heading { font-size: 14px; }
    .form-input-row { min-height: 44px; margin-top: 12px; }
    .form-input-row input { font-size: 13px; }
    .waitlist-button { min-height: 44px; gap: 7px; font-size: 10px; letter-spacing: .13em; }
    .button-arrow { font-size: 15px; }

    .editorial-note--third {
        left: 8.8%;
        bottom: 5.7%;
    }

    .site-footer nav {
        right: 8.8%;
        bottom: 6.1%;
        gap: 12px;
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .centerpiece { width: calc(100% - 38px); }
    h1 { font-size: clamp(25px, 8.65vw, 31px); }
    .waitlist-form { width: calc(100% - 50px); }
    .site-footer nav { gap: 9px; font-size: 8px; }
}

@media (max-width: 520px) {
    .editorial-note--second {
        top: 52%;
        left: 8.8%;
        width: 62%;
    }
}

/* En portátiles, recuperar aire sin desplazar el formulario sobre el pie. */
@media (max-height: 800px) and (min-width: 801px) {
    .centerpiece { top: 31.2%; }
}

@media (max-height: 620px) and (min-width: 801px) {
    .site-header { top: 4.5%; }
    .centerpiece { top: 31%; }
    h1 { margin-top: 12px; font-size: clamp(38px, min(4.9vw, 8.5svh), 64px); }
    .waitlist-form { top: 68.5%; min-height: 96px; padding-top: 14px; padding-bottom: 11px; }
    .form-input-row { margin-top: 7px; }
}

/* En ventanas de escritorio inusualmente bajas, priorizar lectura y acceso al CTA. */
@media (max-height: 540px) and (min-width: 801px) {
    body { min-height: 560px; height: auto; overflow-y: auto; }
    main, .site-footer { height: 560px; bottom: auto; }
}

@media (max-height: 620px) and (max-width: 800px) {
    body { min-height: 620px; height: auto; overflow-y: auto; }
    .scene-backdrop { position: fixed; }
    .site-header, main, .site-footer { position: absolute; }
    main, .site-footer { height: 620px; bottom: auto; }
    .site-header { top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .button-arrow { transition: none; }
}
