/* ===== CSS Variables ===== */
: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;
}

/* ===== 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;
}

/* ===== 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;
    padding: 20px 0;
}

.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 {
    text-decoration: underline;
    color: var(--color-primary);
}

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

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

.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    corner-shape: squircle;
    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: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 8rem 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-content {
    flex: 1;
    max-width: 500px;
}

.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;
}

.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;
}
.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);
}
.edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #842b08;
}
.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);
}

.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;
}

.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%;
    corner-shape: squircle;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
}

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

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

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

.chat-name svg {
    height: 0.9rem;
    width: auto;
}

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

.chat-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    corner-shape: squircle;
    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;
}

.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);
}

.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;
    corner-shape: squircle;
    padding: 0.625rem 1rem;
    color: white;
    max-width: 85%;
    border-bottom-right-radius: 2px;
}

.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);
    corner-shape: squircle;
    background: var(--color-surface);
}

.chat-input-field {
    flex: 1;
    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%;
    corner-shape: squircle;
    border: none;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    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 .powered-logo {
    height: 0.6rem;
    width: auto;
}

/* ===== 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;
}

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

.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);
    corner-shape: squircle;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    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%;
    corner-shape: squircle;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: white;
}

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

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

.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 {
    opacity: 0;
    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;
    corner-shape: squircle;
    border-bottom-left-radius: 4px;
}

.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-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    corner-shape: squircle;
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.practical-card--full {
    grid-column: 1 / -1;
}

.practical-card--full h3 {
    font-size: 1.25rem;
}

.practical-card--full .practical-content p {
    font-size: 1.05rem;
}

@media (max-width: 600px) {
    .practical-card--full h3 {
        font-size: 1.125rem;
    }

    .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);
    corner-shape: squircle;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

/* Icon hover animations */
.feature-icon,
.practical-icon {
    transition: transform 0.3s ease;
}

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

/* Bounce - location pin drops */
.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); }
}

/* Grow - bar chart bars grow */
.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; }
}

/* Spin - gear rotates */
.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); }
}

/* Pulse - shield/server pulses */
.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); }
}

/* Wobble - monitor shakes */
.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); }
}

/* Refresh - refresh icon rotates */
.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); }
}

/* Flip - coin flips */
.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); }
}

/* Float - box floats up and down */
.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)); /* Padding + radius of image */
    corner-shape: squircle;
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.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);
    corner-shape: squircle;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.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);
}

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

/* Desktop Device */
.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;
}

/* Mobile Device */
.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 (max-width: 900px) {
    .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) {
    .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 (max-width: 420px) {
    .case-study-devices {
        justify-content: flex-end;
    }

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

/* ===== 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-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    corner-shape: squircle;
    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;
}

.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;
}

@media (max-width: 600px) {
    .media-section {
        padding: 4rem 1.5rem;
    }

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

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

/* ===== 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 svg {
    height: 1.75rem;
    width: auto;
    color: white;
}

.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;
}

/* ===== About Page ===== */
.about-hero {
    min-height: calc(100vh - 80px);
    padding: 8rem 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;

    a {
        color: var(--color-primary);
        font-weight: 500;
        &:hover {
            color: var(--color-primary-dark);
        }
    }
}

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

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

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

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

.about-content a {
    color: var(--color-primary);
    /* text-decoration: none; */
    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: 8rem 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);
    corner-shape: squircle;
    box-shadow: var(--shadow-md);
}

.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 {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    corner-shape: squircle;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.mauticform_wrapper {
    width: 100%;
    margin: unset;
}

.mauticform_wrapper .form-group {
    margin-bottom: 1.5rem;
}

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

.mauticform_wrapper label .required {
    color: #dc2626;
}

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

.mauticform_wrapper textarea {
    field-sizing: content;
}

.mauticform_wrapper input:focus,
.mauticform_wrapper textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

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

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

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

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

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

.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: 6rem;
    }

    .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;
    }
}

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

    .hero {
        padding: 7rem 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: 6rem 1rem 3rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}
