:root {
    /* Logo-derived Palette: Deep Navy & Royal Blue */
    --bg-color: #030816;
    /* Deepest Navy (instead of black) */
    --text-color: #f0f4ff;
    /* Cool white */

    /* The specific blue from the logo (Deep Royal/Navy) */
    --brand-primary: #0a2463;
    --brand-light: #3e92cc;
    /* Lighter highlight blue */

    --accent-color: #00d4ff;
    /* Cyan pop for high contrast elements */

    /* Surfaces are now tinted blue, not just gray */
    --surface-color: rgba(10, 36, 99, 0.25);
    --surface-hover: rgba(62, 146, 204, 0.15);

    --gradient-main: linear-gradient(135deg, #1ca9c9, #0a2463);

    --font-main: 'Outfit', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-tamil: 'Mukta Malar', 'Outfit', sans-serif;
    --nav-height: 90px;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(10, 36, 99, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(62, 146, 204, 0.1) 0%, transparent 50%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-family: var(--font-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(3, 8, 22, 0.85);
    /* Dark blue tinted glass */
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(62, 146, 204, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 8px;
    /* Slightly rounded corners for a modern square look */
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #3e92cc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(240, 244, 255, 0.7);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(62, 146, 204, 0.6);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-light);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.cta-button {
    padding: 12px 28px;
    background: var(--gradient-main);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(10, 36, 99, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.cta-button.secondary {
    background: rgba(10, 36, 99, 0.3);
    border: 1px solid var(--brand-light);
    box-shadow: none;
    color: var(--brand-light);
    -webkit-text-fill-color: initial;
}

.cta-button.secondary:hover {
    background: rgba(62, 146, 204, 0.15);
    color: #fff;
}

/* Sections */
section {
    padding: 100px 5%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Hero Section Styles */
.hero {
    min-height: 100vh;
    padding-top: var(--nav-height);
    text-align: center;
    align-items: center;
    background: transparent;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Overlapping Logo Watermark - Now strictly themed */
.hero-logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background-image: url('assets/logo.jpg');
    background-size: 110%;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    /* Increased visibility of the blue logo */
    z-index: -1;
    filter: brightness(1.2) contrast(1.1);
    /* Keep blue hue */
    pointer-events: none;
    mix-blend-mode: screen;
    /* Blends nicely over dark blue */
}

/* Rotating decorative ring around watermark */
.hero-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65vh;
    height: 65vh;
    border: 1px dashed rgba(62, 146, 204, 0.2);
    border-radius: 50%;
    z-index: -1;
    animation: spin-slow 80s linear infinite;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 25px;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff, #89cff0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(10, 36, 99, 0.8);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: rgba(240, 244, 255, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Abstract Background Elements */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    /* Behind watermark */
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

.bg-shape-1 {
    width: 500px;
    height: 500px;
    background: var(--brand-primary);
    top: -100px;
    left: -100px;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: var(--brand-light);
    bottom: 0px;
    right: -100px;
    animation-delay: 5s;
}

/* Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 40px;
}

.card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(62, 146, 204, 0.1);
    transition: var(--transition-speed);
    backdrop-filter: blur(5px);
}

.card:hover {
    background: var(--surface-hover);
    transform: translateY(-5px);
    border-color: rgba(62, 146, 204, 0.4);
    box-shadow: 0 10px 30px rgba(10, 36, 99, 0.3);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #fff;
}

.card p {
    color: rgba(240, 244, 255, 0.7);
    font-size: 0.95rem;
}

/* Focus Section */
.focus-section {
    background: linear-gradient(180deg, var(--bg-color) 0%, #01040a 100%);
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
}

.section-subtitle {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    color: rgba(240, 244, 255, 0.7);
}

/* Footer */
footer {
    background: #01040a;
    padding: 60px 5% 20px;
    border-top: 1px solid rgba(62, 146, 204, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(240, 244, 255, 0.6);
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Timeline specific */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(62, 146, 204, 0.2);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 3px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-color);
}

.left {
    left: 0;
    text-align: right;
}

.right {
    left: 50%;
}

.left::after {
    right: -8px;
}

.right::after {
    left: -8px;
}

.content {
    padding: 20px 30px;
    background: var(--surface-color);
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(62, 146, 204, 0.1);
    transition: var(--transition-speed);
}

.content:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 22px;
    }

    .left::after,
    .right::after {
        left: 22px;
    }

    .left {
        text-align: left;
    }

    .right {
        left: 0%;
    }

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

    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now, JS will toggle */
    }

    .hero-logo-watermark {
        background-size: 100vh;
        /* Adjust for mobile */
    }
}

/* --- Enhanced Mobile Optimizations --- */

/* Standard Form Styles (Global) */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .navbar {
        padding: 0 20px;
    }

    .logo-img {
        height: 40px;
        width: 40px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(3, 8, 22, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding: 40px;
        border-left: 1px solid rgba(62, 146, 204, 0.1);
        display: flex !important;
        /* Override the display: none if present */
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.3rem;
        display: block;
        padding: 10px;
    }

    .navbar>.cta-button {
        display: none;
        /* Hide top CTA on mobile, it can be in the menu or handled below */
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }

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

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

    /* Hero adjustments */
    .hero h1 {
        font-size: 2.2rem !important;
        padding: 0 10px;
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 20px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 40px;
        gap: 15px;
    }

    .hero-buttons .cta-button {
        width: 100%;
        text-align: center;
    }

    /* Grid Adjustments */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin-top: 20px;
    }

    section {
        padding: 50px 20px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    /* Adjust text blocks for mobile readability */
    .text-block,
    article p,
    .focus-section p {
        font-size: 1rem !important;
        line-height: 1.6;
    }

    .cta-button.special {
        width: 100%;
        font-size: 1.1rem;
        padding: 14px 20px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}


/* Specific Class-based Optimizations */
.form-container {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Full width buttons on mobile */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        padding: 0 10px;
    }

    .hero-buttons .cta-button {
        width: 100%;
        text-align: center;
    }

    .cta-button.special {
        width: 100%;
        font-size: 1.1rem;
        padding: 14px 20px;
    }

    /* Grid spacing for mobile */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

.centered-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
    /* Added side padding for mobile */
}

/* Founder Section Styles */
.founder-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.founder-text {
    flex: 1;
}

.founder-image-box {
    flex: 0 0 350px;
    height: 350px;
    background: linear-gradient(45deg, var(--brand-primary), var(--brand-light));
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.founder-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: brightness(1.2) contrast(1.1);
}

.founder-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(3, 8, 22, 0.9));
}

.quote-box {
    color: rgba(240, 244, 255, 0.9);
    font-size: 1.15rem;
    line-height: 1.8;
    border-left: 4px solid var(--accent-color);
    padding-left: 30px;
    font-style: italic;
}

@media screen and (max-width: 992px) {
    .founder-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .founder-image-box {
        flex: 0 0 300px;
        width: 300px;
        height: 300px;
    }

    .quote-box {
        border-left: none;
        border-top: 4px solid var(--accent-color);
        padding-left: 0;
        padding-top: 20px;
        text-align: center;
    }
}

@media screen and (max-width: 992px) {
    .founder-text .section-title {
        text-align: center !important;
    }
}

/* Custom Attractive Button */
.cta-button.special {
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 50%, #00d2ff 100%);
    background-size: 200% auto;
    color: #fff;
    padding: 16px 45px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.4);
    transition: 0.5s;
    border: none;
    cursor: pointer;
    display: inline-block;
    animation: gradientMove 3s infinite linear;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
}

.cta-button.special:hover {
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.7);
    transform: scale(1.05) translateY(-2px);
}

@keyframes gradientMove {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.home-social-links {
    margin-top: 35px;
    display: flex;
    gap: 35px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.home-social-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.home-social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    opacity: 1;
}

.join-action-box {
    text-align: center;
    margin-top: 50px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

/* Language Switcher Styles */
.lang-switcher {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: 0.3s;
}

.lang-btn:hover {
    border-color: var(--accent-color);
}

.lang-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

@media screen and (max-width: 768px) {
    .navbar {
        padding: 0 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo-container {
        order: 1;
        flex-shrink: 1;
        min-width: 0;
    }

    .logo-text {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lang-switcher {
        position: static;
        order: 2;
        margin-left: auto;
        margin-right: 12px;
        background: transparent;
        padding: 0;
        backdrop-filter: none;
        z-index: 1002;
        flex-shrink: 0;
    }

    .mobile-menu-btn {
        order: 3;
        flex-shrink: 0;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
}

/* --- Robust Tamil Language Support --- */

body.lang-ta {
    font-family: var(--font-tamil) !important;
    line-height: 1.8;
}

body.lang-ta * {
    font-family: var(--font-tamil) !important;
    letter-spacing: 0 !important;
    word-break: break-word;
    /* Protect against long Tamil words */
}

body.lang-ta h1,
body.lang-ta h2,
body.lang-ta h3 {
    line-height: 1.4;
    font-weight: 500;
}

body.lang-ta p,
body.lang-ta li {
    font-weight: 400;
}

body.lang-ta .cta-button {
    letter-spacing: 0.5px !important;
    text-transform: none;
    /* Tamil doesn't have cases */
}

/* Mobile-specific Tamil optimizations */
@media screen and (max-width: 768px) {
    body.lang-ta .hero h1 {
        font-size: 1.8rem;
        padding: 0 15px;
    }

    body.lang-ta .hero p {
        font-size: 1rem;
        line-height: 1.8;
    }

    body.lang-ta .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    body.lang-ta .section-subtitle {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    body.lang-ta .card h3 {
        font-size: 1.2rem;
    }

    body.lang-ta .nav-links a {
        font-size: 1.1rem;
    }

    body.lang-ta .cta-button.special {
        width: 90%;
        font-size: 1rem;
        padding: 14px 20px;
    }

    body.lang-ta .timeline-item {
        padding-left: 55px;
        padding-right: 15px;
    }
}

/* Smooth Switching */
body {
    transition: font-family 0.3s ease, line-height 0.3s ease;
}

[data-i18n] {
    transition: opacity 0.3s ease;
}