/* ==============================================================
   SHARE123 — CORE DESIGN SYSTEM
   Homepage, Header, Footer, Global styles
   ============================================================== */

:root {
    --s-primary: #0f1729;
    --s-primary-light: #1a2540;
    --s-primary-lighter: #2a3758;
    --s-accent: #ff5722;
    --s-accent-hover: #e64a19;
    --s-accent-glow: rgba(255, 87, 34, 0.15);
    --s-accent-soft: #fff3ef;
    --s-success: #00c853;
    --s-success-bg: #e8f5e9;
    --s-warning: #ffab00;
    --s-danger: #ff1744;
    --s-info: #2979ff;
    --s-g50: #f8fafd;
    --s-g100: #f0f3f8;
    --s-g200: #e1e6ef;
    --s-g300: #c5cdd9;
    --s-g400: #8b95a5;
    --s-g500: #5f6b7a;
    --s-g600: #3d4756;
    --s-g700: #2a3342;
    --s-g800: #1a2332;
    --s-white: #ffffff;
    --s-radius-sm: 8px;
    --s-radius: 14px;
    --s-radius-lg: 20px;
    --s-radius-xl: 28px;
    --s-shadow: 0 2px 8px rgba(15, 23, 41, 0.06), 0 1px 3px rgba(15, 23, 41, 0.04);
    --s-shadow-md: 0 8px 24px rgba(15, 23, 41, 0.08), 0 2px 8px rgba(15, 23, 41, 0.04);
    --s-shadow-lg: 0 16px 48px rgba(15, 23, 41, 0.1);
    --s-shadow-accent: 0 8px 32px rgba(255, 87, 34, 0.25);
    --s-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Be Vietnam Pro', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--s-g700);
    background: var(--s-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: var(--s-transition); }
a:hover { color: var(--s-accent); }
img { max-width: 100%; height: auto; display: block; }
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ===== LAYOUT ===== */
.s-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 768px) {
    .s-container { padding: 0 16px; }
}

/* ==============================================================
   HEADER
   ============================================================== */
.s-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid var(--s-g200);
}
.s-header__inner {
    display: flex;
    align-items: center;
    gap: 48px;
    height: 72px;
}
.s-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--s-primary);
    letter-spacing: -0.5px;
}
.s-header__brand-icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--s-accent), var(--s-accent-hover));
    color: white;
    font-weight: 900;
    font-size: 18px;
    box-shadow: var(--s-shadow-accent);
}
.s-header__brand-icon::before { content: 'S'; }
.s-header__brand-accent { color: var(--s-accent); }
.s-header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}
.s-header__nav a {
    font-weight: 600;
    font-size: 14px;
    color: var(--s-g600);
    position: relative;
    padding: 4px 0;
}
.s-header__nav a:hover { color: var(--s-primary); }
.s-header__nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--s-accent);
    transition: var(--s-transition);
    transform: translateX(-50%);
}
.s-header__nav a:hover::after { width: 100%; }
.s-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.s-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--s-radius);
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: var(--s-transition);
    white-space: nowrap;
}
.s-btn--primary {
    background: var(--s-accent);
    color: white;
    box-shadow: var(--s-shadow-accent);
}
.s-btn--primary:hover {
    background: var(--s-accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 87, 34, 0.35);
}
.s-btn--ghost {
    background: transparent;
    color: var(--s-g700);
    border: 1.5px solid var(--s-g300);
}
.s-btn--ghost:hover {
    border-color: var(--s-primary);
    color: var(--s-primary);
}
.s-btn--lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--s-radius-lg);
}
.s-btn--dark {
    background: var(--s-primary);
    color: white;
}
.s-btn--dark:hover {
    background: var(--s-primary-light);
    color: white;
    transform: translateY(-2px);
}
.s-header__hamburger {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--s-primary);
}
@media (max-width: 960px) {
    .s-header__nav { display: none; }
    .s-header__hamburger { display: flex; }
    .s-header__actions .s-btn--ghost { display: none; }
    .s-header__inner { gap: 16px; }
}
/* Mobile menu drawer */
.s-mobile-menu {
    position: fixed;
    inset: 72px 0 0 0;
    background: white;
    z-index: 99;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.s-mobile-menu.open { display: flex; }
.s-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--s-radius);
    font-weight: 600;
    color: var(--s-g700);
    transition: var(--s-transition);
}
.s-mobile-menu a:hover {
    background: var(--s-g50);
    color: var(--s-accent);
}
.s-mobile-menu a .material-symbols-outlined {
    color: var(--s-accent);
}

