/* ============================================
   Smart NFC Landing Page — Apple-style Design
   ============================================ */

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

:root {
    /* Light Mode (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fbfbfd;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.72);
    --nav-border: rgba(0, 0, 0, 0.1);
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: rgba(0, 113, 227, 0.08);
    --gradient-start: #0071e3;
    --gradient-end: #00c7ff;
    --tag-card-bg: #f5f5f7;
    --analytics-bg: #f5f5f7;
    --nfc-illustration-color: #1d1d1f;
    --badge-bg: rgba(0, 113, 227, 0.08);
    --badge-text: #0071e3;
    --code-bg: #f5f5f7;
    --phone-bg: #f9f9f9;
    --phone-header: #1d1d1f;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1d1d1f;
        --bg-tertiary: #0d0d0d;
        --text-primary: #f5f5f7;
        --text-secondary: #a1a1a6;
        --text-tertiary: #86868b;
        --border-color: rgba(255, 255, 255, 0.08);
        --card-bg: #1d1d1f;
        --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.05);
        --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.08);
        --nav-bg: rgba(29, 29, 31, 0.72);
        --nav-border: rgba(255, 255, 255, 0.08);
        --accent: #2997ff;
        --accent-hover: #3ba1ff;
        --accent-light: rgba(41, 151, 255, 0.1);
        --gradient-start: #2997ff;
        --gradient-end: #00d4ff;
        --tag-card-bg: #1d1d1f;
        --analytics-bg: #1d1d1f;
        --nfc-illustration-color: #f5f5f7;
        --badge-bg: rgba(41, 151, 255, 0.12);
        --badge-text: #2997ff;
        --code-bg: #2c2c2e;
        --phone-bg: #1c1c1e;
        --phone-header: #f5f5f7;
    }
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

/* --- Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-in:nth-child(2) { transition-delay: 0.1s; }
.animate-in:nth-child(3) { transition-delay: 0.2s; }
.animate-in:nth-child(4) { transition-delay: 0.3s; }

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--nav-border);
    transition: background 0.3s;
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 32px;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--accent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--tag-card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: scale(1.02);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: 14px;
}

/* --- Section Headers --- */
.section-eyebrow {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 56px;
    }
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 560px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* --- Hero --- */
.hero {
    padding: 120px 0 0;
    text-align: center;
    background: var(--bg-primary);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #30d158;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 80px;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 96px;
    }
}

.hero-title-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 580px;
    margin: 0 auto 32px;
}

.hero-subtitle mark {
    background: none;
    color: var(--text-primary);
    font-weight: 600;
    background-image: linear-gradient(120deg, rgba(0, 113, 227, 0.1) 0%, rgba(0, 199, 255, 0.1) 100%);
    border-radius: 4px;
    padding: 1px 6px;
    margin: 0 -2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 24px;
        max-width: 750px;
    }
}

.hero-actions {
    margin-bottom: 56px;
}

.app-store-badge {
    display: inline-block;
    transition: opacity 0.2s, transform 0.2s;
}

.app-store-badge:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.app-store-badge:active {
    transform: scale(0.97);
}

.app-store-badge img {
    display: block;
    height: 54px;
    width: auto;
}

/* --- Phone Mockup --- */
.hero-phone {
    display: flex;
    justify-content: center;
    perspective: 1000px;
    position: relative;
    z-index: 3;
}

.phone-mockup {
    width: 280px;
    background: var(--phone-bg);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 0 0 1px var(--border-color),
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 6px var(--bg-secondary);
    position: relative;
}

@media (min-width: 768px) {
    .phone-mockup {
        width: 320px;
    }
}

.phone-screen {
    background: var(--bg-primary);
    border-radius: 30px;
    overflow: hidden;
    padding: 20px 16px 80px;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.phone-status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.phone-status-icons svg {
    opacity: 0.8;
}

.phone-app-header {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    padding: 0 4px 16px;
    color: var(--phone-header);
}

.phone-scan-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 16px 0;
}

.phone-contactless {
    margin-bottom: 12px;
}

.contactless-icon {
    display: block;
}

.cl-arc {
    animation: cl-pulse 2.4s ease-in-out infinite;
}

.cl-arc-1 { animation-delay: 0s; }
.cl-arc-2 { animation-delay: 0.15s; }
.cl-arc-3 { animation-delay: 0.3s; }
.cl-arc-4 { animation-delay: 0.45s; }

@keyframes cl-pulse {
    0%, 100% { opacity: 0.15; }
    40% { opacity: 1; }
    80% { opacity: 0.15; }
}

.phone-scan-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.phone-recent {
    padding: 8px 0 0;
}

