/* ==========================================================================
   SmartFarm Chiang Dao - Clean Minimalist Landing Page (System-Wide Teal Theme)
   Matched precisely with SmartFarm Design System (#0f766e & #f8fafc)
   ========================================================================== */

:root {
    /* Exact SmartFarm System Color Palette */
    --primary: #0f766e;
    --primary-hover: #115e59;
    --primary-light: #f0fdfa;
    --primary-border: #ccfbf1;
    --primary-glow: rgba(15, 118, 110, 0.15);

    --status-active: #059669;
    --status-active-bg: #ecfdf5;
    --status-active-border: #a7f3d0;

    /* Backgrounds */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #ffffff;
    --bg-subtle: #f1f5f9;
    
    /* Hairline & Card Borders */
    --border-card: #e2e8f0;
    --border-card-hover: #a7f3d0;
    --border-subtle: #e2e8f0;

    /* Typography */
    --text-main: #0f172a;
    --text-body: #475569;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --font-main: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 4px 14px 0 rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 12px 28px -4px rgba(15, 118, 110, 0.1), 0 4px 10px -1px rgba(15, 23, 42, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body.landing-body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(15, 118, 110, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(15, 118, 110, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Subtle Ambient Glow */
.ambient-glow {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(15, 118, 110, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   Header / Sticky Navbar
   ========================================================================== */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02);
    transition: all 0.3s ease;
}

.landing-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    flex-shrink: 1;
    min-width: 0;
}

.landing-brand-logo-wrap {
    position: relative;
    flex-shrink: 0;
}

.landing-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

.landing-brand-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 2px;
}

.online-indicator-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--status-active);
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

.landing-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.landing-brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-brand-institution {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-nav-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

/* Minimalist Language Switcher */
.landing-lang-toggle {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.landing-lang-btn {
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s ease;
    font-family: var(--font-main);
}

.landing-lang-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.landing-lang-btn:hover:not(.active) {
    color: var(--text-main);
}

.landing-lang-sep {
    font-size: 0.65rem;
    color: var(--border-card);
}

/* Sign In Top Button */
.landing-btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--primary);
    color: #ffffff;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
    border: 1px solid var(--primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-btn-signin:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
    color: #ffffff;
}

/* ==========================================================================
   Hero Section with Clean Presentation
   ========================================================================== */
.landing-hero-section {
    position: relative;
    padding: 5rem 1.5rem 4.5rem 1.5rem;
    text-align: center;
    overflow: hidden;
}

/* Hero Background Image with Seamless Presentation */
.hero-bg-media {
    position: absolute;
    inset: 0;
    background-image: url('/images/smartfarm_hero_bg.jpg');
    background-position: center 25%;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0.5;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(248, 250, 252, 0.6) 0%,
        rgba(248, 250, 252, 0.75) 40%,
        rgba(248, 250, 252, 0.95) 80%,
        var(--bg-page) 100%
    );
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 118, 110, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
    pointer-events: none;
}

.landing-hero-wrap {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Initiative Pill */
.landing-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid var(--primary-border);
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.75rem;
}

.landing-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-active);
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.5);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Hero Typography: High Contrast, Clean, Professional */
.landing-title {
    font-size: clamp(2rem, 5vw + 1rem, 3.4rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem 0;
}

.landing-title-gradient {
    display: block;
    color: var(--primary);
    margin-top: 0.25rem;
}

.landing-subtitle {
    font-size: clamp(0.95rem, 1.5vw + 0.5rem, 1.125rem);
    color: var(--text-body);
    line-height: 1.75;
    margin: 0 auto 2.25rem auto;
    max-width: 740px;
}

/* CTA Group */
.landing-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.landing-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.85rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-main);
}

.landing-btn-hero.primary {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.landing-btn-hero.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.35);
    color: #ffffff;
}

.landing-btn-hero.secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
}

