/** 
 * Aventory CSS - Apple Style Aesthetic
 * Dark mode, clean typography, gradients, and micro-interactions.
 */

:root {
    --bg-color: #000000;
    --surface-color: #1c1c1e;
    --surface-light: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #86868b;
    --accent-glow-1: #00f0ff;
    --accent-glow-2: #ff00ea;
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --btn-secondary-hover: rgba(255, 255, 255, 0.2);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.full-width {
    width: 100%;
    display: block;
    text-align: center;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-glow-1), var(--accent-glow-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary,
.btn-primary-small {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 0.8rem 1.5rem;
    border-radius: 980px;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
}

.btn-primary-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-primary:hover,
.btn-primary-small:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 980px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    backdrop-filter: blur(10px);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.logo-img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.9rem;
}

.nav-links a:not(.btn-primary-small) {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

/* Sections */
section {
    padding: 8rem 0;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-heading {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.section-body {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.5;
}

/* Hero Section */
.hero {
    padding-top: 12rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.4;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
}

.hero-image-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    perspective: 1000px;
}

.hero-mockup {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    transform: rotateX(10deg) translateY(20px);
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, rgba(255, 0, 234, 0.3) 50%, rgba(0, 0, 0, 0) 80%);
    filter: blur(80px);
    z-index: 1;
}

/* Spotlight Section (AI) */
.spotlight {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.spotlight-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    z-index: 0;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.spotlight-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 2rem;
}

.spotlight-heading {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.spotlight-body {
    font-size: 1.4rem;
    color: #a1a1a6;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.spotlight .feature-pills .pill {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-pills {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 980px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.dark-card {
    background-color: var(--surface-color);
    border-radius: 2rem;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.dark-card:hover {
    transform: translateY(-5px);
    background-color: var(--surface-light);
}

.bento-box.large {
    grid-column: span 2;
}

.bento-box.tall {
    grid-row: span 2;
}

.bento-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-content p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Image Integration for Bento Boxes */
.bento-box.has-image {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.bento-bg-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.bento-box.has-image:hover .bento-bg-image {
    transform: scale(1.05);
}

.bento-box.large.has-image .bento-bg-image {
    object-fit: cover;
    object-position: right center;
    width: 60%;
    left: auto;
    right: 0;
    mask-image: linear-gradient(to right, transparent, black 40%);
    mask: linear-gradient(to right, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
}

.bento-box.tall.has-image .bento-bg-image.align-bottom {
    object-fit: cover;
    object-position: bottom;
    height: 60%;
    top: auto;
    bottom: 0;
    mask-image: linear-gradient(to bottom, transparent, black 40%);
    mask: linear-gradient(to bottom, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%);
}

.bento-box:not(.large):not(.tall):not(.wide).has-image .bento-bg-image.align-bottom {
    object-fit: cover;
    object-position: bottom;
    height: 55%;
    top: auto;
    bottom: 0;
    mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
    mask: linear-gradient(to bottom, transparent 0%, black 50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
}

.bento-box.wide {
    grid-column: span 3;
}

.bento-box.wide.has-image .bento-bg-image {
    object-fit: cover;
    object-position: right center;
    width: 60%;
    left: auto;
    right: 0;
    mask-image: linear-gradient(to right, transparent, black 40%);
    mask: linear-gradient(to right, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
}

.bento-box.wide.has-image .bento-content {
    width: 60%;
}

.bento-box.has-image .bento-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem;
}

.bento-box.large.has-image .bento-content,
.bento-box.wide.has-image .bento-content {
    width: 60%;
}

.bento-box.has-image .bento-content h4,
.bento-box.has-image .bento-content p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0px 4px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 2;
}

/* App Store Links */
.app-store-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-link img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    /* For standard app store badge shapes */
}

.app-store-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Pricing */
.pricing-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pricing-card .btn-secondary,
.pricing-card .btn-primary {
    display: none;
}

.pricing-card {
    background-color: var(--surface-color);
    border-radius: 2rem;
    padding: 3rem 2rem;
    width: 350px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.pricing-card.premium {
    position: relative;
    background: linear-gradient(180deg, var(--surface-light) 0%, var(--surface-color) 100%);
    border: 1px solid rgba(255, 0, 234, 0.3);
}

.pricing-card.premium::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 2rem;
    padding: 2px;
    background: linear-gradient(90deg, var(--accent-glow-1), var(--accent-glow-2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 0;
    pointer-events: none;
}

.plan-header {
    margin-bottom: 2rem;
    z-index: 1;
}

.plan-header h4 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
    z-index: 1;
}

.plan-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li strong {
    color: var(--text-primary);
}

.plan-footer {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.footnote {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background-color: var(--bg-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Animations (triggered via JS) */
.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1.5s ease;
}

.fade-in.visible {
    opacity: 1;
}

.hero-mockup.scrolled {
    transform: rotateX(0deg) translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-box.large,
    .bento-box.tall,
    .bento-box.wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .section-heading {
        font-size: 2.5rem;
    }

    .nav-links a:not(.btn-primary-small) {
        display: none;
        /* simple mobile nav */
    }
}

/* QR Downloads */
.qr-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qr-download img {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.qr-download img:hover {
    transform: scale(1.05);
}

.qr-download p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}