/* =========================================
   1. CORE VARIABLES & SETUP
   ========================================= */
:root {
    /* YOUR PALETTE */
    --bg-color: #FFFFFF;
    --bg-subtle: #FAFAFA;
    --text-primary: #0B0B0B;
    --text-secondary: #8E8A84;
    --accent-dark: #0B0B0B;
    --accent-gold: #F2B705;
    --accent-beige: #D8C2A6;
    --accent-blue: #5C74F0;
    
    --radius-xl: 24px;
    --radius-md: 16px; /* Slightly softer corners like iOS */
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    /* THE APPLE SYSTEM FONT STACK */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.5;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .logo, .card-title {
    font-family: inherit; /* Use the same system font */
    font-weight: 700;
    letter-spacing: -0.02em; /* Tight Apple-style headers */
}

/* Ambient Glow */
.ambient-glow {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(216, 194, 166, 0.15) 0%, rgba(255,255,255,0) 60%);
    z-index: -1; pointer-events: none;
}

/* Navigation */
.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 40px; max-width: 1000px; margin: 0 auto;
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); /* Heavy iOS blur */
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo { font-size: 1.25rem; font-weight: 700; color: var(--accent-dark); letter-spacing: -0.5px; }
.dot { color: var(--accent-gold); }
.nav-links a {
    text-decoration: none; color: var(--text-secondary); margin-left: 32px;
    font-size: 0.9rem; font-weight: 500; transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-dark); }

/* Hero */
.hero-section {
    min-height: 60vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 20px;
}
.badge-pill {
    display: inline-flex; align-items: center; gap: 6px; background: var(--bg-color);
    padding: 6px 16px; border-radius: 99px; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); 
    border: 1px solid var(--accent-beige); margin-bottom: 24px;
}
h1 { 
    font-size: 3.5rem; line-height: 1.05; margin-bottom: 24px; color: var(--accent-dark); 
    letter-spacing: -0.04em; /* Super tight header */
}
.subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 48px; font-weight: 400; max-width: 600px; }

.btn-primary {
    background: var(--accent-dark); color: var(--bg-color);
    padding: 16px 32px; border-radius: 99px; border: none;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.2s ease; text-decoration: none;
}
.btn-primary:active { transform: scale(0.96); opacity: 0.9; }

/* Scanner */
.scanner-section { padding: 20px 20px 100px; display: flex; flex-direction: column; align-items: center; }
.scanner-container { width: 100%; max-width: 480px; }
.upload-frame {
    background: var(--bg-color); border-radius: var(--radius-xl); height: 420px;
    position: relative; overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow-soft); border: 1px solid var(--accent-beige);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.upload-frame:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.upload-content { text-align: center; padding: 20px; }
.icon-circle {
    width: 60px; height: 60px; background: var(--bg-subtle); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; color: var(--accent-gold);
}
.preview-image { width: 100%; height: 100%; object-fit: cover; display: none; }
.scan-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.2); display: none; z-index: 5;
}
.scan-line {
    width: 100%; height: 2px; background: var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-gold); position: absolute; top: 0;
    animation: scanMove 2s infinite linear;
}
@keyframes scanMove { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* Report UI */
.report-container { width: 100%; max-width: 800px; margin-top: 40px; display: none; }

/* Animations */
.animate-in {
    opacity: 0; transform: translateY(20px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpFade { to { opacity: 1; transform: translateY(0); } }

.report-header { text-align: center; margin-bottom: 40px; }
.skin-type-title { font-size: 2.2rem; color: var(--accent-dark); margin: 8px 0; letter-spacing: -0.03em; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
    background: var(--bg-color); padding: 28px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft); border: 1px solid var(--accent-beige);
}
.card.full-width { grid-column: span 2; }
.card-title {
    font-size: 1.1rem; margin-bottom: 16px; font-weight: 600;
    display: flex; align-items: center; gap: 10px; color: var(--accent-dark);
}

/* Meters */
.metrics-wrapper { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.meter-container { width: 100%; }
.meter-label {
    display: flex; justify-content: space-between; font-size: 0.75rem;
    font-weight: 600; margin-bottom: 6px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.meter-bg {
    width: 100%; height: 6px; background-color: var(--bg-subtle);
    border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);
}
.meter-fill {
    height: 100%; background: linear-gradient(90deg, var(--accent-beige), var(--accent-gold));
    border-radius: 10px; transition: width 1s ease-out;
}

/* Tags & Lists */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.skin-tag {
    background: var(--bg-subtle); padding: 6px 14px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 500; color: var(--text-primary); border: 1px solid rgba(0,0,0,0.03);
}
.routine-list li {
    margin-bottom: 12px; padding-left: 20px; position: relative;
    color: var(--text-secondary); list-style: none; font-size: 0.95rem;
}
.routine-list li::before {
    content: ""; width: 6px; height: 6px; background: var(--accent-gold);
    border-radius: 50%; position: absolute; left: 0; top: 9px;
}

/* Skeleton Loader */
.skeleton-wrapper { width: 100%; max-width: 800px; margin-top: 40px; display: none; }
.skeleton-block { background: #f0f0f0; border-radius: 8px; margin-bottom: 10px; position: relative; overflow: hidden; }
.skeleton-block::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* About Page Specifics */
.about-page { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.content-block { margin-bottom: 80px; }
.founder-card {
    background: var(--bg-color); padding: 40px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft); border: 1px solid var(--accent-beige);
    border-left: 4px solid var(--accent-gold);
}
.signature {
    margin-top: 40px; border-top: 1px solid var(--accent-beige); padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.med-school-tag {
    background: #EEF2FF; color: var(--accent-blue); padding: 4px 12px;
    border-radius: 99px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.philosophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.philosophy-item {
    background: var(--bg-color); padding: 32px; border-radius: 16px; text-align: center;
    border: 1px solid var(--accent-beige);
}
.cta-section {
    text-align: center; padding: 60px 20px; background: var(--bg-subtle);
    border-radius: var(--radius-xl); border: 1px solid var(--accent-beige);
}
.glass-footer { text-align: center; padding: 40px; color: var(--text-secondary); font-size: 0.85rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .analysis-grid { grid-template-columns: 1fr; }
    .card.full-width { grid-column: span 1; }
    .signature { flex-direction: column; gap: 10px; align-items: flex-start; }
}


