/* ═══════════════════════════════════════════════════
   NEXIFY — AWS Product Pages (Shared Styles)
   Matches Nexify main design system
   ═══════════════════════════════════════════════════ */

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

:root {
    --bg-body: #FFFFFF;
    --bg-alt: #F5F7FA;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hero: #0E1A2B;
    --bg-footer: #0E1A2B;
    --bg-footer-surface: #142236;

    --accent: #1B3A5C;
    --accent-light: #2A5082;
    --accent-lighter: #3A6BA3;
    --accent-glow: rgba(27, 58, 92, 0.08);
    --accent-warm: #E8740C;
    --accent-success: #0D8A53;
    --accent-warn: #D93025;

    --text-primary: #1A1F2E;
    --text-secondary: #4A5568;
    --text-muted: #8896AB;
    --text-on-accent: #FFFFFF;
    --text-on-dark: #E8ECF1;
    --text-on-dark-secondary: #9AA8BD;
    --text-on-dark-muted: #5F7089;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --border-accent: rgba(27, 58, 92, 0.25);

    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: 1200px;
    --section-py: 100px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-elevated: 0 4px 24px rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--text-primary); background: var(--bg-body); line-height: 1.65; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ═══ NAVIGATION ═══ */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; }
.topbar__brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.topbar__brand img { height: 28px; }
.topbar__nav { display: flex; align-items: center; gap: 8px; }
.topbar__link {
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.25s;
}
.topbar__link:hover { color: var(--accent); background: var(--accent-glow); }
.topbar__link--cta {
    background: var(--accent); color: var(--text-on-accent) !important;
    font-weight: 600; padding: 8px 20px;
}
.topbar__link--cta:hover { background: var(--accent-light); transform: translateY(-1px); }
.topbar__hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.topbar__hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }

/* ═══ HERO ═══ */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero--dark {
    background: linear-gradient(135deg, var(--bg-hero) 0%, #162B45 50%, #1B3A5C 100%);
    color: var(--text-on-dark);
}
.hero--gradient-blue {
    background: linear-gradient(135deg, #0E1A2B 0%, #1B3A5C 40%, #2A5082 100%);
    color: var(--text-on-dark);
}
.hero--gradient-green {
    background: linear-gradient(135deg, #0E1A2B 0%, #0D4A3A 40%, #0D8A53 100%);
    color: var(--text-on-dark);
}
.hero--gradient-orange {
    background: linear-gradient(135deg, #0E1A2B 0%, #4A2510 40%, #D06608 100%);
    color: var(--text-on-dark);
}

.hero__particles {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.15;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 1px, transparent 1px),
                      radial-gradient(circle at 60% 70%, rgba(255,255,255,0.1) 1px, transparent 1px),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 1px, transparent 1px),
                      radial-gradient(circle at 40% 80%, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 200px 200px, 300px 300px, 250px 250px, 350px 350px;
}

.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px; font-size: 0.82rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 28px;
}
.hero__badge-icon { font-size: 1rem; }
.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800;
    margin-bottom: 20px; line-height: 1.1;
}
.hero__title span {
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle {
    font-size: 1.15rem; color: rgba(255,255,255,0.7);
    max-width: 700px; margin: 0 auto 40px; line-height: 1.7;
}
.hero__stats {
    display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
    padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 48px;
}
.hero__stat { text-align: center; }
.hero__stat-value {
    font-family: var(--font-display); font-size: 2rem; font-weight: 800;
    color: var(--accent-warm); line-height: 1;
}
.hero__stat-label {
    display: block; font-size: 0.78rem; color: rgba(255,255,255,0.5);
    margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}

/* ═══ SECTION ═══ */
.section { padding: var(--section-py) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-hero); color: var(--text-on-dark); }
.section__header { text-align: center; max-width: 700px; margin: 0 auto 64px; }
.section__tag {
    display: inline-block; padding: 6px 16px;
    background: var(--accent-glow); color: var(--accent);
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; border-radius: 100px; margin-bottom: 20px;
    border: 1px solid rgba(27,58,92,0.12);
}
.section__tag--aws { background: rgba(255,153,0,0.08); color: #FF9900; border-color: rgba(255,153,0,0.15); }
.section__tag--green { background: rgba(13,138,83,0.06); color: var(--accent-success); border-color: rgba(13,138,83,0.12); }
.section__title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--text-primary); margin-bottom: 16px; }
.section--dark .section__title { color: var(--text-on-dark); }
.section__desc { font-size: 1.02rem; color: var(--text-secondary); line-height: 1.7; }
.section--dark .section__desc { color: var(--text-on-dark-secondary); }