/* ==============================================================
   HOMEPAGE — HERO
   ============================================================== */
.s-hero {
    position: relative;
    overflow: hidden;
    background: var(--s-primary);
    color: white;
    padding: 80px 0 120px;
}
.s-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 87, 34, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(41, 121, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}
.s-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.s-hero__content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.s-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(255, 87, 34, 0.15);
    border: 1px solid rgba(255, 87, 34, 0.3);
    color: #ffab91;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 24px;
}
.s-hero__badge .material-symbols-outlined { font-size: 16px; }
.s-hero__title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
}
.s-hero__title .accent {
    background: linear-gradient(135deg, #ff5722, #ffab91);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.s-hero__desc {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.75);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.s-hero__search {
    max-width: 600px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 8px 8px 8px 24px;
    backdrop-filter: blur(20px);
    transition: var(--s-transition);
}
.s-hero__search:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 87, 34, 0.5);
}
.s-hero__search .material-symbols-outlined { color: rgba(255, 255, 255, 0.7); }
.s-hero__search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: inherit;
    font-size: 16px;
    padding: 8px 0;
}
.s-hero__search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.s-hero__stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.s-hero__stat strong {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 6px;
}
.s-hero__stat span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==============================================================
   HOMEPAGE — MODULES GRID
   ============================================================== */
.s-section {
    padding: 100px 0;
}
.s-section--gray {
    background: var(--s-g50);
}
.s-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}
.s-section-label {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--s-accent-soft);
    color: var(--s-accent);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.s-section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: var(--s-primary);
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin: 0 0 16px;
}
.s-section-desc {
    font-size: 17px;
    color: var(--s-g500);
    line-height: 1.6;
    margin: 0;
}

/* Modules grid */
.s-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.s-module {
    position: relative;
    display: block;
    padding: 32px;
    background: white;
    border: 1px solid var(--s-g200);
    border-radius: var(--s-radius-lg);
    transition: var(--s-transition);
    overflow: hidden;
}
.s-module::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--module-color, var(--s-accent-glow)) 0%, transparent 70%);
    opacity: 0;
    transition: var(--s-transition);
}
.s-module:hover {
    transform: translateY(-4px);
    border-color: var(--module-color, var(--s-accent));
    box-shadow: var(--s-shadow-lg);
    color: var(--s-primary);
}
.s-module:hover::before { opacity: 1; }
.s-module__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--module-bg, var(--s-accent-soft));
    color: var(--module-color, var(--s-accent));
    font-size: 28px;
    margin-bottom: 20px;
    transition: var(--s-transition);
}
.s-module:hover .s-module__icon {
    transform: scale(1.05) rotate(-3deg);
}
.s-module__title {
    position: relative;
    font-size: 22px;
    font-weight: 800;
    color: var(--s-primary);
    margin: 0 0 10px;
    letter-spacing: -0.4px;
}
.s-module__desc {
    position: relative;
    color: var(--s-g500);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 20px;
}
.s-module__meta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px dashed var(--s-g200);
}
.s-module__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--s-g500);
}
.s-module__count strong {
    font-size: 20px;
    color: var(--s-primary);
}
.s-module__arrow {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--s-g100);
    color: var(--s-g600);
    transition: var(--s-transition);
}
.s-module:hover .s-module__arrow {
    background: var(--module-color, var(--s-accent));
    color: white;
    transform: translateX(4px);
}

