* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #111;
    background: #fff;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================
   Public layout
   ========================= */

.public-container,
.container {
    width: min(100% - 40px, 1180px);
    margin: 0 auto;
}

.public-header,
header {
    padding: 22px 0;
    border-bottom: 1px solid #eee;
}

.public-nav,
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-logo,
.logo {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
}

.public-login,
.login {
    color: #111;
    text-decoration: none;
}

.public-login:hover,
.login:hover {
    text-decoration: underline;
}

.public-main {
    min-height: calc(100vh - 160px);
}

.public-footer,
footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}

/* =========================
   Landing
   ========================= */

.hero {
    padding: 60px 0 70px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 80px;
    align-items: start;
}

.hero-content {
    text-align: left;
}

.hero h1 {
    max-width: 580px;
    margin: 0 0 24px;
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1.08;
}

.hero p {
    max-width: 540px;
    margin: 0 0 32px;
    color: #555;
    font-size: 20px;
}

.button {
    display: inline-block;
    padding: 14px 26px;
    border: 1px solid #111;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #222;
}

/* =========================
   Landing right column
   ========================= */

.hero-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    display: block;
    width: 100%;
    max-width: 430px;
    max-height: none;
    object-fit: contain;
}

/* =========================
   How GuestAI works
   ========================= */

.hero-how {
    width: 100%;
    max-width: 430px;
}

.hero-how h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.hero-how-item {
    padding: 16px 0;
    border-top: 1px solid #e5e5e5;
}

.hero-how-item:last-child {
    border-bottom: 1px solid #e5e5e5;
}

.hero-how-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.hero-how-item p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

/* =========================
   Demo heading
   ========================= */

.hero-demo {
    width: 100%;
}

.demo-heading {
    max-width: 650px;
    margin: 0 auto 14px;
    text-align: center;
}

.demo-heading h2 {
    margin: 0 0 6px;
    font-size: 26px;
}

.demo-heading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* =========================
   Demo chat
   ========================= */

