* {
    box-sizing: border-box;
}

:root {
    color-scheme: light !important;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    background: #fafafa;
    color: #111111;
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    overflow-x: hidden;
}
html,
body {
    max-width: 100%;
}
input,
textarea,
select {
    font-size: 16px !important;
}
::selection {
    background: #111111;
    color: #ffffff;
}
.container-main {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
    max-width: 100%;
}
.glass-header {
    background: rgba(250, 250, 250, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.hero-grid {
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}
.hero-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 999px;
    background: radial-gradient(
        circle,
        rgba(17, 17, 17, 0.045) 0%,
        rgba(17, 17, 17, 0) 68%
    );
    pointer-events: none;
}
.builder-shadow {
    box-shadow:
        0 20px 60px rgba(17, 17, 17, 0.07),
        0 4px 12px rgba(17, 17, 17, 0.035);
}
.soft-shadow {
    box-shadow: 0 10px 35px rgba(17, 17, 17, 0.045);
}
.tab-active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}
.tab-inactive {
    background: #ffffff;
    color: #111111;
    border-color: #eaeaea;
}
.prompt-textarea {
    resize: none;
    outline: none;
}
.prompt-textarea:focus {
    border-color: #111111;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.045);
}
.suggestion-chip {
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        opacity 0.3s ease;
}
.suggestion-chip:hover {
    transform: translateY(-1px);
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}
.feature-card,
.template-card,
.pricing-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}
.feature-card:hover,
.template-card:hover {
    transform: translateY(-4px);
    border-color: #d5d5d5;
    box-shadow: 0 18px 45px rgba(17, 17, 17, 0.07);
}
.template-preview {
    transition: transform 0.5s ease;
}
.template-card:hover .template-preview {
    transform: scale(1.025);
}
.template-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.template-card:hover .template-overlay {
    opacity: 1;
}
.pricing-popular {
    box-shadow: 0 20px 60px rgba(17, 17, 17, 0.11);
}
.toggle-track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #111111;
    padding: 3px;
    transition: background 0.2s ease;
}
.toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: white;
    transform: translateX(18px);
    transition: transform 0.2s ease;
}
.toggle-off .toggle-thumb {
    transform: translateX(0);
}
.code-editor {
    font-family:
        "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.code-lines {
    counter-reset: line;
}
.code-line {
    display: flex;
    min-height: 23px;
}
.line-number {
    width: 42px;
    flex-shrink: 0;
    color: #a0a0a0;
    text-align: right;
    padding-right: 16px;
    user-select: none;
}
.line-content {
    color: #242424;
    white-space: pre;
}
.drop-active {
    border-color: #111111 !important;
    background: #f3f3f3 !important;
}
.mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease;
}
.mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}
.hero-item {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(7px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
body.loaded .hero-item {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}
.hero-header {
    transition-delay: 0ms;
}
.hero-badge {
    transition-delay: 150ms;
}
.hero-title {
    transition-delay: 250ms;
}
.hero-description {
    transition-delay: 400ms;
}
.hero-tabs {
    transition-delay: 550ms;
}
.hero-builder {
    transition-delay: 650ms;
}
#promptGate {
    transition:
        opacity 0.45s ease,
        transform 0.45s ease,
        max-height 0.45s ease,
        margin 0.45s ease;
}
#promptGate.copied {
    opacity: 0.72;
}
#codeBuilder.builder-unlocked {
    animation: builderReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes builderReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.sparkle-animation {
    animation: sparkle 3s ease-in-out infinite;
}
@keyframes sparkle {
    0%,
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(17, 17, 17, 0.2));
    }
    25% {
        transform: rotate(5deg) scale(1.1);
        opacity: 0.9;
        filter: drop-shadow(0 0 8px rgba(17, 17, 17, 0.3));
    }
    50% {
        transform: rotate(-3deg) scale(1.05);
        opacity: 0.8;
        filter: drop-shadow(0 0 4px rgba(17, 17, 17, 0.15));
    }
    75% {
        transform: rotate(8deg) scale(1.08);
        opacity: 0.95;
        filter: drop-shadow(0 0 6px rgba(17, 17, 17, 0.25));
    }
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.template-browser {
    background: #f3f3f3;
}
.browser-top {
    height: 28px;
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
}
.browser-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d1d1;
}
.mini-hero {
    background: linear-gradient(135deg, #ffffff 0%, #eeeeee 100%);
}
.mini-line {
    height: 6px;
    border-radius: 999px;
    background: #cfcfcf;
}
.mini-line.dark {
    background: #222222;
}
.mini-block {
    border-radius: 8px;
    background: #dddddd;
}
.section-label {
    letter-spacing: 0.08em;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}
.float-animation {
    animation: float 4s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(17, 17, 17, 0);
    }
}
.pulse-animation {
    animation: pulse 2s infinite;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.mobile-menu.open .mobile-link {
    animation: slideUp 0.4s ease both;
}
.mobile-menu.open .mobile-link:nth-child(1) {
    animation-delay: 0.05s;
}
.mobile-menu.open .mobile-link:nth-child(2) {
    animation-delay: 0.1s;
}
.mobile-menu.open .mobile-link:nth-child(3) {
    animation-delay: 0.15s;
}
.mobile-menu.open .mobile-link:nth-child(4) {
    animation-delay: 0.2s;
}
.mobile-menu.open .mobile-link:nth-child(5) {
    animation-delay: 0.25s;
}
.mobile-menu.open .mobile-link:nth-child(6) {
    animation-delay: 0.3s;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.template-card.animate-in {
    animation: fadeInUp 0.6s ease both;
}
@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}
.shake-animation {
    animation: shake 0.3s ease;
}
@media (max-width: 767px) {
    .container-main {
        width: min(100% - 28px, 1200px);
        max-width: 100%;
    }
    .hero-grid {
        background-size: 32px 32px;
    }
    /* iOS right space fix */
    html,
    body {
        overflow-x: hidden;
    }
    #siteHeader {
        width: 100%;
        max-width: 100%;
    }
    .glass-header {
        width: 100%;
        max-width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .hero-item {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* Typing effect with gradient colors */
.typing-wrapper {
    display: inline-block;
    vertical-align: bottom;
    min-width: 1ch;
}
.typing-text {
    display: inline-block;
    background: linear-gradient(
        135deg,
        #111111 0%,
        #2d2d2d 40%,
        #4a4a4a 70%,
        #6b6b6b 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: #111;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.9s step-end infinite;
}
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}
.typing-word {
    display: inline-block;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 700;
}
/* fix for absolute positioned glow causing overflow */
.hero-glow {
    max-width: 100vw;
}
.card-x {
    box-shadow:
        0rem 0.3125rem 0.3125rem -0.15625rem rgba(0, 0, 0, 0.03),
        0rem 0.1875rem 0.1875rem -0.09375rem rgba(0, 0, 0, 0.02),
        0rem 0.125rem 0.125rem -0.0625rem rgba(0, 0, 0, 0.02),
        0rem 0.0625rem 0.0625rem -0.03125rem rgba(0, 0, 0, 0.03),
        0rem 0.03125rem 0.03125rem rgba(0, 0, 0, 0.04),
        0rem 0rem 0rem 0.0625rem rgba(0, 0, 0, 0.06) !important;
    border: none;
}
