/* ==========================
   Theme Variables
   ========================== */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --accent-color: #8c52ff;
    --accent-hover: #6b5cf6;
    --card-bg: #f5f5f5;
    --header-bg: rgba(230, 230, 230, 0.9);
    --footer-bg: #eeeeee;
    --footer-text: #333333;
}

body.dark-mode {
    --bg-color: #1a1124;
    --text-color: #ffffff;
    --accent-color: #8c52ff;
    --accent-hover: #6b5cf6;
    --card-bg: rgba(230, 230, 230, 0.05);
    --header-bg: rgba(27, 17, 39, 0.95);
    --footer-bg: #120b18;
    --footer-text: #bbbbbb;
}

/* ==========================
   Global Styles
   ========================== */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    transition: background 0.3s, color 0.3s;
}

h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* ==========================
   Header
   ========================== */
header {
    position: relative; /* so nav positions relative to header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-bg);
    padding: 15px;
    z-index: 1000;
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--accent-color);
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 20px;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
}

/* ==========================
   Hero
   ========================== */
.hero {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: linear-gradient(rgba(26, 17, 36, 0.0), rgba(26, 17, 36, 0.0)),
    url('images/logo_backgroundless.png') center/80% no-repeat;
    background-position: center center;
    flex-direction: column;
}

/* new background wrapper (hidden on desktop) */
.hero-image {
    display: none;
}


.hero-content {
    padding-top: 100px;
    max-width: 90%;
    transition: transform 0.3s ease;
}

.hero h1 {
    padding-top: 140px;
    font-size: 4em;
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2em;
    margin: 15px 0;
}

.btn {
    background: var(--accent-color);
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--accent-hover);
}

.icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    filter: brightness(0) invert(1); /* keeps them white in dark mode */
    transition: filter 0.3s;
}

/* ==========================
   Purpose Section
   ========================== */

/* Purpose Section */
.purpose-section {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color);
}

.purpose-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.purpose-icon {
    width: 40px;
    height: 40px;
    padding: 10px;
    filter : brightness(0) invert(1);
}

.purpose-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.founder-photo-wrapper {
    position: relative;
    display: inline-block;
}

.founder-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* LinkedIn icon overlay */
.linkedin-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 20%;
    background: var(--header-bg);
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);

    -webkit-mask: url("images/linkedin.svg") no-repeat center;
    -webkit-mask-size: contain;
    mask: url("images/linkedin.svg") no-repeat center;
    mask-size: 80%;

    background-color: var(--accent-color); /* only icon becomes purple */
}


/*===========================
   Why Fraxen Section
   ========================== */

#why-fraxen h2 {
    margin-bottom: 50px;
}

#why-fraxen .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

#why-fraxen .about-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    line-height: 1.6;
}


/* ==========================
   Sections
   ========================== */
section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
    max-width: 1200px;
    margin: auto;
}

/* Values & About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.about-box, .values-line {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.about-box h3 {
    color: var(--accent-color);
}

.about-box:hover, .values-line:hover {
    transform: translateY(-5px);
    background: rgba(107, 92, 246, 0.15);
}

.about-box h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.about-box p {
    font-size: 0.95em;
    line-height: 1.5em;
    color: var(--text-color);
}

/* Founders Section */
/* Founders grid override */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* Always 3 equal */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Make boxes uniform */
.founder-box {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0; /* stops overflow */
}



.founder-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}
@media (max-width: 900px) {
    .founder-photo {
        width: 140px;
        height: 140px;
    }
    .founder-box h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .founder-photo {
        width: 120px;
        height: 120px;
    }
    .founder-box h3 {
        font-size: 0.85rem;
    }
}

#founders p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
    padding-top: 20px;
}

#founders a {
    color: var(--text-color);
}

/* Coming Soon List */
.coming-soon ul {
    list-style: none;
    padding: 0;
}

.coming-soon li {
    font-size: 1.1em;
    margin: 10px 0;
}

.tag {
    background: var(--accent-color);
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.8em;
    margin-left: 5px;
}

