/* ============================================
   GemTech Labs AI — Modern Minimal
   ============================================ */

:root {
    /* Brand */
    --green: #34c759;            /* decorative accent (icons, glows, borders) */
    --green-text: #15803d;       /* accessible green for text on light bg (4.8:1) */
    --green-glow: rgba(52, 199, 89, 0.14);
    --amber: #f5a623;            /* Jornada decorative accent */
    --amber-text: #b25400;       /* accessible amber for text on light bg (4.8:1) */
    --amber-glow: rgba(245, 166, 35, 0.16);

    /* Neutrals */
    --bg: #fafafa;
    --bg-card: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #6e6e73;
    --border: rgba(0, 0, 0, 0.07);
    --surface: #f2f2f7;
    --nav-bg: rgba(250, 250, 250, 0.85);
    --nav-bg-solid: rgba(250, 250, 250, 0.98);

    /* Banners */
    --banner-foodlens: linear-gradient(165deg, #eef9f1 0%, #e2f4e8 100%);
    --banner-jornada: linear-gradient(165deg, #fdf6eb 0%, #faeeda 100%);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --green-text: #34c759;   /* brand green passes on dark (9.5:1) */
        --amber-text: #f5a623;

        --bg: #000000;
        --bg-card: #141416;
        --text: #f5f5f7;
        --text-secondary: #98989d;
        --border: rgba(255, 255, 255, 0.09);
        --surface: #1c1c1e;
        --nav-bg: rgba(0, 0, 0, 0.8);
        --nav-bg-solid: rgba(10, 10, 10, 0.98);

        --banner-foodlens: linear-gradient(165deg, #112a19 0%, #0d1f13 100%);
        --banner-jornada: linear-gradient(165deg, #221a0e 0%, #1d150a 100%);
    }
}

/* ---- Reset & Base ---- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }

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

:focus-visible {
    outline: 2px solid var(--green-text);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 2000;
    padding: 10px 18px;
    background: var(--text);
    color: var(--bg);
    border-radius: 0 0 10px 10px;
    font-size: 14px;
    font-weight: 600;
    transition: top 0.25s var(--ease-out);
}

.skip-link:focus { top: 0; }

/* ---- Scroll Reveal (hidden only when JS is running) ---- */

html.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

html.js .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Navigation ---- */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: padding 0.4s var(--ease-out), background 0.4s var(--ease-out),
        border-color 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    padding: 12px 0;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}

.nav-links a:not(.cta-link) {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 3px;
    transition: color 0.3s ease;
}

.nav-links a:not(.cta-link)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--green);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:not(.cta-link):hover { color: var(--text); }

.nav-links a:not(.cta-link):hover::after { width: 100%; }

.cta-link {
    display: inline-block;
    background: var(--text);
    color: var(--bg);
    padding: 9px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.cta-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.6px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---- Hero ---- */

.hero {
    position: relative;
    padding: 190px 32px 130px;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 90vw);
    height: 620px;
    background: radial-gradient(circle, var(--green-glow) 0%, transparent 68%);
    pointer-events: none;
    opacity: 0.6;
}

.hero > * { position: relative; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--green-text);
    margin-bottom: 28px;
    animation: fadeInUp 0.9s var(--ease-out) both;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px var(--green-glow);
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(44px, 7vw, 76px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
    max-width: 760px;
    margin: 0 auto 26px;
    animation: fadeInUp 0.9s var(--ease-out) 0.1s both;
}

.hero h1 .accent { color: var(--green-text); }

.hero-sub {
    font-size: clamp(16px, 2.5vw, 19px);
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 44px;
    animation: fadeInUp 0.9s var(--ease-out) 0.2s both;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 0.9s var(--ease-out) 0.3s both;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
        border-color 0.35s var(--ease-out);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--green);
}

/* Animated scroll cue */
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    justify-content: center;
}

.hero-scroll-chevron {
    width: 11px;
    height: 11px;
    border-right: 1.6px solid var(--green-text);
    border-bottom: 1.6px solid var(--green-text);
    transform: rotate(45deg);
    animation: heroScroll 1.8s var(--ease-in-out) infinite;
}

.hero-scroll-chevron:nth-child(2) { animation-delay: 0.18s; }

@keyframes heroScroll {
    0% { opacity: 0; transform: rotate(45deg) translate(-3px, -3px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(3px, 3px); }
}

/* ---- Shared section bits ---- */

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-text);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-divider {
    width: 44px;
    height: 1.5px;
    background: var(--green);
    margin: 0 auto 26px;
    border-radius: 1px;
}