.demo-chat {
    width: 430px;
    max-width: 100%;
    height: 580px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid #ddd;
    border-radius: 14px;

    background: #fff;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Chat header */

.demo-chat-header {
    flex: 0 0 auto;

    padding: 18px 16px;

    border-bottom: 1px solid #eee;

    background: #fff;
}

.demo-chat-header strong {
    display: block;

    margin-bottom: 3px;

    font-size: 18px;
    line-height: 1.2;
}

.demo-chat-header span {
    display: block;

    color: #666;

    font-size: 14px;
}

/* Messages */

.demo-messages {
    flex: 1;
    min-height: 0;

    overflow-y: auto;

    padding: 18px 14px;

    background: #fff;
}

.demo-message-row {
    width: 100%;

    display: flex;
    align-items: flex-end;

    gap: 8px;

    margin-top: 14px;
}

.demo-message-row:first-child {
    margin-top: 0;
}

.demo-message-row.assistant-row {
    justify-content: flex-start;
}

.demo-message-row.user-row {
    justify-content: flex-end;
}

.demo-assistant-avatar {
    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
    line-height: 1;
}

.demo-message {
    width: fit-content;

    max-width: calc(92% - 36px);

    margin: 0;
    padding: 11px 13px;

    border-radius: 12px;

    color: #111;

    font-size: 15px;
    line-height: 1.4;

    overflow-wrap: break-word;
}

.demo-message.assistant {
    background: #f0f0f0;
}

.demo-message.user {
    max-width: 88%;

    background: #e8f2ff;
}

/* Suggested questions */

.demo-suggestions {
    flex: 0 0 auto;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    padding: 10px 14px 0;

    border-top: 1px solid #f3f3f3;

    background: #fff;
}

.demo-suggestions button {
    padding: 7px 10px;

    border: 1px solid #ddd;
    border-radius: 18px;

    background: #fff;
    color: #333;

    font: inherit;
    font-size: 12px;

    cursor: pointer;
}

.demo-suggestions button:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.demo-suggestions button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Chat form */

.demo-chat-form {
    flex: 0 0 auto;

    display: flex;
    align-items: stretch;

    gap: 6px;

    padding: 12px 14px 16px;

    background: #fff;
}

.demo-chat-form input {
    flex: 1;
    min-width: 0;

    padding: 13px 12px;

    border: 1px solid #ccc;
    border-radius: 9px;

    background: #fff;
    color: #111;

    font: inherit;
    font-size: 15px;

    outline: none;
}

.demo-chat-form input:focus {
    border-color: #111;
}

.demo-chat-form input:disabled {
    background: #f3f3f3;
}

.demo-chat-form button {
    flex: 0 0 auto;

    padding: 13px 16px;

    border: 0;
    border-radius: 9px;

    background: #111;
    color: #fff;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.demo-chat-form button:hover {
    background: #222;
}

.demo-chat-form button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Thinking */

.demo-message.thinking {
    min-width: 48px;
    height: 40px;

    display: flex;
    align-items: center;

    gap: 4px;
}

.demo-message.thinking span {
    width: 6px;
    height: 6px;

    background: #777;

    border-radius: 50%;

    animation: demo-thinking-dot 1.2s infinite ease-in-out;
}

.demo-message.thinking span:nth-child(2) {
    animation-delay: 0.15s;
}

.demo-message.thinking span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes demo-thinking-dot {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.demo-note {
    margin: 18px auto 0;

    color: #777;

    font-size: 14px;

    text-align: center;
}

/* =========================
   General landing sections
   ========================= */

section {
    padding: 70px 0;
}

h2 {
    margin: 0 0 20px;

    font-size: 32px;
    line-height: 1.2;
}

.section-text {
    max-width: 720px;

    color: #555;
}

.steps {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;

    margin-top: 35px;
}

.card {
    padding: 28px;

    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.card p {
    margin-bottom: 0;

    color: #555;
}

/* =========================
   FAQ
   ========================= */

.faq {
    max-width: 750px;
}

.faq-item {
    margin-bottom: 30px;
}

.faq-item h3 {
    margin-bottom: 8px;
}

.faq-item p {
    color: #555;
}

/* =========================
   CTA
   ========================= */

.cta {
    padding: 90px 0;

    text-align: center;
}

.cta p {
    margin-bottom: 30px;

    color: #555;
}

/* =========================
   Host login
   ========================= */

.host-login {
    width: min(100% - 40px, 520px);

    margin: 80px auto;
}

.host-login h1 {
    margin: 0 0 10px;

    font-size: 42px;
    line-height: 1.2;
}

.host-login p {
    color: #555;

    font-size: 18px;
    line-height: 1.5;
}

.host-login input {
    width: 100%;

    margin-top: 20px;

    padding: 16px;

    border: 1px solid #aaa;
    border-radius: 8px;

    background: #fff;
    color: #111;

    font: inherit;
    font-size: 16px;
}

.host-login input:focus {
    outline: none;

    border-color: #111;
}

.host-login button {
    width: 100%;

    margin-top: 12px;

    padding: 16px;

    border: 0;
    border-radius: 8px;

    background: #111;
    color: #fff;

    font: inherit;
    font-size: 16px;

    cursor: pointer;
}

.host-login button:hover {
    background: #222;
}

.error {
    color: #b91c1c !important;

    font-size: 14px !important;
}

/* =========================
   Onboarding
   ========================= */

.onboarding {
    width: min(100% - 40px, 650px);

    margin: 70px auto;
}

.onboarding h1 {
    margin: 0 0 10px;

    font-size: 40px;
    line-height: 1.2;
}

.onboarding p {
    color: #555;

    font-size: 18px;
    line-height: 1.5;
}

.onboarding textarea {
    width: 100%;
    min-height: 300px;

    margin-top: 20px;

    padding: 16px;

    border: 1px solid #aaa;
    border-radius: 8px;

    background: #fff;
    color: #111;

    font: inherit;
    font-size: 16px;
    line-height: 1.5;

    resize: vertical;
}

.onboarding textarea:focus {
    outline: none;

    border-color: #111;
}

.onboarding button {
    width: 100%;

    margin-top: 12px;

    padding: 16px;

    border: 0;
    border-radius: 8px;

    background: #111;
    color: #fff;

    font: inherit;
    font-size: 16px;

    cursor: pointer;
}

.onboarding button:hover {
    background: #222;
}

.onboarding button:disabled {
    cursor: not-allowed;

    opacity: 0.75;
}

/* =========================
   Review
   ========================= */

.review-page {
    width: min(100% - 40px, 700px);

    margin: 60px auto;
}

.review-page h1 {
    margin: 0 0 10px;

    font-size: 40px;
    line-height: 1.2;
}

.review-page > p {
    color: #555;

    font-size: 17px;
    line-height: 1.5;
}

.review-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-top: 30px;
}

.review-full {
    grid-column: 1 / -1;
}

.review-page label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
}

.review-page input,
.review-page textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #aaa;
    border-radius: 8px;

    background: #fff;
    color: #111;

    font: inherit;
}

