/* Reset & Base */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --accent-color: #555;
    --card-bg: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-speed: 0.3s;
    --primary-btn: #000;
    --primary-btn-text: #fff;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
    --bg-color: #111;
    --text-color: #eee;
    --card-bg: #222;
    --accent-color: #aaa;
    --primary-btn: #fff;
    --primary-btn-text: #000;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.4);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

.lang-switch, .icon-btn {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-switch {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.icon-btn {
    width: 40px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--text-color);
    padding: 0;
}

.lang-switch:hover, .icon-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Icon visibility logic */
.icon-sun { display: none; }
.icon-moon { display: block; }

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }


/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    gap: 60px;
    min-height: 700px; /* Ensure vertical space for the phone */
}

.hero-content {
    flex: 1;
    max-width: 500px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-weight: 400;
}

.btn-download {
    display: inline-block;
    background-color: var(--primary-btn);
    color: var(--primary-btn-text);
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-download:hover {
    transform: scale(1.05);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Phone Frame */
.phone-frame {
    width: 300px; /* Slightly larger for the hero */
    height: auto;
    border-radius: 46px; /* Match typical iPhone curve */
    border: 8px solid #333;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    background: #000;
    aspect-ratio: 9 / 19.5; /* iPhone aspect ratio */
}

[data-theme="dark"] .phone-frame {
    border-color: #444;
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease-in-out; 
}

.phone-frame img.loaded {
    opacity: 1;
}

/* Features Grid */
.features {
    padding: 60px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    margin-bottom: 16px;
    display: block;
    color: var(--text-color);
}

.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--accent-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Stop Loss Banner */
.stoploss-banner {
    background-color: var(--card-bg);
    border-radius: 32px;
    padding: 60px;
    text-align: center;
    margin: 40px 0;
    box-shadow: var(--shadow-soft);
}

.stoploss-content {
    max-width: 600px;
    margin: 0 auto;
}

.big-icon {
    display: block;
    margin-bottom: 20px;
    color: var(--text-color);
}

.stoploss-banner h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.stoploss-banner p {
    font-size: 1.1rem;
    color: var(--accent-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0;
    color: var(--accent-color);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .phone-frame {
        width: 260px;
    }
}