.phone-recent-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    padding: 0 4px;
}

.phone-tag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 0.5px solid var(--border-color);
}

.phone-tag-item:last-child {
    border-bottom: none;
}

.phone-tag-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.phone-tag-info {
    flex: 1;
    min-width: 0;
}

.phone-tag-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-tag-type {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
}

.phone-tag-time {
    font-size: 11px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* --- Features --- */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
    margin-top: -90px;
}

@media (min-width: 768px) {
    .features {
        padding: 140px 0;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.feature-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    transition: box-shadow 0.3s, transform 0.3s;
    box-shadow: var(--card-shadow);
}

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

.feature-card-icon {
    margin-bottom: 20px;
}

.feature-card-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Compatibility --- */
.compatibility {
    padding: 100px 0;
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .compatibility {
        padding: 140px 0;
    }
}

.compat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 48px;
}

@media (min-width: 640px) {
    .compat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .compat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.compat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.compat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .compat-card:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }
}

.compat-icon {
    margin-bottom: 20px;
}

.compat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #0071e3, #00c7ff);
    color: #fff;
}

.compat-badge-mifare {
    background: linear-gradient(135deg, #5e5ce6, #bf5af2);
}

.compat-badge-iso {
    background: linear-gradient(135deg, #30d158, #63e085);
    font-size: 13px;
}

.compat-badge-felica {
    background: linear-gradient(135deg, #ff375f, #ff6482);
}

.compat-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.compat-standard {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.compat-desc {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.compat-footnote {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 32px;
}

/* --- Smart Tags --- */
.smart-tags {
    padding: 100px 0;
    background: var(--bg-primary);
}

@media (min-width: 768px) {
    .smart-tags {
        padding: 140px 0;
    }
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .tags-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .tags-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tag-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--tag-card-bg);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background 0.3s;
    position: relative;
}

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

.tag-type-card:active {
    transform: scale(0.94);
    transition-duration: 0.1s;
}

/* Icon bounce on select */
.tag-type-card .tag-type-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag-type-card.selected .tag-type-icon {
    transform: scale(1.15);
}

.tag-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tag-color) 12%, transparent);
    color: var(--tag-color);
}

.tag-type-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.tag-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: var(--badge-bg);
    padding: 3px 8px;
    border-radius: 6px;
}

/* --- Segmented Control --- */
.segment-control {
    display: inline-flex;
    position: relative;
    background: var(--tag-card-bg);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
}

.segment-btn {
    position: relative;
    z-index: 1;
    padding: 7px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.25s;
    -webkit-user-select: none;
    user-select: none;
}

.segment-btn.active {
    color: var(--text-primary);
}

.segment-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 3px);
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.segment-control[data-active="classic"] .segment-slider {
    transform: translateX(100%);
}

/* --- Disabled card (not available in current tab) --- */
.tag-type-card.tag-disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
    transform: scale(0.96);
    transition: opacity 0.35s, filter 0.35s, transform 0.35s;
}

.tag-type-card.tag-disabled .tag-type-icon {
    transform: none;
}

/* --- How It Works --- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-primary);
}

@media (min-width: 768px) {
    .how-it-works {
        padding: 140px 0;
    }
}

.steps-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .steps-grid {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
}

.step-card {
    text-align: center;
    padding: 32px;
    max-width: 280px;
    width: 100%;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    background: var(--accent);
    color: #ffffff;
    margin: 0 auto 16px;
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-connector {
    color: var(--text-tertiary);
    display: none;
}

@media (min-width: 768px) {
    .step-connector {
        display: flex;
        align-items: center;
        padding-bottom: 60px;
    }
}

/* --- Analytics --- */
.analytics-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .analytics-section {
        padding: 140px 0;
    }
}

.analytics-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

@media (min-width: 768px) {
    .analytics-layout {
        flex-direction: row;
        align-items: center;
        gap: 64px;
    }
}

.analytics-text {
    flex: 1;
}

.analytics-text .section-title {
    text-align: left;
}

.analytics-text .section-subtitle {
    text-align: left;
}

.analytics-features {
    list-style: none;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.analytics-visual {
    flex: 1;
    max-width: 400px;
    width: 100%;
}

.analytics-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.analytics-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.analytics-card-period {
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--tag-card-bg);
    padding: 3px 10px;
    border-radius: 6px;
}

.analytics-card-value {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.analytics-card-change {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.analytics-card-change.positive {
    color: #30d158;
}

.analytics-chart {
    margin-bottom: 8px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.chart-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-line 2s ease forwards;
}

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

.analytics-days {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-tertiary);
}

.analytics-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.analytics-mini {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--card-shadow);
}

