:root {
    --bg: #f6f3ef;
    --panel: rgba(255, 255, 255, 0.58);
    --panel-strong: rgba(255, 255, 255, 0.72);
    --text: #1e1d1a;
    --muted: #68645d;
    --line: rgba(30, 29, 26, 0.07);
    --orange: #d77735;
    --orange-strong: #be6528;
    --shadow: 0 24px 60px rgba(88, 76, 59, 0.12);
    /* SF Pro on Apple (via -apple-system); quality fallbacks elsewhere */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    --font-serif-heading: "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.alpha-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    position: relative;
}

.alpha-panel {
    position: relative;
    min-height: 100vh;
}

.alpha-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(28px, 6vw, 76px);
    background: var(--bg);
}

.alpha-mark {
    position: absolute;
    top: 52px;
    left: clamp(28px, 6vw, 76px);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.alpha-mark img {
    display: block;
    width: 60px;
    height: auto;
}

.alpha-copy-inner {
    /* Slightly wider measure for serif body + headline (ch is ~“0” width; serif needs a bit more) */
    --copy-column-width: 42ch;
    max-width: 460px;
    margin: 0 auto;
}

.alpha-eyebrow {
    margin-bottom: 24px;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    color: rgba(30, 29, 26, 0.45);
}

.alpha-copy h1 {
    font-family: var(--font-serif-heading);
    /* Slightly smaller scale; 500 is between regular and the old 600 semibold */
    font-size: clamp(1.85rem, 2.15vw, 2.2rem);
    /* Serifs need more leading than Inter; tight values clip ascenders/descenders */
    line-height: 1.22;
    letter-spacing: -0.02em;
    font-weight: 500;
    /* Use full copy column; --copy-column-width is for body — was forcing an early wrap */
    max-width: 100%;
    white-space: normal;
    text-rendering: optimizeLegibility;
    /* Extra vertical room so glyphs aren’t flush against flex/measure boxes */
    padding-block: 0.12em 0.18em;
}

.alpha-description {
    margin-top: 20px;
    max-width: var(--copy-column-width);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
}

.alpha-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.alpha-copy-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

.alpha-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(28, 25, 23, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.alpha-footer-social:hover {
    color: var(--orange-strong);
}

.alpha-footer-social-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.alpha-footer-text-link {
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.alpha-footer-text-link:hover {
    color: var(--orange-strong);
}

.alpha-mobile-footer {
    display: none;
}

/* Single-column static pages (e.g. company); allows scrolling on large viewports */
html.alpha-scroll-page,
html.alpha-scroll-page body {
    height: auto;
    min-height: 100%;
}

.alpha-page--simple {
    grid-template-columns: 1fr;
    font-family: var(--font-serif-heading);
}

.alpha-page--simple .alpha-copy {
    max-width: 640px;
    margin-inline: auto;
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
}

/* Absolute logo + centered .alpha-copy-inner share the same x-band → headline
   collides with the mark. Keep the mark in normal flow on simple pages. */
.alpha-page--simple .alpha-simple-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    max-width: 460px;
    margin: 0 0 28px;
    align-self: flex-start;
}

.alpha-page--simple .alpha-simple-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.alpha-page--simple .alpha-simple-nav-back:hover {
    color: var(--orange-strong);
}

.alpha-page--simple .alpha-simple-nav-arrow {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    margin-top: 1px;
}

.alpha-page--simple .alpha-copy-inner {
    margin-left: 0;
    margin-right: auto;
    width: 100%;
}

.alpha-page--simple .alpha-copy h1 {
    font-size: clamp(1.625rem, 2.1vw, 1.95rem);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.alpha-page--simple .alpha-copy h2 {
    font-family: var(--font-serif-heading);
    font-size: clamp(1.05rem, 1.35vw, 1.2rem);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.015em;
    margin-top: 14px;
    max-width: var(--copy-column-width);
    color: var(--muted);
    text-rendering: optimizeLegibility;
}

.alpha-page--simple .alpha-copy-footer {
    align-self: flex-start;
    width: 100%;
    max-width: 460px;
    justify-content: flex-start;
    gap: 24px;
    flex-wrap: nowrap;
}

@media (min-width: 961px) {
    html.alpha-scroll-page,
    html.alpha-scroll-page body {
        overflow: auto;
    }

    html.alpha-scroll-page .alpha-page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    html.alpha-scroll-page .alpha-panel {
        height: auto;
        min-height: 100vh;
    }

    html.alpha-scroll-page .alpha-page--simple .alpha-copy-inner {
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    /* Pin desktop footer to viewport bottom when content is short */
    .alpha-page--simple .alpha-copy {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .alpha-page--simple .alpha-copy-footer {
        margin-top: auto;
        padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
    }
}

.alpha-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 13px 20px;
    border-radius: 0;
    background: var(--orange);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(215, 119, 53, 0.24);
    will-change: transform, opacity;
    transition:
        background 0.2s ease,
        transform 0.42s ease,
        opacity 0.42s ease;
}

.alpha-button:hover {
    background: var(--orange-strong);
    transform: translateY(-1px);
}

.alpha-button.is-hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.alpha-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}

.alpha-link:hover {
    color: var(--orange-strong);
}

.alpha-link-docs {
    margin-left: 6px;
}

.alpha-visual {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 42% 24%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(246, 243, 239, 0.2) 50%, rgba(224, 229, 234, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.alpha-glow {
    position: absolute;
    inset: 10% 8% auto auto;
    width: min(48vw, 520px);
    height: min(48vw, 520px);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 223, 195, 0.42) 0%, rgba(255, 223, 195, 0.12) 36%, rgba(255, 255, 255, 0) 70%);
    filter: blur(18px);
    pointer-events: none;
}

.alpha-sea {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3%;
    height: 30%;
    background:
        radial-gradient(120% 90% at 50% 100%, rgba(230, 185, 92, 0.18) 0%, rgba(230, 185, 92, 0.04) 56%, rgba(230, 185, 92, 0) 70%),
        linear-gradient(180deg, rgba(245, 214, 145, 0) 0%, rgba(232, 193, 103, 0.28) 72%, rgba(214, 166, 62, 0.44) 100%);
    pointer-events: none;
}

.alpha-sea::before,
.alpha-sea::after {
    content: "";
    position: absolute;
    left: -8%;
    right: -8%;
    border-radius: 50%;
}

.alpha-sea::before {
    bottom: 16%;
    height: 34%;
    background: rgba(232, 193, 103, 0.24);
    filter: blur(18px);
}

.alpha-sea::after {
    bottom: -4%;
    height: 58%;
    background: rgba(214, 166, 62, 0.34);
    filter: blur(24px);
}

.mock-app {
    position: relative;
    z-index: 2;
    width: min(100%, 560px);
    padding: 0 6px;
}

.mock-chat {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.alpha-mock-actions {
    margin-top: 26px;
    display: flex;
    justify-content: flex-end;
}

.claude-user-wrap {
    max-width: 430px;
    margin-left: auto;
}

.claude-user-bubble {
    padding: 16px 20px;
    border-radius: 18px;
    background: rgba(243, 239, 231, 0.9);
    color: rgba(30, 29, 26, 0.9);
    font-size: 0.98rem;
    line-height: 1.45;
    box-shadow: 0 10px 30px rgba(88, 76, 59, 0.07);
}

.claude-user-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    color: rgba(30, 29, 26, 0.42);
    font-size: 0.82rem;
}

.claude-meta-icon {
    font-size: 1rem;
    line-height: 1;
}

.claude-meta-icon-svg {
    display: block;
    width: 16px;
    height: 16px;
    opacity: 0.78;
}

.claude-meta-icon-svg rect {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.claude-meta-icon--action {
    display: inline;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    line-height: inherit;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.claude-meta-icon--action:hover {
    opacity: 0.7;
}

.claude-meta-icon--action:focus {
    outline: none;
    box-shadow: none;
}

.claude-trace {
    max-width: 520px;
}

.claude-trace-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: rgba(30, 29, 26, 0.5);
    font-size: 0.82rem;
    line-height: 1.4;
}

.claude-trace-label {
    display: inline-block;
}

.claude-trace-label.is-shimmering {
    color: transparent;
    background-image: linear-gradient(
        100deg,
        rgba(30, 29, 26, 0.38) 0%,
        rgba(30, 29, 26, 0.44) 24%,
        rgba(246, 241, 233, 0.68) 46%,
        rgba(30, 29, 26, 0.45) 64%,
        rgba(30, 29, 26, 0.38) 100%
    );
    background-size: 240% 100%;
    background-position: 120% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: claude-trace-shimmer 2.4s linear infinite;
}

.claude-trace-line span {
    font-size: 0.95rem;
    color: rgba(30, 29, 26, 0.34);
}

.claude-tool-group {
    margin: 0;
}

.claude-tool-group-finished {
    margin-top: 18px;
}

.claude-tool-group.is-hidden,
.claude-tool-item.is-hidden,
.claude-response.is-hidden {
    display: none;
}

.claude-tool-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.claude-tool-summary::-webkit-details-marker {
    display: none;
}

.claude-tool-summary-icon {
    display: inline-block;
    transition: transform 0.18s ease;
    transform-origin: center;
}

.claude-tool-group[open] .claude-tool-summary-icon {
    transform: rotate(90deg);
}

.claude-tool-group:not([open]) .claude-tool-summary-icon {
    transform: rotate(0deg);
}

.claude-response {
    margin-bottom: 18px;
    color: rgba(22, 20, 18, 0.92);
    font-family: var(--font-serif-heading);
    font-size: 1.15rem;
    line-height: 1.38;
    letter-spacing: -0.01em;
}

.claude-response-final {
    margin-top: 16px;
    margin-bottom: 0;
}

.claude-response-finished {
    margin-top: 18px;
    margin-bottom: 0;
}

.claude-tool-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.claude-tool-item {
    display: flex;
    gap: 14px;
}

.claude-tool-rail {
    width: 1px;
    background: rgba(30, 29, 26, 0.1);
    margin-left: 13px;
}

.claude-tool-content {
    flex: 1;
    padding-bottom: 8px;
}

.claude-result-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: rgba(30, 29, 26, 0.46);
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 14px rgba(88, 76, 59, 0.04);
}

.claude-tool-row {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(30, 29, 26, 0.68);
    font-size: 0.95rem;
    line-height: 1.45;
}

.claude-tool-icon {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.claude-tool-text {
    flex: 1;
}

.claude-spinner {
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(215, 119, 53, 0.2);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: claude-spin 0.9s linear infinite;
}

.claude-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(30, 29, 26, 0.34);
    border-radius: 50%;
    color: rgba(30, 29, 26, 0.52);
    font-size: 0.7rem;
}

.claude-tool-item-done .claude-tool-content,
.claude-tool-item-thinking .claude-tool-content {
    padding-bottom: 0;
}

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

@keyframes claude-trace-shimmer {
    0% {
        background-position: 120% 50%;
    }

    100% {
        background-position: -120% 50%;
    }
}

@media (min-width: 961px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .alpha-page {
        height: 100vh;
        overflow: hidden;
    }

    .alpha-panel {
        height: 100vh;
    }

    .alpha-copy {
        justify-content: flex-start;
        min-height: 100%;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    }

    .alpha-copy-inner {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        width: 100%;
    }
}

@media (max-width: 960px) {
    html,
    body {
        height: auto;
        overflow: auto;
    }

    .alpha-page {
        grid-template-columns: 1fr;
    }

    .alpha-panel {
        min-height: auto;
    }

    .alpha-copy {
        min-height: auto;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 28px 80px;
    }

    .alpha-mark {
        position: static;
        align-self: flex-start;
        margin: 0 0 42px;
        justify-content: flex-start;
    }

    .alpha-copy-inner {
        width: 100%;
        max-width: 540px;
        margin: 0;
        text-align: left;
    }

    .alpha-description {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .alpha-actions .alpha-button {
        width: 180px;
        min-width: 180px;
    }

    .alpha-visual {
        min-height: 761px;
        align-items: flex-start;
        padding: 24px 24px 120px;
    }

    .alpha-copy-footer {
        display: none;
    }

    .alpha-mobile-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
        padding: 28px 18px max(28px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(28, 25, 23, 0.1);
        background: var(--bg);
    }

    .alpha-page--simple .alpha-copy {
        max-width: none;
    }

    .alpha-page--simple .alpha-simple-nav {
        max-width: 540px;
    }

    .alpha-page--simple .alpha-copy-footer {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .alpha-mark img {
        width: 60px;
    }

    .alpha-copy h1 {
        white-space: normal;
        font-size: clamp(2rem, 8.6vw, 2.5rem);
        letter-spacing: -0.02em;
        line-height: 1.22;
        font-weight: 500;
        padding-block: 0.1em 0.16em;
    }

    .alpha-description {
        max-width: none;
        font-size: 1rem;
        line-height: 1.6;
    }

    .alpha-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        margin-top: 40px;
    }

    .alpha-actions .alpha-link {
        width: auto;
        justify-content: center;
        font-size: 0.88rem;
    }

    .alpha-actions .alpha-link-docs {
        margin-left: 0;
    }

    .mock-app {
        width: 100%;
        padding: 0;
    }

    .mock-chat {
        gap: 16px;
    }

    .alpha-mock-actions {
        margin-top: 22px;
    }

    .claude-user-wrap {
        max-width: 100%;
    }

    .claude-user-bubble {
        padding: 15px 18px;
        font-size: 0.92rem;
        border-radius: 16px;
    }

    .claude-response {
        font-size: 1rem;
    }

    .claude-trace {
        max-width: 100%;
    }

    .claude-tool-row {
        gap: 10px;
        font-size: 0.9rem;
    }

}

/* 404 page (src/404.html) */
.error-code,
.error-title {
    font-family: var(--font-serif-heading);
}
