@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
    --page-bg: #f6f6f3;
    --surface: #ffffff;
    --surface-soft: #fafaf8;
    --text: #18181b;
    --text-secondary: #626268;
    --text-muted: #8b8b91;
    --border: #e7e7e2;
    --border-strong: #d6d6cf;
    --brand: #242426;
    --brand-deep: #18181b;
    --brand-soft: #eeeeea;
    --brand-rgb: 36, 36, 38;
    --focus: #2563eb;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.04), 0 8px 28px rgba(20, 20, 18, 0.04);
    --shadow-md: 0 18px 45px rgba(20, 20, 18, 0.1);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.product-password {
    --page-bg: #f4f7fc;
    --brand: #2563eb;
    --brand-deep: #1746a2;
    --brand-soft: #eaf1ff;
    --brand-rgb: 37, 99, 235;
    --border: #e1e7f1;
}

body.product-storage {
    --page-bg: #fffaf1;
    --brand: #d97706;
    --brand-deep: #a84e06;
    --brand-soft: #fff0d5;
    --brand-rgb: 217, 119, 6;
    --border: #f0e4d1;
}

body.product-digital {
    --page-bg: #f7f6ff;
    --brand: #6366f1;
    --brand-deep: #4338ca;
    --brand-soft: #ececff;
    --brand-rgb: 99, 102, 241;
    --border: #e4e3f2;
}

body.product-countdown {
    --page-bg: #fff8f4;
    --brand: #ef6b5b;
    --brand-deep: #b8443c;
    --brand-soft: #ffebe4;
    --brand-rgb: 239, 107, 91;
    --border: #f1ddd6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.product-detail {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.95) 0, transparent 30rem),
        var(--page-bg);
    color: var(--text);
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
.screenshots-container:focus-visible {
    outline: 3px solid rgba(var(--brand-rgb), 0.28);
    outline-offset: 3px;
}

.back-button {
    position: absolute;
    z-index: 3;
    top: 24px;
    left: max(24px, calc((100vw - 1160px) / 2));
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 9px;
    padding: 10px 15px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(24, 24, 27, 0.1);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.back-button i {
    font-size: 12px;
    transition: transform 180ms var(--ease);
}

.back-button:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.back-button:hover i {
    transform: translateX(-2px);
}

.product-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: grid;
    place-items: center;
    padding: 94px 24px 82px;
    text-align: center;
    background:
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.94)),
        radial-gradient(circle at 50% -20%, rgba(var(--brand-rgb), 0.22) 0, transparent 58%);
    border-bottom: 1px solid var(--border);
}

.product-hero::before,
.product-hero::after {
    position: absolute;
    border: 1px solid rgba(var(--brand-rgb), 0.1);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.product-hero::before {
    top: -240px;
    left: -180px;
    width: 520px;
    height: 520px;
    box-shadow: 0 0 0 70px rgba(var(--brand-rgb), 0.025), 0 0 0 140px rgba(var(--brand-rgb), 0.015);
}

.product-hero::after {
    right: -170px;
    bottom: -280px;
    width: 480px;
    height: 480px;
    box-shadow: 0 0 0 60px rgba(var(--brand-rgb), 0.022), 0 0 0 120px rgba(var(--brand-rgb), 0.014);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
}

.logo-shell {
    display: inline-grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin-bottom: 26px;
    background: var(--surface);
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 28px;
    box-shadow: 0 18px 44px rgba(var(--brand-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: rotate(-2deg);
}

.product-storage .logo-shell {
    transform: rotate(2deg);
}

.product-digital .logo-shell {
    border-radius: 32px;
    transform: rotate(0);
}

.product-countdown .logo-shell {
    border-radius: 32px;
    transform: rotate(-2deg);
}

.product-countdown .product-logo {
    border-radius: 22px;
}

.countdown-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.countdown-hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    gap: 7px;
    padding: 7px 11px;
    color: var(--brand-deep);
    background: rgba(var(--brand-rgb), 0.1);
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.detail-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    padding: 10px 16px;
    color: var(--brand-deep);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(var(--brand-rgb), 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms var(--ease), background-color 180ms ease, border-color 180ms ease;
}

.detail-actions a:hover {
    background: #ffffff;
    border-color: rgba(var(--brand-rgb), 0.42);
    transform: translateY(-2px);
}

.local-first-panel {
    display: grid;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
    background: var(--brand-soft);
    border: 1px solid rgba(var(--brand-rgb), 0.15);
    border-radius: var(--radius-md);
}

.local-first-panel-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--brand-deep);
    background: #ffffff;
    border-radius: 16px;
    font-size: 21px;
}

.local-first-panel h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 18px;
}

