/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --cream:    #f5f0e6;
    --cream2:   #ede6d8;
    --cream3:   #e4dccb;
    --white:    #ffffff;
    --green:    #365413;
    --green2:   #4a7219;
    --green3:   #9cd83c;
    --orange:   #F37021;
    --orange2:  #d75a00;
    --orange-light: #FFD2B3;
    --text:     #2e2e2e;
    --muted:    #6b6560;
    --border:   rgba(54, 84, 19, 0.12);
    --serif:    'Playfair Display', Georgia, serif;
    --sans:     'DM Sans', 'Segoe UI', sans-serif;
    --mono:     'JetBrains Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--cream);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===================== TEXTURE OVERLAY ===================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

/* ===================== HERO ===================== */
.hero {
    margin-top: 70px;
    min-height: 92vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--green);
    padding: 5rem 2rem;
}

/* Organic blob shapes */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    background: rgba(156, 216, 60, 0.12);
    top: -100px;
    right: -100px;
    animation: morphBlob 12s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 40% 60% 30% 70% / 60% 40% 50% 50%;
    background: rgba(243, 112, 33, 0.10);
    bottom: -80px;
    left: 5%;
    animation: morphBlob 15s ease-in-out infinite reverse;
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; }
    25%       { border-radius: 30% 70% 40% 60% / 40% 50% 60% 40%; }
    50%       { border-radius: 50% 50% 60% 40% / 70% 30% 50% 50%; }
    75%       { border-radius: 40% 60% 30% 70% / 50% 60% 30% 70%; }
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(156, 216, 60, 0.15);
    border: 1px solid rgba(156, 216, 60, 0.35);
    color: var(--green3);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s ease both;
    text-transform: uppercase;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green3);
    border-radius: 50%;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.6); }
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.1s ease both;
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    color: var(--orange);
    font-style: italic;
}

.hero-desc {
    color: rgba(255,255,255,0.70);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    max-width: 460px;
    animation: fadeUp 0.6s 0.2s ease both;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    gap: 2.5rem;
    animation: fadeUp 0.6s 0.3s ease both;
    flex-wrap: wrap;
}

.hero-meta-item { display: flex; flex-direction: column; gap: 2px; }

.hero-meta-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
}

.hero-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
}

/* App preview card */
.hero-visual {
    animation: fadeUp 0.6s 0.2s ease both;
}

.app-preview {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
            0 0 0 1px rgba(255,255,255,0.08),
            0 40px 80px rgba(0,0,0,0.4),
            0 0 60px rgba(243,112,33,0.12);
}

