/* Global Styles */

body {
    opacity: 0;
    animation: pageFadeIn 0.25s ease-out forwards;
    margin: 0;
    padding: 0;
    font-family: Sour Gummy, sans-serif;
    background: #F7F3FF; /* soft lavender */
    color: #5A3E85; /* deep purple */
}

@keyframes pageFadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.landing-html {
height: 100%;
}

body.landing-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.header {
    padding: 24px 16px;
    text-align: center;
    color: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Create Page */

/* Header */

.create-page .header {
    background: linear-gradient(135deg, #C7A4FF, #E4D4FF);
}

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

.header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.header p {
    margin: 6px 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Main Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Section Titles */

h2 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    padding-left: 4px;
}

/* Theme Selector */

/* Scroll container */
.theme-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 12px;
    scroll-snap-type: x mandatory;
}

/* Smooth scrolling momentum */
.theme-scroll::-webkit-scrollbar {
    display: none;
}

/* Base tile styling */
.theme-thumb,
.theme-scroll img {
    width: 90px;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid transparent;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    flex-shrink: 0;
    scroll-snap-align: start;

    /* Animation */
    transition: 
        transform 0.15s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Hover lift (desktop only) */
@media (hover: hover) {
    .theme-thumb:hover,
    .theme-scroll img:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.18);
    }
}

/* Tap feedback (mobile) */
.theme-thumb:active,
.theme-scroll img:active {
    transform: scale(0.94);
    opacity: 0.9;
}

/* Selection state */
.theme-thumb.selected,
.theme-scroll img.selected {
    border-color: #5A3E85;
    box-shadow: 0 0 0 3px rgba(90, 62, 133, 0.4), 0 4px 10px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Selection pop animation */
.theme-thumb.selected,
.theme-scroll img.selected {
    animation: themeSelectPop 0.18s ease-out;
}

@keyframes themeSelectPop {
    0% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Micro-ripple on tap */
.theme-thumb::after,
.theme-scroll img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.35s ease-out, opacity 0.45s ease-out;
    pointer-events: none;
}

.theme-thumb:active::after,
.theme-scroll img:active::after {
    transform: scale(3);
    opacity: 1;
}

/* Form Section */

.form-card {
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-card input {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #C7A4FF;
    font-size: 1rem;
    background: #FBF9FF;
    color: #5A3E85;
}

/* Preview Section */

.preview-card {
    background: white;
    padding: 12px;
    margin-bottom: 170px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

canvas {
    width: 100%;
    border-radius: 12px;
}

/* Download Button */

.button-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0 16px 16px;
    box-sizing: border-box;
}

.download-btn,
.removeWatermark-btn {
    max-width: 480px;
    width: 100%;
    padding: 18px;
    background: #5A3E85;
    color: white;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 16px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.15);

    /* animation */
    transition: transform 0.08s ease-out, box-shadow 0.12s ease-out;
    transform: translateZ(0); /* prevents flicker on mobile */
    -webkit-tap-highlight-color: rgba(255,255,255,0.1);
    touch-action: manipulation; /* ensures fast taps */
}

.download-btn:active,
.removeWatermark-btn:active {
    transform: scale(0.96);
    box-shadow: 0 0 4px rgba(0,0,0,0.25) inset;
}

.download-btn:hover,
.removeWatermark-btn:hover {
    transform: scale(0.985);
}


/* Landing Page */

/* Landing Page Header */

.landing-page .header {
    background: #F7F3FF; /* same as body for seamless blend */
    padding: 24px 16px 32px;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;

    /* soft shadow to echo the create page header, but lighter */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);

    /* subtle gradient highlight at the bottom */
    background-image: linear-gradient(
        to bottom,
        rgba(199, 164, 255, 0.12),
        rgba(247, 243, 255, 0.0)
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.landing-page .logo svg {
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Hero Section */

.hero {
    text-align: center;
    padding: 60px 16px 40px;
}

.hero h1 {
    font-size: 2rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 8px;
}

/* Call to action */

.cta {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 24px;
    background: #5A3E85;
    color: white;
    border-radius: 16px;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.15);

    transition: transform 0.08s ease-out, box-shadow 0.12s ease-out;
    transform: translateZ(0); /* prevents flicker on mobile */
    -webkit-tap-highlight-color: rgba(255,255,255,0.1);
    touch-action: manipulation; /* ensures fast taps */
}

.cta:active {
    transform: scale(0.96);
    box-shadow: 0 0 4px rgba(0,0,0,0.25) inset;
}

.cta:hover {
  background: #6b4a9b;
}

/* How It Works section */

.how-it-works {
    padding: 32px 16px;
    text-align: center;
}

.how-it-works h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    padding-left: 4px;
    color: #5A3E85; /* deep purple */
}

.how-it-works ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.how-it-works li {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 12px 14px;
    margin: 10px auto;
    font-size: 1rem;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    max-width: 480px;
}

/* Footer */

footer {
    padding: 24px 16px 32px;
    min-height: 120px;
    background-size: 100% 100%;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(90, 62, 133, 0.8);
    margin-top: auto;
    background:
        linear-gradient(
            to top,
            rgba(199, 164, 255, 0.18) 0%,
            rgba(228, 212, 255, 0.10) 30%,
            #F7F3FF 70%
        );
}

footer p {
    margin: 4px 0;
}

/* policy docs */

.policy-text {
    padding-left: 30px;
    padding-right: 30px;
}