/* ============================================
   MedCompass — Apple-inspired clean editorial
   ============================================ */

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

:root {
    --indigo-700: #3b38a0;
    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    --indigo-400: #818cf8;
    --indigo-200: #c7d2fe;
    --charcoal: #1d1d1f;
    --body-text: #424245;
    --muted: #86868b;
    --bg: #ffffff;
    --bg-alt: #f5f5f7;
    --success: #30d158;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    color: var(--charcoal);
    line-height: 1.5;
    overflow-x: hidden;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---- Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.logo-text {
    height: 68px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 0.3s;
}

.navbar-scrolled .logo-text {
    filter: none;
}

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

.navbar-scrolled .nav-links a {
    color: var(--muted);
}

.navbar-scrolled .nav-links a:hover {
    color: var(--charcoal);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(160deg, rgba(30, 27, 94, 0.4) 0%, rgba(59, 56, 160, 0.4) 50%, rgba(79, 70, 229, 0.4) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-text {
    max-width: 540px;
    animation: fadeUp 1s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.hero-text h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    font-size: 80px;
    font-weight: 700;
    line-height: 1.05;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-text h1 em {
    font-style: normal;
    color: var(--indigo-200);
}

.hero-subtitle {
    font-size: 21px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 540px;
}

.app-store-badge-link {
    display: inline-block;
    margin-top: 48px;
}

.app-store-badge {
    height: 54px;
}

.hero-image {
    animation: fadeUp 1s cubic-bezier(0.25, 1, 0.5, 1) 0.15s both;
}

.hero-screenshot {
    width: 520px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Features
   ============================================ */
.features-section {
    padding-top: 120px;
}

.big-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    font-size: 72px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--charcoal);
    text-align: center;
    margin-bottom: 80px;
}

.big-title-light {
    color: #fff;
}

.feature-block {
    padding: 80px 0;
}

.feature-block-light {
    background: var(--bg-alt);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.feature-row-reverse {
    direction: rtl;
}

.feature-row-reverse > * {
    direction: ltr;
}

.feature-text h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.feature-number {
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1;
}

.feature-text p {
    font-size: 19px;
    color: var(--body-text);
    line-height: 1.65;
}

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

.feature-image img {
    width: 480px;
}

/* ---- More features ---- */
.more-features {
    text-align: center;
}

.more-features h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    margin-bottom: 48px;
}

.more-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}

.more-feature-card {
    padding: 36px 32px;
    background: var(--bg-alt);
    border-radius: 20px;
}

.more-feature-card h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.more-feature-card p {
    font-size: 17px;
    color: var(--body-text);
    line-height: 1.65;
}

@media (max-width: 968px) {
    .more-features-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* ============================================
   Security
   ============================================ */
.security-section {
    padding: 120px 0;
    background: var(--charcoal);
    color: #fff;
}

.security-intro {
    font-size: 21px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    text-align: center;
    max-width: 640px;
    margin: -40px auto 80px;
}

/* Cards */
.security-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 720px;
    margin: 0 auto 56px;
}

.security-card {
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: background 0.3s;
}

.security-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.security-card h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.security-card p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

/* Encryption chain */
.encryption-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 64px;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.chain-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    padding: 0 24px;
}

.chain-node strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--indigo-400);
}

.chain-node span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

.chain-connector {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

/* Checklist */
.checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 48px;
    max-width: 720px;
    margin: 0 auto;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.checklist-item svg {
    color: var(--success);
    flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--charcoal);
    color: #fff;
    padding: 48px 0 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer-brand {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-disclaimer {
    padding-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.7;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.footer-bottom {
    padding-top: 16px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
}

.apple-credit {
    margin-top: 8px;
}

/* ============================================
   Responsive: Tablet
   ============================================ */
@media (max-width: 968px) {
    .hero {
        padding: 100px 0 80px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-subtitle {
        margin: 0 auto;
    }

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

    .hero-text h1 {
        font-size: 56px;
    }

    .hero-subtitle {
        font-size: 19px;
    }

    .big-title {
        font-size: 52px;
        margin-bottom: 56px;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .feature-row-reverse {
        direction: ltr;
    }

    .feature-text h3 {
        font-size: 36px;
    }

    .feature-image img {
        width: 320px;
    }

    .security-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .encryption-chain {
        flex-wrap: wrap;
        gap: 16px;
    }

    .chain-connector {
        display: none;
    }

    .chain-node {
        padding: 12px 20px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* ============================================
   Responsive: Mobile
   ============================================ */
@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 88px 0 64px;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-content {
        gap: 32px;
    }

    .app-store-badge-link {
        margin-top: 28px;
    }

    .hero-screenshot {
        width: 300px;
    }

    .big-title {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .features-section {
        padding-top: 80px;
    }

    .feature-block {
        padding: 56px 0;
    }

    .feature-text h3 {
        font-size: 32px;
    }

    .feature-text p {
        font-size: 17px;
    }

    .feature-image img {
        width: 280px;
    }

    .security-section {
        padding: 80px 0;
    }

    .security-intro {
        font-size: 18px;
        margin-bottom: 48px;
    }

    .security-card {
        padding: 28px 24px;
    }

    .security-card h3 {
        font-size: 24px;
    }

    .security-card p {
        font-size: 16px;
    }

    .checklist {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .checklist-item {
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        gap: 20px;
    }
}