.app-bar {
    background: var(--orange);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-bar-logo {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}

.app-bar-nav {
    display: flex;
    gap: 16px;
}

.app-bar-nav span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.app-body {
    padding: 24px;
    background: var(--cream);
    min-height: 300px;
}

.app-hero-mini {
    background: var(--green);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.app-hero-mini::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    background: rgba(156,216,60,0.15);
    border-radius: 50%;
}

.app-hero-mini h3 {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 4px;
}

.app-hero-mini p {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
}

.app-hero-mini .btn-mini {
    display: inline-block;
    margin-top: 10px;
    background: var(--orange);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.app-menu-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.app-menu-img {
    height: 55px;
    background: var(--cream2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.app-menu-info {
    padding: 6px 8px;
}

.app-menu-info h4 {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 3px;
}

.nutri-pill {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--white);
}

.nutri-a { background: #038141; }
.nutri-b { background: #85BB2F; }
.nutri-c { background: #FECB02; color: #333; }

/* Chat bubble */
.chat-bubble {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--green);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(54,84,19,0.4);
    animation: bounceIn 0.5s 0.8s ease both;
}

.chat-bubble svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 2;
}

.chat-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: var(--orange);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes bounceIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

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

/* ===================== SECTIONS LAYOUT ===================== */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-alt { background: var(--cream2); }
.section-dark {
    background: var(--green);
    color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.section-dark .section-eyebrow { color: var(--green3); }

.section-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-dark .section-title { color: var(--white); }

.section-desc {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin-bottom: 3.5rem;
    line-height: 1.8;
}

.section-dark .section-desc { color: rgba(255,255,255,0.65); }

/* ===================== REVEAL ANIMATION ===================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ===================== CONTEXT SECTION ===================== */
.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.context-text p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.context-text p strong {
    color: var(--green);
    font-weight: 700;
}

.context-stat-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(54,84,19,0.1);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--cream2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-info { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

/* ===================== ARCHITECTURE ===================== */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.arch-card {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.arch-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(243,112,33,0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}

.arch-card:hover {
    border-color: rgba(243,112,33,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(54,84,19,0.10);
}

.arch-card:hover::before { opacity: 1; }

.arch-num {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(243,112,33,0.12);
    line-height: 1;
    margin-bottom: 0.85rem;
}

.arch-card h3 {
    font-family: var(--mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
    margin-bottom: 0.65rem;
    font-weight: 700;
}

.arch-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.75;
}

.arch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1rem;
}

.arch-tag {
    font-family: var(--mono);
    font-size: 0.62rem;
    padding: 3px 8px;
    background: var(--cream2);
    border: 1px solid var(--border);
    color: var(--green);
    border-radius: 4px;
    letter-spacing: 0.02em;
    font-weight: 600;
}

/* ===================== FEATURES ===================== */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.feature-card {
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.feature-card:hover {
    border-color: rgba(54,84,19,0.25);
    box-shadow: 0 10px 28px rgba(54,84,19,0.08);
    transform: translateY(-3px);
}

.feature-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(54,84,19,0.04), rgba(243,112,33,0.04));
    border-color: rgba(54,84,19,0.18);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 42px;
    height: 42px;
    background: var(--cream2);
    border: 1px solid var(--border);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-card h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 700;
}

.feature-card p, .feature-card li {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    margin-top: 0.5rem;
}

.feature-list li {
    padding: 7px 0;
    border-bottom: 1px solid rgba(54,84,19,0.06);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.feature-list li:last-child { border-bottom: none; }

.feature-list li::before {
    content: '→';
    color: var(--orange);
    font-family: var(--mono);
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-top: 3px;
    font-weight: 700;
}

/* Subscription mini display */
.subs-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.sub-mini {
    background: var(--white);
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid var(--green3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sub-mini-name {
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green);
    font-weight: 700;
    margin-bottom: 4px;
}

.sub-mini-price {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.sub-mini-price span {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--sans);
    font-weight: 400;
}

.sub-mini-detail {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Nutriscore display */
.nutriscore-display {
    display: flex;
    gap: 5px;
    margin-top: 0.75rem;
}

.ns-letter {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 4px;
    color: white;
    opacity: 0.45;
    transition: opacity 0.2s, transform 0.2s;
}

.ns-letter:hover { opacity: 1; transform: translateY(-2px); }
.ns-a { background: #038141; }
.ns-b { background: #85BB2F; }
.ns-c { background: #FECB02; color: #333; }
.ns-d { background: #EE8100; }
.ns-e { background: #E63E11; }

/* ===================== STACK ===================== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.stack-card {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.stack-card:hover {
    background: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(54,84,19,0.12);
}

.stack-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.stack-name {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
}

.stack-role {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ===================== COMPETENCES BTS ===================== */
.skills-accordion { display: flex; flex-direction: column; gap: 0.85rem; }

.skill-item {
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.skill-item:hover { box-shadow: 0 6px 20px rgba(54,84,19,0.10); }

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    cursor: default;
}

.skill-code {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--orange);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.skill-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.skill-body {
    padding: 0 1.4rem 1.1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
}

.skill-body p {
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.75;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.75rem;
}

.skill-tag {
    font-family: var(--mono);
    font-size: 0.6rem;
    padding: 3px 8px;
    background: var(--cream2);
    border: 1px solid var(--border);
    color: var(--green);
    border-radius: 4px;
    font-weight: 600;
}

/* ===================== DOCUMENTATION ===================== */
.docs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.doc-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.doc-card:hover {
    border-color: rgba(243,112,33,0.35);
    box-shadow: 0 6px 20px rgba(54,84,19,0.08);
    transform: translateX(4px);
}

.doc-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
}

.doc-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.doc-type {
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.doc-arrow {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--orange);
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.doc-card:hover .doc-arrow { transform: translateX(4px); }

/* ===================== CONTACT / FOOTER ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.contact-item {
    border: 1.5px dashed rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.25s, background 0.25s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.contact-item:hover {
    border-style: solid;
    border-color: rgba(156,216,60,0.5);
    background: rgba(255,255,255,0.05);
}

.contact-item-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: block;
}

.contact-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--green3);
    font-weight: 700;
    margin-bottom: 6px;
}

.contact-value {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
}

/* ===================== NAVIGATION BUTTONS ===================== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    background: var(--cream3);
    border-top: 1px solid var(--border);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text);
    transition: all 0.2s;
    text-decoration: none;
}

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

.nav-btn.primary {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.nav-btn.primary:hover { background: var(--orange2); border-color: var(--orange2); }

/* ===================== DIVIDER ===================== */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero-visual { display: none; }
    .context-grid { grid-template-columns: 1fr; }
    .arch-grid { grid-template-columns: 1fr 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card.featured { grid-column: span 1; }
    .subs-row { grid-template-columns: 1fr; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .section { padding: 4rem 1.25rem; }
    .arch-grid { grid-template-columns: 1fr; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 4rem 1.25rem; }
}