/* Module accent colors */
.s-module--pdf { --module-color: #e53935; --module-bg: #ffebee; }
.s-module--image { --module-color: #8e24aa; --module-bg: #f3e5f5; }
.s-module--ocr { --module-color: #1e88e5; --module-bg: #e3f2fd; }
.s-module--qr { --module-color: #00897b; --module-bg: #e0f2f1; }
.s-module--cv { --module-color: #fb8c00; --module-bg: #fff3e0; }
.s-module--convert { --module-color: #43a047; --module-bg: #e8f5e9; }

/* ==============================================================
   HOMEPAGE — FEATURES (Why Share123)
   ============================================================== */
.s-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}
.s-feature {
    text-align: center;
    padding: 24px;
}
.s-feature__icon {
    display: grid;
    place-items: center;
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--s-accent), var(--s-accent-hover));
    color: white;
    font-size: 36px;
    box-shadow: var(--s-shadow-accent);
}
.s-feature__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--s-primary);
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}
.s-feature__desc {
    color: var(--s-g500);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ==============================================================
   HOMEPAGE — HOW IT WORKS
   ============================================================== */
.s-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 40px;
    position: relative;
}
.s-step {
    position: relative;
    text-align: center;
    padding: 28px 20px;
    background: white;
    border-radius: var(--s-radius-lg);
    border: 1px solid var(--s-g200);
}
.s-step__num {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--s-accent);
    color: white;
    font-weight: 900;
    font-size: 16px;
    box-shadow: var(--s-shadow-accent);
}
.s-step__icon {
    font-size: 40px;
    color: var(--s-accent);
    margin: 12px 0 16px;
}
.s-step__title {
    font-size: 17px;
    font-weight: 800;
    color: var(--s-primary);
    margin: 0 0 10px;
}
.s-step__desc {
    color: var(--s-g500);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ==============================================================
   HOMEPAGE — CTA BANNER
   ============================================================== */
.s-cta-banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--s-primary) 0%, var(--s-primary-light) 100%);
    border-radius: var(--s-radius-xl);
    padding: 64px 48px;
    text-align: center;
    color: white;
}
.s-cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 87, 34, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(41, 121, 255, 0.15) 0%, transparent 40%);
}
.s-cta-banner > * { position: relative; z-index: 1; }
.s-cta-banner h2 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    margin: 0 0 16px;
    letter-spacing: -0.8px;
}
.s-cta-banner p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.s-cta-banner .s-btn { font-size: 16px; padding: 14px 32px; }
@media (max-width: 768px) {
    .s-cta-banner { padding: 48px 24px; }
    .s-section { padding: 64px 0; }
    .s-hero { padding: 60px 0 80px; }
    .s-hero__stats { gap: 24px; margin-top: 32px; padding-top: 24px; }
    .s-hero__stat strong { font-size: 24px; }
}

/* ==============================================================
   FOOTER
   ============================================================== */
.s-footer {
    background: var(--s-primary);
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 0 40px;
}
.s-footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}
.s-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
}
.s-footer__brand .s-header__brand-icon {
    box-shadow: 0 8px 24px rgba(255, 87, 34, 0.4);
}
.s-footer__about {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.65);
}
.s-footer__social {
    display: flex;
    gap: 10px;
}
.s-footer__social a {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transition: var(--s-transition);
}
.s-footer__social a:hover {
    background: var(--s-accent);
    transform: translateY(-2px);
}
.s-footer__col h4 {
    font-size: 14px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
}
.s-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.s-footer__col li {
    margin-bottom: 12px;
}
.s-footer__col a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    transition: var(--s-transition);
}
.s-footer__col a:hover {
    color: var(--s-accent);
    padding-left: 4px;
}
.s-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 16px;
}
.s-footer__payments {
    display: flex;
    gap: 12px;
    align-items: center;
}
.s-payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
@media (max-width: 960px) {
    .s-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .s-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .s-footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==============================================================
   ANIMATIONS
   ============================================================== */
@keyframes s-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.s-hero__badge,
.s-hero__title,
.s-hero__desc,
.s-hero__search,
.s-hero__stats {
    animation: s-fade-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.s-hero__badge { animation-delay: 0.1s; }
.s-hero__title { animation-delay: 0.2s; }
.s-hero__desc { animation-delay: 0.3s; }
.s-hero__search { animation-delay: 0.4s; }
.s-hero__stats { animation-delay: 0.5s; }

/* Reveal on scroll — fallback always visible */
.s-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.s-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