.landing-btn-hero.secondary:hover {
    background: var(--bg-subtle);
    border-color: #cbd5e1;
    color: var(--text-main);
    transform: translateY(-2px);
}

/* ==========================================================================
   Clean Telemetry Strip (4 White Glass Cards)
   ========================================================================== */
.landing-telemetry-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.telemetry-chip {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
}

.telemetry-chip:hover {
    border-color: var(--primary-border);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.telemetry-chip-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.telemetry-chip-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.telemetry-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-active);
    display: inline-block;
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
    animation: pulseGlow 1.5s infinite;
}

.telemetry-label {
    font-size: 0.725rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Content Sections (Pillars & System Highlights)
   ========================================================================== */
.landing-content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    position: relative;
    z-index: 2;
}

.landing-section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.landing-section-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.landing-section-heading {
    font-size: clamp(1.6rem, 3vw + 0.5rem, 2.25rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0 0 0.85rem 0;
}

.landing-section-subheading {
    font-size: 0.975rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

/* Pillars 3-Column Grid */
.landing-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.landing-pillar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
}

.landing-pillar-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.pillar-glass-shimmer {
    display: none;
}

.landing-pillar-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 1.25rem;
}

.landing-pillar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.85rem 0;
    letter-spacing: -0.01em;
}

.landing-pillar-desc {
    font-size: 0.925rem;
    color: var(--text-body);
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.pillar-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    align-self: flex-start;
}

/* Features Wrap */
.landing-system-features-wrap {
    margin-top: 5.5rem;
}

.landing-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.landing-info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
}

.landing-info-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.info-card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.landing-info-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.landing-info-desc {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Bottom Action Banner (Deep Teal Gradient Matching Primary)
   ========================================================================== */
.landing-bottom-banner {
    position: relative;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 5.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.2);
    color: #ffffff;
}

.banner-glow-bg {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.landing-bottom-banner .landing-section-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.landing-bottom-title {
    font-size: clamp(1.6rem, 3vw + 0.5rem, 2.25rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
}

.landing-bottom-desc {
    font-size: 1rem;
    color: #e2e8f0;
    margin: 0 0 0.5rem 0;
    line-height: 1.65;
}

.landing-bottom-banner .landing-btn-hero.primary {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.landing-bottom-banner .landing-btn-hero.primary:hover {
    background: #f8fafc;
    color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.landing-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-card);
    padding: 2.5rem 1.5rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.landing-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.footer-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-meta {
    font-size: 0.8rem;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 992px) {
    .landing-pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-telemetry-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .landing-nav-container {
        padding: 0.75rem 1rem;
    }
    .landing-brand-institution {
        display: none;
    }
    .landing-brand-name {
        font-size: 0.95rem;
    }
    .landing-hero-section {
        padding: 3rem 1rem 2.5rem 1rem;
    }
    .landing-hero-wrap {
        padding: 0;
    }
    .landing-pill {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
        margin-bottom: 1.25rem;
    }
    .landing-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    .landing-btn-hero {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.25rem;
    }
    .landing-pillars-grid {
        grid-template-columns: 1fr;
    }
    .landing-grid-2col {
        grid-template-columns: 1fr;
    }
    .landing-content-section {
        padding: 3rem 1rem;
    }
    .landing-system-features-wrap {
        margin-top: 3rem;
    }
    .landing-bottom-banner {
        padding: 2.5rem 1.25rem;
        margin-top: 3rem;
    }
    .landing-footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .landing-nav-container {
        padding: 0.65rem 0.85rem;
    }
    .landing-brand-icon,
    .landing-brand-logo-img {
        width: 36px;
        height: 36px;
    }
    .landing-btn-signin .btn-text {
        display: inline;
    }
    .landing-btn-signin {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }
    .landing-telemetry-strip {
        grid-template-columns: 1fr;
    }
    .telemetry-chip {
        padding: 0.85rem 1rem;
    }
}
