/* DESIGN SYSTEM */
:root {
    --bg-page: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #0ea5e9;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --btn-bg: #0f172a;
    --btn-text: #ffffff;
}

[data-theme="dark"] {
    --bg-page: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --border: #334155;
    --card-bg: #1e293b;
    --btn-bg: #f8fafc;
    --btn-text: #0f172a;
}

body {
    margin: 0;
    background-color: var(--bg-page);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* TOP LEFT ICON - CIRCLE ANCHOR */
.icon-circle {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 50% 120%, var(--border) 0%, var(--bg-page) 100%);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: -5px;
}

.icon-circle img {
    height: 70%;
    width: auto;
    margin-left: 2px;
}

/* BRANDING: RESPONSIVE FLOATING J SYSTEM */
.miliojen-brand {
    display: inline-flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.j-container {
    position: relative;
    display: inline-block;
    width: 0.25em; 
    height: 1.2em;
    vertical-align: middle;
}

.j-container img {
    position: absolute;
    height: 140%; 
    width: auto;
    left: -0.65em; /* Maintained confirmed placement */
    top: -20%;
    z-index: 10; 
    pointer-events: none;
}

/* FLUID LOGO SIZE - Condensed max from 100px to 85px */
.hero-size {
    font-size: clamp(42px, 10vw, 85px); /* Reduced max to save vertical space */
}

/* BRAND BANNER - Tightened padding from 60px to 40px */
.hero-banner {
    margin: 0 2.5% 20px; /* Removed top margin, reduced bottom to 20px */
    padding: clamp(25px, 5vw, 35px) 5%; /* Minimized internal padding */
    border: 1px solid var(--border);
    border-radius: 40px;
    text-align: center;
    background: radial-gradient(circle at 50% 120%, var(--border) 0%, var(--bg-page) 100%);
    overflow: hidden;
}

/* MAIN BODY CONTENT - Condensed margins and sub-text size */
.main-body {
    max-width: 1000px;
    margin: 0 auto 25px; /* Reduced bottom margin from 60px to 40px */
    padding: 0 5%;
    text-align: center;
}

h1 {
    font-size: clamp(1.6rem, 5vw, 2.6rem); /* Reduced max from 3.2rem */
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    line-height: 1.1;
}

.hero-sub {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(1rem, 3vw, 1.2rem); /* Slightly smaller sub-text */
    line-height: 1.5;
}

/* NAVIGATION */
nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 5%;
    background: var(--bg-page);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ideology {
    color: var(--accent);
    text-transform: uppercase;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    letter-spacing: clamp(2px, 1vw, 5px);
    font-weight: 700;
    margin: 2rem 0 0;
    display: block;
}

/* SERVICES GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 25px;
    padding: 0 5%;
}

/* SERVICES GRID - Tightened internal card padding */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: clamp(1.5rem, 4vw, 2.5rem); /* Condensed from 4rem */
    border-radius: 28px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-10px); }
.card h2 { color: var(--text-main); font-size: 1.85rem; margin-top: 0; }

/* THEME UI */
#theme-btn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.7rem;
}

footer {
    padding: 1.5rem 5%;
    text-align: center;
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    .hero-banner { margin: 5px 3% 30px; border-radius: 30px; }
    .grid { grid-template-columns: 1fr; }
}