.analytics-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-mini-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.analytics-mini-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* --- Buy Tags --- */
.buy-tags {
    padding: 100px 0;
    background: var(--bg-primary);
}

@media (min-width: 768px) {
    .buy-tags {
        padding: 140px 0;
    }
}

.buy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .buy-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.buy-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: box-shadow 0.3s, transform 0.3s;
}

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

.buy-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 12px;
    background: var(--accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 8px;
    z-index: 1;
}

.buy-card-badge-alt {
    background: #5e5ce6;
}

.buy-card-visual {
    padding: 40px 24px;
    background: var(--tag-card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nfc-tag-illustration {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--nfc-illustration-color);
}

.nfc-tag-circle {
    width: 120px;
    height: 120px;
}

.nfc-tag-coil {
    width: 100%;
    height: 100%;
}

.nfc-tag-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.nfc-tag-215 {
    transform: scale(1.1);
}

.buy-card-content {
    padding: 28px 24px 24px;
}

.buy-card-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.buy-card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.buy-card-specs {
    margin-bottom: 24px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border-color);
    font-size: 14px;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.buy-card-actions {
    display: flex;
    gap: 10px;
}

.buy-card-actions .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
}

.buy-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    background: var(--tag-card-bg);
    border-radius: 14px;
    color: var(--text-secondary);
}

.buy-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.buy-note p {
    font-size: 14px;
    line-height: 1.6;
}

/* --- Download CTA --- */
.download-section {
    padding: 100px 0;
    background: var(--bg-secondary);
    text-align: center;
}

@media (min-width: 768px) {
    .download-section {
        padding: 140px 0;
    }
}

.download-content {
    max-width: 560px;
    margin: 0 auto;
}

.download-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .download-title {
        font-size: 48px;
    }
}

.download-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-lang {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236e6e73' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.footer-lang:hover,
.footer-lang:focus {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* --- Legal Pages --- */
.legal-page {
    padding: 120px 0 80px;
    background: var(--bg-primary);
}

.legal-container {
    max-width: 720px;
}

.legal-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .legal-title {
        font-size: 48px;
    }
}

.legal-meta {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.legal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 16px;
    letter-spacing: -0.02em;
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.legal-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.legal-content ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.legal-content li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.legal-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 640px) {
    .legal-table {
        font-size: 13px;
    }

    .legal-table th,
    .legal-table td {
        padding: 10px 8px;
    }
}

.legal-effective {
    margin-top: 40px;
    font-style: italic;
    color: var(--text-tertiary);
}

/* --- Contact Form --- */
.contact-form {
    margin-top: 8px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.form-submit:hover {
    background: var(--accent-hover, #0077ED);
}

.form-submit:active {
    transform: scale(0.97);
}

/* --- Tags layout (grid + detail panel) --- */
.tag-type-card[data-desc] {
    cursor: pointer;
}

.tag-type-card.selected {
    box-shadow: 0 0 0 2px var(--accent);
    background: var(--accent-light);
    transform: translateY(-4px);
}

.tag-type-card.selected:active {
    transform: scale(0.94);
}

.tags-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .tags-layout {
        flex-direction: row;
        align-items: stretch;
        gap: 28px;
    }

    .tags-layout > .tags-grid {
        flex: 1;
        min-width: 0;
    }

    .tags-layout > .tag-detail {
        width: 280px;
        flex-shrink: 0;
    }
}

@media (min-width: 1024px) {
    .tags-layout > .tag-detail {
        width: 320px;
    }
}

/* --- Tag detail panel --- */
.tag-detail {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Desktop: panel is always visible, stretches to grid height */
@media (min-width: 768px) {
    .tag-detail {
        opacity: 0;
        transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .tag-detail.active {
        opacity: 1;
    }
}

/* Mobile: detail is inline inside grid, collapses when hidden */
@media (max-width: 767px) {
    .tag-detail {
        grid-column: 1 / -1;
        max-height: 0;
        padding: 0 28px;
        overflow: hidden;
        opacity: 0;
        box-shadow: none;
        border: 1px solid var(--border-color);
        transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .tag-detail.active {
        max-height: 300px;
        padding: 24px 28px;
        opacity: 1;
    }
}

.tag-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag-detail.swapping .tag-detail-icon,
.tag-detail.swapping .tag-detail-title,
.tag-detail.swapping .tag-detail-desc {
    animation: detail-swap 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes detail-swap {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.tag-detail-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tag-detail-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tag-detail-desc.desc-out {
    opacity: 0;
    transform: translateY(5px);
}

/* --- Selection color --- */
::selection {
    background: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
