/* Public Dialog portfolio — cream brand surfaces, green accent, CSS motion only. */

:root {
    --bg: #f4f1ea;
    --bg-deep: #ebe4d8;
    --surface: #fffcf8;
    --ink: #1c2421;
    --muted: #44504c;
    --line: #e3ddd3;
    --accent: #1d6b5f;
    --accent-dark: #15574d;
    --accent-soft: #e5f2ef;
    --side: #202123;
    --side-ink: #ececec;
    --side-muted: #b4b4b8;
    --side-active: #343541;
    --shadow: 0 18px 50px rgba(28, 36, 33, 0.12);
    --radius: 18px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Syne", "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background:
        radial-gradient(1200px 700px at 88% -10%, rgba(29, 107, 95, 0.18), transparent 55%),
        radial-gradient(900px 500px at 0% 20%, rgba(29, 107, 95, 0.08), transparent 50%),
        linear-gradient(180deg, #f7f3ec 0%, var(--bg) 42%, #efe8dc 100%);
}

img { display: block; max-width: 100%; }

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 14px clamp(16px, 4vw, 40px);
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    background: rgba(255, 252, 248, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(227, 221, 211, 0.85);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(28, 36, 33, 0.06);
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
}

.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a:hover { color: var(--accent); }

.top-dl {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff !important;
}

.top-dl:hover { background: var(--accent-dark); color: #fff !important; }

.hero {
    min-height: calc(100vh - 70px);
    min-height: calc(100dvh - 70px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 40px) clamp(40px, 8vh, 72px);
    padding-bottom: max(clamp(40px, 8vh, 72px), env(safe-area-inset-bottom, 0px));
}

.hero-copy {
    max-width: 34rem;
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-line {
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: clamp(2.6rem, 7vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: var(--accent);
}

.hero h1 {
    margin: 0 0 14px;
    font-family: var(--display);
    font-size: clamp(1.55rem, 3.4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.lead {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 32ch;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(29, 107, 95, 0.28);
}

.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-soft {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-soft:hover { color: var(--accent-dark); border-color: var(--accent); }

.hero-stage {
    position: relative;
    min-height: 340px;
    animation: rise 1.05s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stage-glow {
    position: absolute;
    inset: 8% 4% 0;
    background: radial-gradient(circle at 50% 40%, rgba(29, 107, 95, 0.28), transparent 65%);
    filter: blur(8px);
    pointer-events: none;
}

.device {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(28, 36, 33, 0.08);
    box-shadow: var(--shadow);
}

.device-hero {
    animation: floaty 7s ease-in-out infinite;
}

.device-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: #f0ebe2;
    border-bottom: 1px solid var(--line);
}

.device-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d7cfc2;
}

.device-bar span:nth-child(1) { background: #e8a39a; }
.device-bar span:nth-child(2) { background: #e2c984; }
.device-bar span:nth-child(3) { background: #9ec9b4; }

.device-bar p {
    margin: 0 0 0 8px;
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
}

.ui-ai {
    display: grid;
    grid-template-columns: 148px 1fr;
    min-height: 360px;
    background: var(--thread, #f7f7f8);
}

.ui-ai.compact { min-height: 280px; grid-template-columns: 120px 1fr; }

.ui-side {
    background: var(--side);
    color: var(--side-ink);
    padding: 14px 10px;
}

.ui-side-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.92rem;
}

.ui-side-brand i {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background:
        radial-gradient(circle at 30% 30%, #3aa890, transparent 55%),
        #1d6b5f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ui-new {
    width: 100%;
    margin-bottom: 12px;
    border: 0;
    border-radius: 8px;
    padding: 8px;
    background: var(--side-active);
    color: var(--side-ink);
    font: inherit;
    font-size: 0.78rem;
}

.ui-side ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.ui-side li {
    padding: 8px 9px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--side-muted);
}

.ui-side li.on {
    background: var(--side-active);
    color: var(--side-ink);
}

.ui-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: #f7f7f8;
}

.bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    line-height: 1.4;
    animation: bubble-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bubble.me {
    align-self: flex-end;
    background: var(--accent-soft);
    border: 1px solid #d5ebe5;
}

.bubble.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--line);
}

.bubble.bot strong { color: var(--accent); }

.device-hero .bubble.me { animation-delay: 0.35s; }
.device-hero .bubble.bot { animation-delay: 0.55s; }
.device-hero .bubble.me:nth-of-type(3) { animation-delay: 0.75s; }

.ui-composer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
}

.ui-composer i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font-style: normal;
    font-size: 0.85rem;
}

.about,
.products,
.close {
    padding: 0 clamp(16px, 4vw, 40px);
}

.about {
    max-width: 40rem;
    margin: 0 auto 72px;
    text-align: center;
    animation: rise 0.8s 0.2s both;
}

.about h2,
.products h2,
.close h2 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: -0.03em;
}

.about p,
.section-lead,
.product-copy p,
.close p {
    margin: 0;
    color: var(--muted);
}

.about p + p { margin-top: 12px; }

.aliases {
    font-size: 0.95rem;
}

.aliases strong { color: var(--ink); }

.products {
    max-width: 1120px;
    margin: 0 auto 80px;
}

.products > h2 { text-align: center; }
.section-lead {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 40px;
}

.product {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin-bottom: 56px;
}

.product.reverse { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.product.reverse .product-copy { order: 2; }
.product.reverse .device { order: 1; }

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-copy h3 {
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.product-copy p { margin-bottom: 14px; }

.text-link {
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-dark);
}

.text-link:hover { color: var(--accent); }

.ui-chat {
    background: var(--bg);
    min-height: 300px;
}

.ui-chat header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.ui-chat header b { font-family: var(--display); }
.ui-chat header span {
    font-size: 0.78rem;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--accent-soft);
}

.ui-chat ul {
    list-style: none;
    margin: 0;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.ui-chat li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.face {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.face.a {
    background:
        radial-gradient(circle at 35% 30%, #fff6, transparent 40%),
        linear-gradient(145deg, #2f8f7e, #1d6b5f);
}

.face.b {
    background:
        radial-gradient(circle at 35% 30%, #fff6, transparent 40%),
        linear-gradient(145deg, #6b8f7a, #3d5c4f);
}

.face.c {
    background:
        radial-gradient(circle at 35% 30%, #fff6, transparent 40%),
        linear-gradient(145deg, #c4b49a, #8a7a62);
}

.ui-chat li strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.ui-chat li strong em {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    animation: pulse 1.8s ease-in-out infinite;
}

.ui-chat li span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.close {
    margin-bottom: 72px;
}

.close-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 252, 248, 0.95), rgba(229, 242, 239, 0.65));
    border: 1px solid var(--line);
}

.close-inner img {
    margin: 0 auto 14px;
    border-radius: 14px;
}

.close .cta { justify-content: center; margin-top: 22px; }

.foot {
    padding: 28px clamp(16px, 4vw, 40px) 40px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 20px;
    color: var(--muted);
    font-size: 0.92rem;
    background: rgba(255, 252, 248, 0.55);
}

.foot p { margin: 0; }
.foot a { text-decoration: none; font-weight: 600; }

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

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bubble-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.65; }
}

@media (max-width: 920px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-stage { order: -1; min-height: 0; }

    .product,
    .product.reverse {
        grid-template-columns: 1fr;
    }

    .product.reverse .product-copy,
    .product.reverse .device { order: unset; }
}

@media (max-width: 640px) {
    .top-nav a:not(.top-dl) { display: none; }

    .ui-ai,
    .ui-ai.compact { grid-template-columns: 1fr; }

    .ui-side { display: none; }

    .brand-line { font-size: clamp(2.2rem, 12vw, 3rem); }
    .hero h1 { font-size: clamp(1.35rem, 6.5vw, 2rem); overflow-wrap: anywhere; }
    .cta { flex-wrap: wrap; }
    .cta .btn { flex: 1 1 auto; min-width: min(100%, 140px); text-align: center; }
    .device { max-width: 100%; }
    .product, .product.reverse { gap: 20px; }
}

@media (max-width: 380px) {
    .top { gap: 8px; }
    .brand span { font-size: 1.05rem; }
    .top-dl { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