.review-page input:focus,
.review-page textarea:focus {
    outline: none;

    border-color: #111;
}

.review-page textarea {
    min-height: 100px;

    resize: vertical;
}

.review-page button {
    width: 100%;

    margin-top: 24px;

    padding: 16px;

    border: 0;
    border-radius: 8px;

    background: #111;
    color: #fff;

    font: inherit;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
}

.review-page button:hover {
    background: #222;
}

.review-page button:disabled {
    cursor: not-allowed;

    opacity: 0.75;
}

.review-error {
    margin-top: 5px;

    color: #b91c1c;

    font-size: 14px;
}

/* =========================
   Add unit
   ========================= */

.unit-create {
    width: min(100% - 40px, 650px);

    margin: 60px auto;
}

.unit-create h1 {
    margin: 0 0 10px;

    font-size: 40px;
    line-height: 1.2;
}

.unit-create > p {
    color: #555;

    font-size: 18px;
}

.unit-create label {
    display: block;

    margin-top: 18px;
    margin-bottom: 6px;

    font-weight: 700;
}

.unit-create input,
.unit-create select,
.unit-create textarea {
    width: 100%;

    padding: 13px;

    border: 1px solid #aaa;
    border-radius: 8px;

    background: #fff;
    color: #111;

    font: inherit;
}

.unit-create textarea {
    min-height: 120px;

    resize: vertical;
}

.unit-create button {
    width: 100%;

    margin-top: 24px;

    padding: 16px;

    border: 0;
    border-radius: 8px;

    background: #111;
    color: #fff;

    font: inherit;
    font-size: 16px;

    cursor: pointer;
}

/* =========================
   Done / QR
   ========================= */

.done-page {
    width: min(100% - 40px, 600px);

    margin: 60px auto;

    text-align: center;
}

.done-page h1 {
    margin: 0 0 10px;

    font-size: 40px;
    line-height: 1.2;
}

.done-subtitle {
    color: #555;

    font-size: 18px;
    line-height: 1.5;
}

.done-qr {
    display: block;

    width: 280px;
    max-width: 80%;

    margin: 30px auto;

    cursor: zoom-in;
}

.done-unit {
    font-size: 20px;
    font-weight: 700;
}

.done-link {
    margin: 20px 0;

    padding: 14px;

    border-radius: 8px;

    background: #f5f5f5;

    font-size: 14px;

    word-break: break-all;
}

.done-buttons {
    display: grid;

    gap: 10px;

    margin-top: 24px;
}

.done-button {
    display: block;

    width: 100%;

    padding: 15px;

    border: 1px solid #111;
    border-radius: 8px;

    background: #fff;
    color: #111;

    font: inherit;
    font-size: 16px;

    text-decoration: none;

    cursor: pointer;
}

.done-button:hover {
    background: #f5f5f5;
}

.done-button-primary {
    background: #111;
    color: #fff;
}

.done-button-primary:hover {
    background: #222;
}

/* =========================
   Check email
   ========================= */

.email-sent-page {
    max-width: 520px;

    margin: 80px auto;

    padding: 24px;
}

