/* ============================================
   Teracore Website — Brand Design System
   Colors: Navy #0d2461 | Orange #E08830 | Gray #B0B0B0
   Font: Aloevera Display (brand), Inter (body)
   ============================================ */

/* ---- Brand Font: Aloevera Display ---- */
@font-face {
    font-family: 'Aloevera Display';
    src: url('fonts/AloeveraDisplay-SemiBold.woff2') format('woff2'),
         url('fonts/AloeveraDisplay-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera Display';
    src: url('fonts/AloeveraDisplay-Bold.woff2') format('woff2'),
         url('fonts/AloeveraDisplay-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aloevera Display';
    src: url('fonts/AloeveraDisplay-ExtraBold.woff2') format('woff2'),
         url('fonts/AloeveraDisplay-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #0d2461;
    --navy-dark: #091a45;
    --navy-light: #1a3580;
    --orange: #E08830;
    --orange-dark: #d97807;
    --orange-light: #ed9305;
    --gray: #B0B0B0;
    --gray-light: #E8E8E8;
    --gray-dark: #6B6B6B;
    --white: #FFFFFF;
    --off-white: #F8F9FC;
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A6A;
    --text-light: #8A8AA0;

    --font-display: 'Aloevera Display', 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 3px rgba(27, 58, 107, 0.08);
    --shadow-md: 0 4px 16px rgba(27, 58, 107, 0.10);
    --shadow-lg: 0 12px 40px rgba(27, 58, 107, 0.12);
    --shadow-xl: 0 24px 64px rgba(27, 58, 107, 0.16);

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

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 700;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

/* ---- Utility ---- */
.text-gradient {
    background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-orange {
    color: var(--orange);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 136, 48, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--white);
    letter-spacing: 0.08em;
    transition: color 0.3s;
}

.navbar.scrolled .nav-logo {
    color: var(--navy);
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s;
}

.navbar.scrolled .nav-logo-icon {
    filter: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--white);
}

.navbar.scrolled .nav-links a {
    color: var(--text-secondary);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--navy);
}

.navbar.scrolled .nav-links .nav-cta {
    color: var(--white) !important;
}

.nav-cta {
    background: var(--orange);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600 !important;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--orange-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
    border-radius: 2px;
}

.navbar.scrolled .mobile-menu-btn span {
    background: var(--navy);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--navy-dark);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 26, 69, 0.82) 0%, rgba(13, 36, 97, 0.75) 50%, rgba(9, 26, 69, 0.9) 100%);
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content--centered {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.text-gradient-light {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 620px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Scroll — Mouse icon */
.hero-scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    z-index: 2;
    animation: fadeInUp 1s ease-in-out 1.2s both;
}

.scroll-icon {
    width: 24px;
    height: 38px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    padding-top: 8px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.hero-scroll-indicator:hover .scroll-icon {
    opacity: 1;
}

.scroll-dot {
    width: 3px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.2; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Section Base ---- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    margin-bottom: 16px;
    padding: 6px 16px;
    background: rgba(224, 136, 48, 0.08);
    border-radius: 100px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--navy-dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Section Intro (two-column: text + image) ---- */
.section-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 56px;
}

.section-intro--reverse {
    direction: rtl;
}

.section-intro--reverse > * {
    direction: ltr;
}

.section-intro-text {
    max-width: 540px;
}

.section-intro-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--navy-dark);
    margin-bottom: 16px;
}

.section-intro-text .section-subtitle {
    margin: 0;
    max-width: none;
}

.section-intro-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-intro-image img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-lg);
}

.section-intro-image--illustration {
    background: none;
}

.section-intro-image--illustration img {
    object-fit: contain;
    height: auto;
    max-height: 400px;
}

/* ---- Audience Sections ---- */
.audience-section {
    position: relative;
}

.audience-section--manufacturers {
    background: var(--white);
}

.audience-section--distributors {
    background: var(--off-white);
}

.audience-section--aggregators {
    background: var(--white);
}

.audience-section--partners {
    background: var(--off-white);
}

/* Audience Grid */
.audience-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.audience-grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

.audience-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.audience-card {
    background: var(--white);
    border: 1px solid rgba(27, 58, 107, 0.08);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all 0.3s ease;
}

.audience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 136, 48, 0.2);
}

.audience-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(27, 58, 107, 0.06), rgba(27, 58, 107, 0.02));
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    color: var(--navy);
}

.audience-card h3 {
    font-size: 1.15rem;
    color: var(--navy-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.audience-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Audience Note */
.audience-note {
    text-align: center;
    margin-bottom: 32px;
}

.audience-note p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
}

.audience-note strong {
    color: var(--navy-dark);
    font-style: normal;
}

/* Audience CTA */
.audience-cta {
    text-align: center;
    padding-top: 16px;
}

/* ---- App Download Section ---- */
.app-section {
    background: var(--off-white);
    overflow: hidden;
}

.app-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.app-promo-content {
    max-width: 520px;
}

.app-promo-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--navy-dark);
    margin-bottom: 16px;
}