.theme-toggle {
    width: 20px;
    height: 20px;
    background: url("images/sun.svg") no-repeat center / contain;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

body.dark-mode .theme-toggle {
    background: url("images/moon.svg") no-repeat center / contain;
    filter: brightness(0) invert(1);
}


/* ==========================
   Footer
   ========================== */
footer {
    text-align: center;
    padding: 20px 10px;
    background: var(--footer-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 5px 0;
}

.footer-info {
    font-size: 0.85rem;
    color: var(--footer-text);
}

footer a {
    color: var(--footer-text);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


/* ==========================
   Animations
   ========================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================
   Responsive
   ========================== */
/* Mobile nav */
@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 100%;   /* directly below header */
        right: -10px; /* align with burger button padding */
        background: var(--header-bg);
        flex-direction: column;
        padding: 10px 20px;
        gap: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        min-width: 150px; /* keep width tidy */
    }

    nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-color);
        margin-right: 10px;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        background: none; /* remove background from whole hero */
    }

    .hero-image {
        display: block;
        width: 100%;
        height: 40vh; /* adjust to look good */
        background: url('images/logo_fullbackgroundless.png') center/90% no-repeat;
        background-size: contain;
    }

    .hero-content {
        margin-top: 20px; /* spacing from image */
    }

    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 3rem);
        padding-top: 0;
    }

    .hero p {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }
}

@media (max-width: 1050px) and (orientation: landscape) {
    .hero {
        background: none; /* remove background */
        flex-direction: column; /* stack image then content */
    }

    .hero-image {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;   /* keep proportions */
        background: url('images/logo_fullbackgroundless.png') center/110% no-repeat;
        background-size: contain;
    }

    .hero-content {
        margin-top: 20px;
    }
}


/* Scale everything proportionally on smaller screens */
@media (max-width: 1024px) {
    .hero-content {
        transform: scale(0.9); /* 90% of original size */
    }
}

@media (max-width: 768px) {
    .hero-content {
        transform: scale(0.8); /* 80% on tablets/small screens */
    }
}

@media (max-width: 480px) {
    .hero-content {
        transform: scale(0.7); /* 70% on phones */
    }
}

/* Force single-column centered layout on small screens (portrait + landscape) */
@media (max-width: 800px) {
    .section {
        padding: 50px 15px; /* slightly less padding */
    }
    .about-grid {
        grid-template-columns: 1fr; /* one column */
        justify-items: center;      /* center boxes */
    }

    .about-box, .values-line {
        width: 90%;        /* full width inside section */
        max-width: 600px;   /* keep it readable, not too wide */
        text-align: center; /* center text if you prefer */
    }
}

/* Responsive stacking for Why Fraxen */
@media (max-width: 900px) {
    #why-fraxen .about-grid {
        grid-template-columns: 1fr; /* single column */
        gap: 20px;
        justify-items: center;
    }

    #why-fraxen .about-box {
        width: 90%;        /* match other responsive boxes */
        max-width: 600px;  /* keep it readable */
        text-align: center;
    }
}

/* Small screens: reduce font size for Coming Soon list and Contact section paragraph */
@media (max-width: 480px) {
    .coming-soon ul li {
        font-size: 0.9em; /* smaller list items */
    }

    #contact p {
        font-size: 0.9em; /* smaller paragraph text */
    }
}



h1, h2, h3, p {
    word-wrap: break-word;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4em); /* adjusts automatically */
    padding-top: 0; /* remove extra spacing */
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.2em);
}

.btn {
    padding: clamp(8px, 1.5vw, 10px) clamp(20px, 3vw, 25px);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.contact-buttons .contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    border-radius: 50%;
    padding: 12px;
    transition: background 0.3s, transform 0.3s;
}

.contact-buttons .contact-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.contact-buttons .contact-btn img {
    display: block;
    filter: brightness(0) invert(1);
}

/* In light mode */
body:not(.dark-mode) .icon,
body:not(.dark-mode) .purpose-icon {
    filter: none;
}
