/* 
   AIVIO 2026 Modern Design System 
   Based on DESIGN.md: Apple Design Language
*/

:root {
    --colors-primary: #0066cc;
    --colors-primary-focus: #0071e3;
    --colors-primary-on-dark: #2997ff;
    
    --colors-canvas: #ffffff;
    --colors-canvas-parchment: #f5f5f7;
    --colors-surface-pearl: #fafafc;
    --colors-surface-tile-1: #272729;
    --colors-surface-tile-2: #2a2a2c;
    --colors-surface-tile-3: #252527;
    --colors-surface-black: #000000;
    
    --colors-ink: #1d1d1f;
    --colors-body: #1d1d1f;
    --colors-body-on-dark: #ffffff;
    --colors-body-muted: #cccccc;
    --colors-ink-muted-80: #333333;
    --colors-ink-muted-48: #7a7a7a;
    
    --colors-divider-soft: rgba(0, 0, 0, 0.04);
    --colors-hairline: rgba(0, 0, 0, 0.08);
    
    --rounded-none: 0px;
    --rounded-sm: 8px;
    --rounded-md: 11px;
    --rounded-lg: 18px;
    --rounded-pill: 9999px;
    
    --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
    
    --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    --font-text: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    
    --spacing-section: 80px;
    --spacing-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    font-family: var(--font-text);
    background-color: var(--colors-canvas);
    color: var(--colors-body);
    line-height: 1.47;
    letter-spacing: -0.374px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--colors-ink);
}

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

/* Typography Hierarchy */
.hero-display {
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: -0.28px;
    font-weight: 600;
}

.display-lg, .section-title {
    font-size: 40px;
    line-height: 1.10;
    letter-spacing: 0;
    font-weight: 600;
    text-align: center;
    margin-bottom: 48px;
}

.lead {
    font-size: 28px;
    line-height: 1.14;
    letter-spacing: 0.196px;
    font-weight: 400;
}

.tagline {
    font-size: 21px;
    line-height: 1.19;
    letter-spacing: 0.231px;
    font-weight: 600;
}

/* Header & Navigation (global-nav) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: var(--colors-surface-black);
}

.logo {
    font-size: 14px;
    font-weight: 600;
    color: var(--colors-body-on-dark);
    text-decoration: none;
    letter-spacing: -0.12px;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--colors-body-on-dark);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.12px;
    transition: opacity 0.2s;
    opacity: 0.8;
}

.main-nav a:hover {
    opacity: 1;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 400;
}

.lang-switch a {
    text-decoration: none;
    color: var(--colors-body-on-dark);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.lang-switch a.active, .lang-switch a:hover {
    opacity: 1;
}
.lang-switch span {
    color: var(--colors-body-on-dark);
    opacity: 0.4;
}

/* Buttons */
.button-primary, .card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--colors-primary);
    color: var(--colors-canvas);
    font-family: var(--font-text);
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: var(--rounded-pill);
    transition: transform 0.1s ease;
}

.button-primary:active, .card-link:active {
    transform: scale(0.95);
}

.button-primary:focus-visible, .card-link:focus-visible {
    outline: 2px solid var(--colors-primary-focus);
    outline-offset: 2px;
}

/* Sections - Alternating Tiles */
main {
    padding-top: 44px; /* Offset for global-nav */
}

.section {
    padding: var(--spacing-section) 0;
    background: var(--colors-canvas);
    color: var(--colors-ink);
}

.section-dark {
    background: var(--colors-surface-tile-1);
    color: var(--colors-body-on-dark);
}
.section-dark .section-title, .section-dark h1, .section-dark h2, .section-dark h3 {
    color: var(--colors-body-on-dark);
}

.section-parchment {
    background: var(--colors-canvas-parchment);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: calc(var(--spacing-section) + 40px) 0;
    background: var(--colors-canvas-parchment);
}

.hero-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin-bottom: 24px;
    box-shadow: var(--shadow-product);
}

.hero h1 {
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: -0.28px;
    margin-bottom: 8px;
}

.hero p {
    font-size: 28px;
    line-height: 1.14;
    font-weight: 400;
    color: var(--colors-ink-muted-80);
    margin-bottom: 24px;
}

/* Profile Content */
.profile-content {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.profile-card {
    background: var(--colors-canvas);
    border: 1px solid var(--colors-hairline);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-lg);
    flex: 1 1 400px;
    max-width: 600px;
}

.section-dark .profile-card {
    background: var(--colors-surface-tile-2);
    border-color: rgba(255, 255, 255, 0.1);
}
.section-parchment .profile-card {
    background: var(--colors-canvas);
}

.profile-card h3 {
    font-size: 21px;
    margin-bottom: 16px;
}

.profile-card ul {
    list-style: none;
}

.profile-card li {
    font-size: 17px;
    padding: 8px 0;
    border-bottom: 1px solid var(--colors-divider-soft);
}
.section-dark .profile-card li {
    border-color: rgba(255,255,255,0.05);
}
.profile-card li:last-child {
    border-bottom: none;
}

/* Card Grid (Store utility cards) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--colors-canvas);
    border: 1px solid var(--colors-hairline);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-dark .card {
    background: var(--colors-surface-tile-2);
    border-color: rgba(255, 255, 255, 0.1);
}
.section-parchment .card {
    background: var(--colors-canvas);
}

.card-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--rounded-sm);
    overflow: hidden;
    background: var(--colors-surface-pearl);
    display: flex;
    justify-content: center;
    align-items: center;
}
.section-dark .card-image {
    background: var(--colors-surface-tile-3);
}

.card-image.landscape {
    aspect-ratio: 16 / 9;
}

.card-image.portrait {
    aspect-ratio: 1 / 1;
    padding: 20px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.card-image.portrait img {
    filter: drop-shadow(rgba(0, 0, 0, 0.22) 3px 5px 30px);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    width: 100%;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 17px;
    font-weight: 400;
    color: var(--colors-ink-muted-80);
    margin-bottom: 16px;
    flex-grow: 1;
}
.section-dark .card-desc {
    color: var(--colors-body-muted);
}

/* Tasks Table */
.tasks-content {
    background: var(--colors-canvas);
    border: 1px solid var(--colors-hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
}
.section-dark .tasks-content {
    background: var(--colors-surface-tile-2);
    border-color: rgba(255,255,255,0.1);
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
}

.tasks-table th, .tasks-table td {
    padding: 16px 24px;
    text-align: left;
    font-size: 17px;
    border-bottom: 1px solid var(--colors-divider-soft);
}
.section-dark .tasks-table th, .section-dark .tasks-table td {
    border-color: rgba(255,255,255,0.05);
}

.tasks-table th {
    font-weight: 600;
    background: var(--colors-surface-pearl);
}
.section-dark .tasks-table th {
    background: var(--colors-surface-tile-3);
}

.tasks-table tr:last-child td {
    border-bottom: none;
}

/* Ads Placeholder */
.ads-placeholder {
    margin: 40px auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

/* Footer */
.main-footer {
    background: var(--colors-canvas-parchment);
    padding: 64px 0;
    text-align: center;
}

.main-footer p {
    font-size: 12px;
    color: var(--colors-ink-muted-48);
    line-height: 1.0;
    margin-bottom: 8px;
}

/* Transitions */
.card, .profile-card, .section-title {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Responsive */
@media (max-width: 833px) {
    .main-nav {
        display: none;
    }
    .hero h1 { font-size: 40px; }
    .hero p { font-size: 24px; }
    .section { padding: 48px 0; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 419px) {
    .hero h1 { font-size: 28px; }
    .card-grid { grid-template-columns: 1fr; }
}