/* ===== Custom Properties (not in theme.json) ===== */
:root {
    --color-primary: #1E40AF;
    --color-primary-dark: #1E3A8A;
    --color-accent: #D97706;
    --color-background: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-text: #1E293B;
    --color-text-dark: #0F172A;
    --color-text-light: #64748B;
    --color-border: #E2E8F0;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 1rem;
    --radius-md: 3rem;
    --radius-lg: 6rem;
    --radius-full: 9999px;
    --main-padding: 6rem;
}

/* ===== Squircle corners ===== */
.squircle {
    corner-shape: squircle;
}

.squircle > img {
    corner-shape: squircle;
}

/* ===== Honeypot ===== */
.honey {
    display: none !important;
}

/* ===== Sticky footer ===== */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:not(header):not(footer) {
    flex-grow: 1;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

section {
    scroll-snap-align: start;
}

.kaido-logo {
    font-family: var(--font-heading);
    font-weight: 300;
    font-style: italic;
    font-size: 2rem;
}

main {
    padding-top: var(--main-padding);
    padding-bottom: var(--main-padding);
}

body.no-padding-top main {
    padding-top: 0;
}

body.no-padding-bottom main {
    padding-bottom: 0;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 250, 249, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
}

main a,
.mock-link {
    text-decoration: underline;
    color: var(--color-primary);
    cursor: pointer;
}

main a:hover {
    color: var(--color-primary-dark);
}

.logo svg {
    height: auto;
    width: 80px;
}

.main-nav a {
    color: var(--color-text);
    corner-shape: squircle;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
    background-color: rgba(13, 148, 136, 0.1);
}

.main-nav a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* ===== Hero Section ===== */
.hero {
    min-height: calc(100svh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 3rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: linear-gradient(135deg, var(--color-background) 0%, #e0e7ff 50%, var(--color-background) 100%);
    z-index: -1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    opacity: 0.28;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.hero-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.5;
}

.hero-features li::before {
    content: '';
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    background: var(--color-primary);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
}

/* ===== CTA Button (3D) ===== */
.cta-button {
    position: relative;
    display: inline-block;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    transition: filter 250ms;
    text-decoration: none;
    -webkit-user-drag: none;
    user-select: none;
    corner-shape: squircle;
}

.cta-button .shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: hsl(0deg 0% 0% / 0.25);
    will-change: transform;
    transform: translateY(2px);
    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
    corner-shape: squircle;
}

.cta-button .edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #842b08;
    corner-shape: squircle;
}

.cta-button .front {
    display: block;
    position: relative;
    padding: 12px 42px;
    border-radius: 12px;
    font-size: 1.25rem;
    color: white;
    background: #C2410C;
    will-change: transform;
    transform: translateY(-4px);
    transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
    corner-shape: squircle;
}

.cta-button:hover {
    filter: brightness(110%);
}

.cta-button:hover .front {
    transform: translateY(-6px);
    transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}

.cta-button:active .front {
    transform: translateY(-2px);
    transition: transform 34ms;
}

.cta-button:hover .shadow {
    transform: translateY(4px);
    transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}

.cta-button:active .shadow {
    transform: translateY(1px);
    transition: transform 34ms;
}

.cta-button:focus:not(:focus-visible) {
    outline: none;
}

/* ===== Phone Mockup ===== */
.hero-phone {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    text-decoration: none;
    animation: bounce-scroll 2s ease-in-out infinite;
    transition: color 0.2s, border-color 0.2s;
}

.scroll-indicator:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

@keyframes bounce-scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.phone-frame {
    width: 280px;
    height: 580px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        var(--shadow-xl),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    transform: perspective(1000px) rotateY(-12deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.phone-frame:hover {
    transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== Chat Interface ===== */
.chat-header {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    corner-shape: squircle;
}

.chat-avatar svg {
    width: 100%;
    height: 100%;
}

.chat-avatar-letter {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: white;
    line-height: 1;
}

.chat-title {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chat-name {
    display: flex;
    align-items: center;
}

.chat-name .kaido-logo {
    font-size: 1.25rem;
    color: white;
}

.chat-status {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: left;
}

.chat-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    corner-shape: squircle;
}

.chat-close:hover {
    border-color: white;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--color-surface);
    text-align: left;
}

.chat-bubble {
    font-size: 0.8rem;
    line-height: 1.6;
    animation: bubbleIn 0.3s ease-out;
}

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

.chat-bubble.bot {
    color: var(--color-text);
    align-self: flex-start;
    padding: 0 0.25rem;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--color-primary);
    border-radius: 16px;
    padding: 0.625rem 1rem;
    color: white;
    max-width: 85%;
    border-bottom-right-radius: 2px;
    corner-shape: squircle;
}

.chat-bubble p {
    margin: 0 0 0.75em 0;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble ul,
.chat-bubble ol {
    margin: 0.5em 0;
    padding-left: 1.1em;
}

.chat-bubble li {
    margin-bottom: 0.35em;
    padding-left: 0.25em;
}

.chat-bubble li:last-child {
    margin-bottom: 0;
}

.chat-bubble strong {
    font-weight: 600;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0.25rem;
    align-self: flex-start;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--color-text-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.chat-input-area {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 0.75rem;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    overflow: hidden;
    corner-shape: squircle;
}

.chat-input-field {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    color: var(--color-text);
    outline: none;
}

.chat-input-field::placeholder {
    color: var(--color-text-light);
}

.chat-send {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    corner-shape: squircle;
    transition: background-color 0.2s;
}

.chat-send:hover {
    background: var(--color-primary-dark);
}

.chat-send:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.4);
}

.chat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.25rem 0;
    font-size: 0.65rem;
}

.chat-email {
    color: var(--color-primary);
    text-decoration: underline;
}

.chat-powered {
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-powered .kaido-logo {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

/* ===== Features Section ===== */
.features {
    padding: 6rem 2rem;
    background: var(--color-surface);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.features-grid > * {
    margin-block-start: 0 !important;
}

.feature-card {
    background: var(--color-background);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    corner-shape: squircle;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 148, 136, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    corner-shape: squircle;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Chat Demo Section ===== */
.chat-demo {
    padding: 6rem 2rem;
    background: var(--color-background);
}

.chat-demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-demo h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.chat-demo-conversation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 580px;
}

.demo-message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
}

.demo-message.demo-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.demo-message.demo-bot {
    align-self: flex-start;
}

.demo-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: white;
    corner-shape: squircle;
}

.demo-avatar svg {
    width: 100%;
    height: 100%;
}

.demo-avatar-letter {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
}

.demo-bubble {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    corner-shape: squircle;
}

.demo-user .demo-bubble {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.demo-bot .demo-bubble {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 4px;
}

.demo-bubble p {
    margin: 0 0 0.75rem 0;
}

.demo-bubble p:last-child {
    margin-bottom: 0;
}

.demo-bubble ul {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.25rem;
}

.demo-bubble li {
    margin-bottom: 0.35rem;
}

.demo-bubble li:last-child {
    margin-bottom: 0;
}

.demo-bubble strong {
    font-weight: 600;
}

.demo-bubble a {
    color: var(--color-primary);
    text-decoration: underline;
}

.demo-bubble a:hover {
    text-decoration: none;
}

.demo-message.demo-hidden {
    visibility: hidden;
    opacity: 0;
}

.demo-message.demo-visible {
    visibility: visible;
    animation: demoFadeIn 0.4s ease forwards;
}

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

.demo-typing {
    display: flex;
    gap: 5px;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    border-bottom-left-radius: 4px;
    corner-shape: squircle;
}

.demo-typing span {
    width: 8px;
    height: 8px;
    background: var(--color-text-light);
    border-radius: 50%;
    animation: demoTyping 1.4s infinite ease-in-out;
}

.demo-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.demo-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes demoTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ===== Practical Section ===== */
.practical {
    padding: 6rem 2rem;
    background: var(--color-surface);
}

.practical-container {
    max-width: 900px;
    margin: 0 auto;
}

.practical h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
}

.practical-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.practical-grid > * {
    margin-block-start: 0 !important;
}

.practical-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    corner-shape: squircle;
}

.wp-block-kaido-feature-card.is-full-width,
.wp-block-kaido-feature-card:has(.practical-card--full) {
    grid-column: 1 / -1;
}

.wp-block-kaido-feature-card.is-full-width h3,
.wp-block-kaido-feature-card:has(.practical-card--full) h3 {
    font-size: 1.25rem;
}

.wp-block-kaido-feature-card.is-full-width .practical-content p,
.wp-block-kaido-feature-card:has(.practical-card--full) .practical-content p {
    font-size: 1.05rem;
}

@media (max-width: 600px) {
    .wp-block-kaido-feature-card.is-full-width h3,
    .wp-block-kaido-feature-card:has(.practical-card--full) h3 {
        font-size: 1.125rem;
    }

    .wp-block-kaido-feature-card.is-full-width .practical-content p,
    .wp-block-kaido-feature-card:has(.practical-card--full) .practical-content p {
        font-size: 0.95rem;
    }
}

.practical-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 148, 136, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    corner-shape: squircle;
}