.local-first-panel p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.product-logo {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 20px;
}

.eyebrow,
.section-kicker {
    display: block;
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.product-hero h1 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(38px, 6vw, 54px);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.product-hero .hero-description {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.85;
}

.hero-action,
.beta-badge {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    gap: 8px;
    margin-top: 22px;
    padding: 9px 15px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, transform 180ms var(--ease);
}

.hero-action:hover {
    color: var(--brand-deep);
    background: rgba(var(--brand-rgb), 0.14);
    transform: translateY(-1px);
}

.product-main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 20px;
}

.product-section {
    margin-bottom: 32px;
    padding: clamp(28px, 5vw, 52px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.section-heading {
    max-width: 620px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading h2,
.contact-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(25px, 3.2vw, 32px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.section-heading p,
.contact-copy p {
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.download-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--brand-deep), var(--brand));
    border-color: transparent;
    box-shadow: 0 22px 55px rgba(var(--brand-rgb), 0.2);
}

.download-section::before {
    position: absolute;
    top: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
    content: '';
    pointer-events: none;
}

.download-section .section-heading,
.download-grid,
.coming-soon {
    position: relative;
}

.download-section .section-kicker,
.download-section .section-heading p {
    color: rgba(255, 255, 255, 0.7);
}

.download-section .section-heading h2,
.download-section .coming-soon {
    color: #ffffff;
}

.download-grid {
    display: grid;
    max-width: 820px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.download-card {
    display: grid;
    align-items: center;
    min-height: 72px;
    padding: 12px 15px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: background-color 180ms ease, transform 180ms var(--ease), box-shadow 180ms ease;
}

.download-card:hover {
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
}

.download-card:active {
    transform: translateY(0) scale(0.99);
}

.download-card-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.download-card-title {
    font-size: 15px;
    font-weight: 700;
}

.download-card-badge {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.download-card-arrow {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 180ms var(--ease);
}

.download-card:hover .download-card-arrow {
    transform: translateX(3px);
}

.coming-soon {
    margin: 0;
    padding: 12px 0;
    text-align: center;
}

.screenshots-section {
    overflow: hidden;
    padding-right: 0;
    padding-left: 0;
}

.screenshots-section .section-heading {
    padding: 0 clamp(28px, 5vw, 52px);
}

.screenshots-container {
    display: flex;
    overflow-x: auto;
    gap: 22px;
    padding: 10px clamp(28px, 5vw, 52px) 32px;
    scroll-padding-inline: clamp(28px, 5vw, 52px);
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(var(--brand-rgb), 0.35) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.screenshots-container::-webkit-scrollbar {
    height: 7px;
}

.screenshots-container::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-container::-webkit-scrollbar-thumb {
    background: rgba(var(--brand-rgb), 0.35);
    border-radius: 999px;
}

.screenshot {
    flex: 0 0 auto;
    width: clamp(220px, 25vw, 270px);
    height: auto;
    object-fit: cover;
    background: var(--surface-soft);
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 28px;
    box-shadow: 0 14px 34px rgba(24, 24, 27, 0.12);
    scroll-snap-align: start;
    transition: transform 220ms var(--ease), box-shadow 220ms ease;
}

.screenshot:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}

.scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.features-section,
.reviews-section {
    background: rgba(255, 255, 255, 0.8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    position: relative;
    min-height: 220px;
    padding: 28px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 200ms ease, transform 200ms var(--ease), box-shadow 200ms ease;
}

.feature-card:hover {
    border-color: rgba(var(--brand-rgb), 0.3);
    box-shadow: 0 14px 30px rgba(var(--brand-rgb), 0.08);
    transform: translateY(-3px);
}

.feature-card::after {
    position: absolute;
    right: -28px;
    bottom: -36px;
    width: 110px;
    height: 110px;
    background: var(--brand-soft);
    border-radius: 50%;
    content: '';
    opacity: 0.55;
}

.feature-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 28px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-radius: 14px;
    font-size: 20px;
}

.feature-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 9px;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feature-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.review-card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.review-stars {
    margin-bottom: 18px;
    color: var(--brand);
    font-size: 12px;
    letter-spacing: 0.15em;
}

.review-text {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.review-author {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.contact-section {
    display: grid;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--brand-deep), var(--brand));
    border-radius: 20px;
    font-size: 22px;
    box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.22);
}

.contact-copy .section-kicker {
    margin-bottom: 6px;
}

.contact-copy h2 {
    font-size: clamp(22px, 2.6vw, 28px);
}

.contact-links {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
}

.contact-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.contact-links a:hover {
    color: var(--brand-deep);
    background: var(--surface);
    border-color: rgba(var(--brand-rgb), 0.32);
}

.contact-links i {
    width: 18px;
    color: var(--brand);
    text-align: center;
}

.product-footer {
    margin-top: 48px;
    padding: 32px 20px 40px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 10px;
}

.footer-legal a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 160ms ease;
}

.footer-legal a:hover {
    color: var(--brand-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal .legal-divider {
    color: var(--border-strong);
    user-select: none;
}

.product-footer p {
    margin: 0;
    font-size: 13px;
}

@media (max-width: 900px) {
    .features-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-section {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .contact-links {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .product-hero {
        min-height: 0;
        padding: 84px 20px 58px;
    }

    .product-hero::before,
    .product-hero::after {
        display: none;
    }

    .logo-shell {
        width: 94px;
        height: 94px;
        margin-bottom: 22px;
        border-radius: 24px;
    }

    .product-logo {
        width: 72px;
        height: 72px;
    }

    .product-hero h1 {
        font-size: 38px;
    }

    .product-hero .hero-description {
        font-size: 15px;
        line-height: 1.75;
    }

    .back-button {
        top: 16px;
        left: 16px;
        min-height: 42px;
        padding: 9px 13px;
        font-size: 13px;
    }

    .product-main {
        width: min(100% - 24px, 1120px);
        padding-top: 28px;
    }

    .product-section {
        margin-bottom: 18px;
        padding: 30px 20px;
        border-radius: 22px;
    }

    .section-heading {
        margin-bottom: 26px;
    }

    .section-heading h2,
    .contact-copy h2 {
        font-size: 24px;
    }

    .download-grid,
    .features-grid,
    .reviews-grid,
    .contact-links {
        grid-template-columns: 1fr;
    }

    .screenshots-section {
        padding-right: 0;
        padding-left: 0;
    }

    .screenshots-section .section-heading {
        padding: 0 20px;
    }

    .screenshots-container {
        gap: 16px;
        padding: 6px 20px 24px;
        scroll-padding-inline: 20px;
    }

    .screenshot {
        width: min(72vw, 250px);
        border-radius: 24px;
    }

    .scroll-hint {
        display: flex;
    }

    .feature-card {
        min-height: 0;
        padding: 24px;
    }

    .feature-icon {
        margin-bottom: 22px;
    }

    .contact-section {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .contact-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto;
        border-radius: 18px;
    }

    .contact-links {
        grid-column: auto;
    }

    .local-first-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .local-first-panel-icon {
        margin: 0 auto;
    }

    .product-footer {
        margin-top: 28px;
        padding-bottom: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