/* ---- App Showcase ---- */

.showcase {
    padding: 60px 32px 120px;
    max-width: 1120px;
    margin: 0 auto;
}

.showcase-header {
    text-align: center;
    margin-bottom: 64px;
}

.showcase-header h2,
.about h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 18px;
}

.showcase-header p:not(.section-label) {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

.app-cards-list {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
        border-color 0.5s var(--ease-out);
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.09);
}

.app-card:hover .app-icon img { transform: scale(1.04); }

#foodlens:hover { border-color: rgba(52, 199, 89, 0.35); }
#jornada:hover { border-color: rgba(245, 166, 35, 0.4); }

.app-banner {
    position: relative;
    padding: 56px 32px 48px;
    text-align: center;
    overflow: hidden;
}

.app-banner.foodlens { background: var(--banner-foodlens); }
.app-banner.jornada { background: var(--banner-jornada); }

.app-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.app-banner.foodlens::before {
    background: radial-gradient(ellipse 60% 90% at 50% -20%, var(--green-glow), transparent);
}

.app-banner.jornada::before {
    background: radial-gradient(ellipse 60% 90% at 50% -20%, var(--amber-glow), transparent);
}

.app-banner > * { position: relative; }

.app-icon {
    width: 92px;
    height: 92px;
    border-radius: 23px;
    overflow: hidden;
    margin: 0 auto 20px;
    transition: transform 0.5s var(--ease-out);
}

.app-banner.foodlens .app-icon { box-shadow: 0 14px 36px rgba(52, 199, 89, 0.28); }
.app-banner.jornada .app-icon { box-shadow: 0 14px 36px rgba(196, 94, 0, 0.26); }

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.app-banner h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.app-banner .tagline {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.app-body { padding: 36px 44px 44px; }

.app-body > p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 880px;
}

.feature-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 34px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 14px;
    transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
        box-shadow 0.35s var(--ease-out);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.foodlens-card .feature-item:hover { border-color: rgba(52, 199, 89, 0.3); }
.jornada-card .feature-item:hover { border-color: rgba(245, 166, 35, 0.35); }

.feature-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}

.feature-icon.green-icon { background: var(--green-glow); color: var(--green-text); }
.feature-icon.amber-icon { background: var(--amber-glow); color: var(--amber-text); }

.feature-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.feature-item p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* App Store badge */
.app-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 12px 26px;
    background: var(--text);
    color: var(--bg);
    border-radius: 14px;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.app-store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.app-store-badge svg { width: 22px; height: 22px; fill: var(--bg); }

.app-store-badge .badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
}

.app-store-badge .badge-text small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.75;
}

.app-store-badge .badge-text strong {
    font-size: 16px;
    font-weight: 600;
}

.app-store-badge.coming-soon {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    pointer-events: none;
}

.app-store-badge.coming-soon svg { fill: var(--text-secondary); }

/* ---- About ---- */

.about {
    padding: 110px 32px 120px;
    background: var(--surface);
}

.about-inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.about p:not(.section-label) {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ---- Footer ---- */

footer {
    padding: 56px 32px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 36px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }

.footer-brand span {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-col h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 9px; }

.footer-col a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.25s ease;
}

.footer-col a:hover { color: var(--green-text); }

/* ---- Animations ---- */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .nav-inner { padding: 0 20px; }

    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--nav-bg-solid);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 12px 24px 20px;
    }

    .nav-links.open { display: flex; }

    .nav-links li a:not(.cta-link) {
        display: block;
        padding: 14px 0;
    }

    .nav-links li:last-child { margin-top: 10px; }

    .nav-links .cta-link {
        display: block;
        text-align: center;
        padding: 13px 20px;
    }

    nav { padding: 14px 0; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--border); }

    .hero { padding: 150px 22px 110px; }

    .showcase { padding: 40px 20px 90px; }

    .app-body { padding: 28px 24px 34px; }

    .feature-grid { grid-template-columns: 1fr; }

    .about { padding: 80px 22px 90px; }

    footer { padding: 44px 20px; }

    .footer-inner { flex-direction: column; }

    .footer-links { gap: 32px; }
}

/* ---- Reduced motion ---- */

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

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

    html.js .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-scroll-chevron { animation: none; opacity: 0.7; }
}