/* ===== Icon Hover Animations ===== */
.feature-icon,
.practical-icon {
    transition: transform 0.3s ease;
}

.feature-icon svg,
.practical-icon svg {
    transition: transform 0.4s ease;
}

.feature-card:hover .icon-bounce svg,
.practical-card:hover .icon-bounce svg {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(-4px); }
}

.feature-card:hover .icon-grow svg,
.practical-card:hover .icon-grow svg {
    animation: grow 0.5s ease;
}

@keyframes grow {
    0% { transform: scaleY(0.7); transform-origin: bottom; }
    50% { transform: scaleY(1.1); transform-origin: bottom; }
    100% { transform: scaleY(1); transform-origin: bottom; }
}

.feature-card:hover .icon-spin svg,
.practical-card:hover .icon-spin svg {
    animation: spin 0.6s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(90deg); }
}

.feature-card:hover .icon-pulse svg,
.practical-card:hover .icon-pulse svg {
    animation: pulse 0.5s ease;
}

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

.feature-card:hover .icon-wobble svg,
.practical-card:hover .icon-wobble svg {
    animation: wobble 0.5s ease;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.feature-card:hover .icon-refresh svg,
.practical-card:hover .icon-refresh svg {
    animation: refresh 0.6s ease;
}

@keyframes refresh {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feature-card:hover .icon-flip svg,
.practical-card:hover .icon-flip svg {
    animation: flip 0.6s ease;
}

@keyframes flip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.feature-card:hover .icon-float svg,
.practical-card:hover .icon-float svg {
    animation: float 0.6s ease;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
}

.practical-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.practical-content p {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.practical-content p:last-child {
    margin-bottom: 0;
}

.practical-note {
    color: var(--color-text-light) !important;
    font-size: 0.85rem !important;
    font-style: italic;
}

/* ===== Contact CTA Section ===== */
.contact-cta {
    padding: 6rem 2rem;
    background: var(--color-surface);
}

.contact-cta-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-cta-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 3rem;
    border-radius: calc(3rem + var(--radius-md));
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    corner-shape: squircle;
}

.contact-cta-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.contact-cta-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-cta-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    corner-shape: squircle;
}

.contact-cta-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.contact-cta-card .cta-button {
    color: var(--color-primary);
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.cta-link:hover {
    gap: 0.75rem;
}

.cta-link svg {
    transition: transform 0.2s;
}

.cta-link:hover svg {
    transform: translate(2px, -2px);
}

/* ===== Case Study Section ===== */
.case-study {
    padding: 6rem 2rem;
    background: var(--color-background);
    overflow: hidden;
}

.case-study-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.case-study-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.case-study-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.case-study-content p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.case-study-content .case-study-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.case-study-content .case-study-link svg {
    transition: transform 0.2s;
}

.case-study-content .case-study-link:hover svg {
    transform: translate(2px, -2px);
}

/* ===== Device Mockups ===== */
.case-study-devices {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 400px;
    padding-left: 40px;
}

.device-desktop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.device-desktop-frame {
    background: #1a1a1a;
    border-radius: 12px 12px 6px 6px;
    padding: 12px 12px 8px;
    position: relative;
}

.device-desktop-notch {
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    margin: 0 auto 8px;
}

.device-desktop-screen {
    width: 620px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-desktop-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transform: scale(1.01);
}

.device-desktop-screen img[src=""],
.device-desktop-screen img:not([src]) {
    display: none;
}

.device-desktop-stand {
    width: 60px;
    height: 50px;
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.device-desktop-base {
    width: 120px;
    height: 10px;
    background: #1a1a1a;
    border-radius: 0 0 4px 4px;
}

.device-mobile {
    position: absolute;
    left: -40px;
    bottom: 0;
}

.device-mobile-frame {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 8px;
    box-shadow: var(--shadow-xl);
}

.device-mobile-screen {
    width: 120px;
    height: 266px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-mobile-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.device-mobile-screen img[src=""],
.device-mobile-screen img:not([src]) {
    display: none;
}

/* ===== Media Section ===== */
.media-section {
    padding: 5rem 2rem;
    background: var(--color-surface);
}

.media-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.media-container h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--color-text);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.media-grid > * {
    margin-block-start: 0 !important;
}

.media-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    corner-shape: squircle;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.media-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary);
}

.media-source {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.media-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    margin: 0;
}

.media-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-top: auto;
}