.email-sent-page h1 {
    margin: 0 0 16px;

    font-size: 40px;
    line-height: 1.2;
}

.email-sent-page p {
    margin: 0 0 12px;

    font-size: 18px;
    line-height: 1.5;
}

.email-sent-note {
    color: #666;
}

/* =========================
   Loading states
   ========================= */

.button-loading {
    align-items: center;
    justify-content: center;

    gap: 10px;
}

.button-loading:not([hidden]) {
    display: flex;
}

.spinner {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;

    animation: button-spin 0.7s linear infinite;
}

.processing-note {
    margin: 10px 0 0 !important;

    text-align: center;

    font-size: 14px !important;

    color: #777 !important;
}

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

/* =========================
   Mobile
   ========================= */

@media (max-width: 700px) {
    .public-container,
    .container {
        width: min(100% - 30px, 1180px);
    }

    .public-header,
    header {
        padding: 18px 0;
    }

    .hero {
        padding: 50px 0 60px;
    }

    .hero-grid {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .hero-content {
        text-align: center;
    }

    .hero h1 {
        margin-left: auto;
        margin-right: auto;

        font-size: 38px;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;

        font-size: 18px;
    }

    .hero-right {
        gap: 28px;
    }

    .hero-image img {
        max-width: 390px;

        margin: 0 auto;
    }

    .hero-how,
    .hero-demo {
        width: 100%;
        max-width: 100%;
    }

    .hero-demo .demo-chat {
        width: 100%;
        max-width: 100%;
        height: 580px;
    }

    .demo-heading {
        text-align: center;
    }

    .demo-chat {
        border-radius: 10px;
    }

    .demo-messages {
        padding: 18px 14px;
    }

    .demo-message {
        max-width: calc(94% - 36px);
    }

    .demo-message.user {
        max-width: 92%;
    }

    section {
        padding: 50px 0;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .host-login,
    .onboarding,
    .review-page,
    .unit-create,
    .done-page {
        width: min(100% - 30px, 700px);

        margin-top: 35px;
        margin-bottom: 35px;
    }

    .host-login h1 {
        font-size: 36px;
    }

    .onboarding h1,
    .review-page h1,
    .unit-create h1,
    .done-page h1 {
        font-size: 34px;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .review-full {
        grid-column: auto;
    }

    .onboarding textarea {
        min-height: 260px;
    }

    .done-qr {
        width: 240px;
    }

    .email-sent-page {
        margin: 40px auto;

        padding: 20px;
    }

    .email-sent-page h1 {
        font-size: 34px;
    }
}

/* =========================
   Print
   ========================= */

@media print {
    .public-header,
    .public-footer,
    header,
    footer,
    .no-print {
        display: none !important;
    }

    .done-page {
        margin-top: 30px;
    }

    .done-qr {
        width: 350px;
    }
}

.hero-left-sections {
    padding: 50px 0;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 22px;

    padding: 24px 0;

    border: 0;
    border-radius: 0;
}

/* можно оставить лёгкое разделение между шагами */
.step-card + .step-card {
    border-top: 1px solid #eee;
}

.step-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ddd;
    border-radius: 12px;

    background: #fafafa;
}

.step-icon svg {
    width: 26px;
    height: 26px;

    fill: none;
    stroke: #111;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.step-card h3 {
    margin: 2px 0 12px;
}

.step-card p {
    margin: 0;
}

/* =========================
   Landing mobile final order
   ========================= */

@media (max-width: 700px) {
    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .hero-content,
    .hero-right {
        display: contents;
    }

    .hero-intro {
        order: 1;
        text-align: center;
    }

    .hero-image {
        order: 2;
        margin-top: 42px;
    }

    .hero-demo {
        order: 3;
        margin-top: 42px;
    }

    .hero-left-sections {
        order: 4;
        width: 100%;
        padding: 48px 0 0;
        text-align: left;
    }

    .hero-left-section + .hero-left-section {
        margin-top: 42px;
    }
}

@media (max-width: 700px) {
    .hero-content .button {
        display: table;
        margin-left: auto;
        margin-right: auto;
    }
}