.app-promo-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.app-features-list {
    list-style: none;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.app-features-list li svg {
    flex-shrink: 0;
}

.app-store-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.store-badge {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

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

.store-badge svg {
    display: block;
}

/* App Mockup */
.app-promo-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.app-mockup-image {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 24px 48px rgba(13, 36, 97, 0.18)) drop-shadow(0 8px 16px rgba(13, 36, 97, 0.10));
}

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 136, 48, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    color: var(--white);
}

.cta-content > p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-brand .nav-logo span {
    color: var(--white);
}

.footer-brand .nav-logo-icon {
    filter: brightness(0) invert(1);
}

.footer-nav {
    display: flex;
    gap: 64px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* ---- Animations ---- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* -- Large desktops & down (≤1200px) -- */
@media (max-width: 1200px) {
    .footer-nav {
        gap: 40px;
    }
}

/* -- Tablets landscape & small laptops (≤1024px) -- */
@media (max-width: 1024px) {
    /* Hamburger menu replaces inline nav */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        z-index: 999;
    }

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

    .nav-links a {
        font-size: 1.2rem;
        color: var(--text-primary);
    }

    .navbar.scrolled .nav-links a {
        color: var(--text-primary);
    }

    .nav-links .nav-cta {
        margin-top: 8px;
        padding: 14px 32px;
        font-size: 1.1rem;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    /* When menu is open, hamburger always dark */
    .mobile-menu-btn.active span {
        background: var(--navy);
    }

    /* Section Intro: tighten gap */
    .section-intro,
    .section-intro--reverse {
        gap: 32px;
    }

    .section-intro-text {
        max-width: 100%;
    }

    /* Grids */
    .audience-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .audience-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* App promo tighten */
    .app-promo {
        gap: 40px;
    }

    .app-mockup-image {
        width: 280px;
    }

    /* Footer */
    .footer-content {
        gap: 32px;
    }

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

/* -- Tablets portrait (≤768px) -- */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h1 br {
        display: none;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        max-width: 480px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Section Intro: stack to single column */
    .section-intro,
    .section-intro--reverse {
        grid-template-columns: 1fr;
        gap: 28px;
        direction: ltr;
    }

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

    .section-intro-text .section-subtitle {
        max-width: 540px;
        margin: 0 auto;
    }

    .section-intro-image img {
        height: 280px;
    }

    .section-intro-image--illustration img {
        max-height: 320px;
    }

    /* Sections */
    .section {
        padding: 64px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2,
    .section-intro-text h2 {
        font-size: 1.8rem;
    }

    .section-header h2 br {
        display: none;
    }

    /* Cards: single column */
    .audience-grid--4,
    .audience-grid--3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .audience-card {
        padding: 24px;
    }

    /* App Section: single column */
    .app-promo {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .app-promo-content {
        max-width: 100%;
    }

    .app-features-list {
        text-align: left;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .app-store-badges {
        justify-content: center;
    }

    .app-mockup-image {
        width: 260px;
    }

    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Footer: stack */
    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 32px;
    }

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

/* -- Large phones (≤580px) -- */
@media (max-width: 580px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 110px 0 64px;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 400px;
    }

    .section {
        padding: 56px 0;
    }

    .section-header h2,
    .section-intro-text h2 {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-intro-image img {
        height: 240px;
    }

    .section-intro-image--illustration img {
        max-height: 260px;
    }

    .audience-grid--4,
    .audience-grid--3 {
        gap: 12px;
    }

    .audience-card {
        padding: 20px;
    }

    .audience-card h3 {
        font-size: 1.05rem;
    }

    .audience-card p {
        font-size: 0.9rem;
    }

    .app-promo-text {
        font-size: 1rem;
    }

    .app-features-list li {
        font-size: 0.9rem;
    }

    .app-mockup-image {
        width: 240px;
    }

    .cta-content h2 {
        font-size: 1.6rem;
    }

    .cta-content > p {
        font-size: 1rem;
    }

    .footer-nav {
        gap: 28px;
    }

    .footer-links h4 {
        font-size: 0.85rem;
    }
}

/* -- Small phones (≤400px) -- */
@media (max-width: 400px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 100px 0 56px;
    }

    .hero h1 {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 0.9rem;
        width: 100%;
    }

    .section {
        padding: 48px 0;
    }

    .section-header h2,
    .section-intro-text h2 {
        font-size: 1.4rem;
    }

    .section-intro {
        margin-bottom: 36px;
    }

    .section-intro-image img {
        height: 200px;
    }

    .section-intro-image--illustration img {
        max-height: 220px;
    }

    .audience-card {
        padding: 18px;
    }

    .app-mockup-image {
        width: 220px;
    }

    .store-badge svg {
        width: 120px;
        height: auto;
    }

    .footer-nav {
        flex-direction: column;
        gap: 24px;
    }
}