/* ═══ FEATURE GRID ═══ */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 36px 28px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover {
    border-color: var(--border-accent); transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.feature-card__icon {
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    background: var(--accent-glow); border-radius: var(--radius-sm);
    color: var(--accent); font-size: 1.3rem; margin-bottom: 20px;
}
.feature-card__icon--green { background: rgba(13,138,83,0.06); color: var(--accent-success); }
.feature-card__icon--orange { background: rgba(232,116,12,0.06); color: var(--accent-warm); }
.feature-card__icon--aws { background: rgba(255,153,0,0.06); color: #FF9900; }
.feature-card__title {
    font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px;
}
.feature-card__desc {
    font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65;
}
.feature-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.feature-card__tags span {
    font-size: 0.72rem; font-weight: 600; color: var(--accent);
    background: var(--accent-glow); padding: 4px 12px; border-radius: 100px;
    border: 1px solid rgba(27,58,92,0.1);
}

/* ═══ STATS ROW ═══ */
.stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 32px 24px; text-align: center;
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.stat-card__value {
    font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
    color: var(--accent); line-height: 1;
}
.stat-card__value--warm { color: var(--accent-warm); }
.stat-card__value--green { color: var(--accent-success); }
.stat-card__label {
    font-size: 0.82rem; color: var(--text-muted); margin-top: 8px;
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* ═══ ARCHITECTURE DIAGRAM ═══ */
.arch-diagram {
    background: #0E1A2B; border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-elevated); max-width: 900px; margin: 0 auto;
}
.arch-diagram__header {
    display: flex; align-items: center; gap: 8px; padding: 14px 18px;
    background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.arch-diagram__dot { width: 12px; height: 12px; border-radius: 50%; }
.arch-diagram__dot--red { background: #FF5F57; }
.arch-diagram__dot--yellow { background: #FFBD2E; }
.arch-diagram__dot--green { background: #28CA42; }
.arch-diagram__title { margin-left: 8px; font-size: 0.82rem; color: var(--text-on-dark-muted); font-weight: 500; }
.arch-diagram__body { padding: 32px; }
.arch-diagram pre {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.78rem; color: var(--text-on-dark-secondary);
    line-height: 1.6; overflow-x: auto; white-space: pre;
}

.arch-diagram__body--mermaid { padding: 24px 16px; display: flex; justify-content: center; overflow-x: auto; }
.arch-diagram__body--mermaid .mermaid { width: 100%; max-width: 100%; }
.arch-diagram__body--mermaid .mermaid svg { max-width: 100%; height: auto; margin: 0 auto; display: block; }
.arch-diagram__body--mermaid .mermaid .nodeLabel { font-size: 12px; white-space: pre-line; }
.arch-diagram__body--mermaid .mermaid .cluster-label .nodeLabel { font-size: 13px; font-weight: 700; }

/* ═══ AWS SERVICES ═══ */
.aws-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.aws-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 28px 24px;
    transition: all 0.3s;
}
.aws-card:hover { border-color: rgba(255,153,0,0.3); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.aws-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aws-card__icon {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,153,0,0.06); border-radius: var(--radius-sm);
    color: #FF9900; font-size: 1.1rem;
}
.aws-card__name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.aws-card__desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ═══ TIMELINE ═══ */
.timeline { max-width: 800px; margin: 0 auto; }
.timeline__item {
    display: flex; gap: 24px; margin-bottom: 32px;
    padding-bottom: 32px; border-bottom: 1px solid var(--border);
}
.timeline__item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.timeline__week {
    min-width: 100px; font-family: var(--font-display);
    font-size: 0.82rem; font-weight: 800; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.05em; padding-top: 4px;
}
.timeline__content h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.timeline__tasks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline__tasks li {
    font-size: 0.88rem; color: var(--text-secondary); padding-left: 20px;
    position: relative; line-height: 1.5;
}
.timeline__tasks li::before {
    content: ''; position: absolute; left: 0; top: 8px;
    width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

/* ═══ COST TABLE ═══ */
.cost-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.cost-table th, .cost-table td {
    padding: 14px 18px; text-align: left; font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}
.cost-table th {
    background: var(--bg-alt); font-weight: 700; color: var(--text-primary);
    font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.cost-table td { color: var(--text-secondary); }
.cost-table tr:hover td { background: var(--accent-glow); }
.cost-table .cost-total td {
    font-weight: 800; color: var(--accent); font-size: 1rem;
    border-top: 2px solid var(--accent);
}
.cost-table-wrapper {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
}

/* ═══ DIFFERENTIALS ═══ */
.diff-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.diff-item {
    display: flex; gap: 18px; align-items: flex-start;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
    transition: all 0.3s;
}
.diff-item:hover { border-color: var(--border-accent); transform: translateX(4px); }
.diff-item__number {
    min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--text-on-accent);
    font-family: var(--font-display); font-size: 0.85rem; font-weight: 800;
    border-radius: var(--radius-sm);
}
.diff-item__text { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }
.diff-item__text strong { color: var(--text-primary); }

/* ═══ CTA BANNER ═══ */
.cta-banner {
    background: linear-gradient(135deg, var(--bg-hero) 0%, #1B3A5C 100%);
    padding: 80px 0; text-align: center; color: var(--text-on-dark);
}
.cta-banner__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 16px; color: #FFFFFF; }
.cta-banner__desc { font-size: 1.02rem; color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 32px; line-height: 1.7; }
.cta-banner__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
    padding: 14px 32px; border-radius: var(--radius-sm); border: none;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(27,58,92,0.25); }
.btn--warm { background: var(--accent-warm); color: var(--text-on-accent); }
.btn--warm:hover { background: #D06608; transform: translateY(-2px); }
.btn--outline { background: transparent; color: #FFFFFF; border: 1px solid rgba(255,255,255,0.3); }
.btn--outline:hover { border-color: #FFFFFF; background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.btn--outline-dark { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn--outline-dark:hover { background: var(--accent-glow); transform: translateY(-2px); }
.btn--lg { padding: 16px 40px; font-size: 1rem; }

/* ═══ FOOTER ═══ */
.footer {
    background: var(--bg-footer); border-top: 3px solid var(--accent); padding: 64px 0 24px;
}
.footer__layout {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px; margin-bottom: 48px;
}
.footer__logo { height: 32px; margin-bottom: 12px; }
.footer__tagline { font-size: 0.88rem; color: var(--text-on-dark-muted); margin-bottom: 20px; font-style: italic; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-footer-surface); border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm); color: var(--text-on-dark-secondary);
    font-size: 1rem; transition: all 0.25s;
}
.footer__social a:hover { border-color: rgba(255,255,255,0.3); color: #FFFFFF; transform: translateY(-2px); }
.footer__nav h4, .footer__contact h4 {
    font-size: 0.85rem; font-weight: 700; color: var(--text-on-dark);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px;
}
.footer__nav a, .footer__contact a {
    display: block; font-size: 0.88rem; color: var(--text-on-dark-secondary);
    margin-bottom: 10px; transition: color 0.25s;
}
.footer__nav a:hover, .footer__contact a:hover { color: #FFFFFF; }
.footer__contact p { font-size: 0.85rem; color: var(--text-on-dark-muted); line-height: 1.6; margin-top: 10px; }
.footer__bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
}
.footer__bottom p { font-size: 0.8rem; color: var(--text-on-dark-muted); }

/* ═══ ANIMATIONS ═══ */
[data-animate] {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-animate="fade-right"] { transform: translateX(-30px); }
[data-animate="fade-left"] { transform: translateX(30px); }
[data-animate].visible { opacity: 1; transform: translate(0, 0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .aws-grid { grid-template-columns: 1fr; }
    .footer__layout { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
    :root { --section-py: 72px; }
    .container { padding: 0 20px; }
    .hero { padding: 120px 0 72px; }
    .hero__title { font-size: 1.8rem; }
    .hero__subtitle { font-size: 1rem; }
    .hero__stats { gap: 24px; }
    .hero__stat-value { font-size: 1.5rem; }
    .topbar__nav { display: none; }
    .topbar__nav.open {
        display: flex; position: fixed; inset: 0;
        background: rgba(14,26,43,0.97); backdrop-filter: blur(20px);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 24px; z-index: 999;
    }
    .topbar__nav.open .topbar__link { color: rgba(255,255,255,0.75); font-size: 1.2rem; }
    .topbar__nav.open .topbar__link:hover { color: #FFFFFF; }
    .topbar__hamburger { display: flex; z-index: 1001; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .section__header { margin-bottom: 40px; }
    .section__title { font-size: 1.5rem; }
    .timeline__item { flex-direction: column; gap: 12px; }
    .timeline__week { min-width: unset; }
    .cost-table-wrapper { overflow-x: auto; }
    .footer__layout { grid-template-columns: 1fr; gap: 28px; }
    .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
    .cta-banner { padding: 60px 0; }
    .cta-banner__actions { flex-direction: column; align-items: center; }
    .diff-item { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
    .hero { padding: 100px 0 56px; }
    .hero__title { font-size: 1.5rem; }
    .hero__stats { flex-direction: column; gap: 16px; }
    .btn--lg { padding: 14px 28px; font-size: 0.9rem; }
}