.media-card:hover .media-link svg {
    transform: translate(2px, -2px);
}

.media-link svg {
    transition: transform 0.2s;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 0.5rem;
}

.footer-logo .kaido-logo {
    color: var(--color-surface);
}

.footer-built-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-twofour {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
    transform: translateY(-4px);
}

.footer-twofour:hover {
    color: rgba(255, 255, 255, 1);
}

.footer-twofour:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

.footer-twofour svg {
    height: 1.1rem;
    width: auto;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 1);
}

/* ===== Policy Page ===== */
.policy-hero {
    min-height: calc(100vh - 80px);
    padding: 8rem 2rem 4rem;
}

.policy-container {
    max-width: 800px;
    margin: 0 auto;
}

.policy-container h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.policy-updated {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.policy-content h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-text-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.policy-content p,
.policy-content ul {
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-content ul {
    padding-left: 1.5rem;
}

.policy-content li {
    margin-bottom: 0.5rem;
}

.policy-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.policy-content a:hover {
    color: var(--color-primary-dark);
}

/* ===== About Page ===== */
.about-hero {
    min-height: calc(100vh - 80px);
    padding: 3rem 2rem 4rem;
    display: flex;
    align-items: center;
}

.about-container {
    max-width: 700px;
    margin: 0 auto;
}

.about-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.about-intro a {
    color: var(--color-primary);
    font-weight: 500;
}

.about-intro a:hover {
    color: var(--color-primary-dark);
}

.about-image {
    margin-top: 2.5rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    corner-shape: squircle;
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content a {
    color: var(--color-primary);
    font-weight: 500;
}

.about-content a:hover {
    text-decoration: underline;
    color: var(--color-primary-dark);
}

/* ===== Contact Page ===== */
.contact-hero {
    min-height: calc(100vh - 80px);
    padding: 3rem 2rem 4rem;
    display: flex;
    align-items: center;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-subtitle {
    color: var(--color-text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-person {
    margin-bottom: 2rem;
}

.contact-person img {
    max-width: 330px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    corner-shape: squircle;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text);
}

.contact-item svg {
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.contact-item:hover .icon-bounce {
    animation: bounce 0.5s ease;
}

.contact-item:hover .icon-ring {
    animation: ring 0.5s ease;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    50% { transform: rotate(10deg); }
    70% { transform: rotate(-10deg); }
    90% { transform: rotate(5deg); }
}

.contact-form-container {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    corner-shape: squircle;
}

.mauticform_wrapper,
.wpcf7-form {
    width: 100%;
    margin: unset;
}

.mauticform_wrapper .form-group,
.wpcf7-form .form-group {
    margin-bottom: 0.25rem;
    padding-bottom: 1.25rem;
}

.mauticform_wrapper label,
.wpcf7-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.mauticform_wrapper label .required,
.wpcf7-form label .required {
    color: #dc2626;
}

.mauticform_wrapper input,
.mauticform_wrapper textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--color-background);
    corner-shape: squircle;
}

.mauticform_wrapper textarea,
.wpcf7-form textarea {
    field-sizing: content;
}

.mauticform_wrapper input:focus,
.mauticform_wrapper textarea:focus,
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.mauticform_wrapper textarea,
.wpcf7-form textarea {
    resize: vertical;
    min-height: 120px;
}

.wpcf7-form .cta-button {
    width: 100%;
}

/* Invalid field border */
.wpcf7-form .wpcf7-not-valid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Per-field validation tip — absolute so it doesn't shift layout */
.wpcf7-form .wpcf7-form-control-wrap {
    position: relative;
}

.wpcf7-form .wpcf7-not-valid-tip {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #dc2626;
    white-space: nowrap;
    margin-top: 0.2rem;
}

.wpcf7-form .wpcf7-not-valid-tip::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    flex-shrink: 0;
}

/* Checkbox / acceptance fields — tighten spacing between consecutive items */
.wpcf7-form p:has(.wpcf7-checkbox) + p:has(.wpcf7-checkbox),
.wpcf7-form p:has(.wpcf7-acceptance) + p:has(.wpcf7-acceptance),
.wpcf7-form p:has(.wpcf7-checkbox) + p:has(.wpcf7-acceptance),
.wpcf7-form p:has(.wpcf7-acceptance) + p:has(.wpcf7-checkbox) {
    margin-top: -1rem;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item,
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"],
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.15em;
    border: 2px solid var(--color-border);
    border-radius: 0.35rem;
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    transform: translateY(4px);
    margin-right: 4px;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:hover,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"]:hover {
    border-color: var(--color-primary);
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:checked,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:focus-visible,
.wpcf7-form .wpcf7-acceptance input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item-label,
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.4;
    cursor: pointer;
}

/* Response message (success / error) */
.wpcf7-form .wpcf7-response-output {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    margin: 1.5rem 0 0;
    border: none;
    corner-shape: squircle;
    animation: cf7-fade-in 0.3s ease;
}

@keyframes cf7-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wpcf7-form.sent .wpcf7-response-output {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #16a34a;
}

.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.wpcf7-form .wpcf7-spinner {
    display: none;
}

.contact-form .cta-button {
    width: 100%;
}

.form-message {
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-top: auto;
    margin-bottom: 0;
}

.form-message-success {
    background: #dcfce7;
    color: #166534;
}

.form-message-error {
    background: #fee2e2;
    color: #991b1b;
}

.form-privacy-notice {
    display: block;
    margin-top: 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-text-light);
}

.form-privacy-notice a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form-privacy-notice a:hover {
    color: var(--color-primary-dark);
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #dc2626;
}

.mauticform-errormsg {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
        padding-top: 2rem;
    }

    .scroll-indicator {
        display: none;
    }

    .hero-content {
        max-width: 100%;
    }

    .phone-frame {
        transform: none;
        width: 260px;
        height: 540px;
        will-change: transform;
    }

    .phone-frame:hover {
        transform: none;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-details {
        align-items: center;
    }

    .contact-cta-container {
        grid-template-columns: 1fr;
    }

    .case-study-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .case-study-content h2 {
        font-size: 2rem;
    }

    .case-study-devices {
        justify-content: center;
        min-height: 350px;
        padding-left: 0;
        gap: 4rem;
    }

    .device-desktop-screen {
        width: 300px;
        height: 190px;
    }

    .device-mobile {
        position: relative;
    }

    .device-mobile-screen {
        width: 100px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 1rem 3rem;
    }

    .phone-frame {
        width: min(260px, calc(100vw - 3rem));
        height: auto;
        aspect-ratio: 260 / 540;
    }

    .features {
        padding: 4rem 1rem;
    }

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

    .chat-demo {
        padding: 4rem 1rem;
    }

    .chat-demo-conversation {
        min-height: 650px;
    }

    .demo-message {
        max-width: 95%;
    }

    .demo-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        padding: 0.4rem;
    }

    .demo-bubble {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .practical {
        padding: 4rem 1rem;
    }

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

    .contact-cta {
        padding: 4rem 1rem;
    }

    .contact-cta-card {
        padding: 2rem;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-cta-image {
        order: -1;
    }

    .contact-cta-image img {
        max-width: 280px;
    }

    .contact-hero {
        padding: 2rem 1rem 3rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .case-study {
        padding: 4rem 1.5rem;
    }

    .case-study-content h2 {
        font-size: 1.75rem;
    }

    .device-desktop-screen {
        width: 240px;
        height: 150px;
    }

    .device-mobile-screen {
        width: 80px;
        height: 160px;
    }

    .device-mobile-frame {
        border-radius: 16px;
        padding: 6px;
    }

    .device-mobile-screen {
        border-radius: 12px;
    }

    .media-section {
        padding: 4rem 1.5rem;
    }

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

    .media-container h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 420px) {
    .case-study-devices {
        justify-content: flex-end;
    }

    .device-mobile {
        position: absolute;
        left: 50%;
        transform: translateX(-160px);
    }
}
