/* Apple-Inspired Design System */
:root {
    --color-bg: #ffffff;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-accent: #000000;
    --spacing-xl: 60px;
    --spacing-lg: 80px;
    --spacing-md: 40px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation - Apple Style */
.nav-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.nav-logo {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.011em;
    color: var(--color-text);
    text-decoration: none;
    margin-right: auto;
}

.nav-menu {
    display: flex;
    gap: 36px;
}

.nav-menu a {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

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

/* Hero Section - Full Screen */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.hero-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.5));
}

.hero-text {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #000;
}

.hero-headline {
    font-size: 96px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.05;
    margin-bottom: 20px;
}

.hero-tagline {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.011em;
    line-height: 1.381;
    opacity: 0.7;
}

/* Feature Sections */
.feature-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: var(--color-bg);
}

.feature-section.dark {
    background: #f5f5f7;
}

.feature-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

.section-headline {
    font-size: 64px;
    font-weight: 600;
    letter-spacing: -0.009em;
    line-height: 1.0625;
    margin-bottom: 16px;
}

.section-description {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.007em;
    line-height: 1.14286;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.cta-link {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0.011em;
    color: #0071e3;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s;
}

.cta-link:hover {
    color: #0077ed;
    text-decoration: underline;
}

/* Showcase Section - White Background, No Frames */
.showcase-section {
    padding: var(--spacing-lg) 0;
    background: #fff;
}

.showcase-image {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 22px;
}

.showcase-image img,
.showcase-image video {
    width: 100%;
    height: auto;
    display: block;
    border: none;
}

/* Gallery Preview - No Frames */
.gallery-preview {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg);
}

.gallery-grid-preview {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.grid-item {
    aspect-ratio: 1;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    border: none;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* Book Section - White Background */
.book-section {
    padding: var(--spacing-xl) 0;
    background: #fff;
    color: #000;
}

.book-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.book-visual img {
    width: 100%;
    height: auto;
}

.book-title {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.003em;
    line-height: 1.08349;
    margin-bottom: 8px;
}

.book-subtitle {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0.011em;
    color: #86868b;
    margin-bottom: 24px;
}

.book-desc {
    font-size: 17px;
    line-height: 1.47059;
    color: #86868b;
    margin-bottom: 32px;
}

.book-variants {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.variant-btn {
    display: block;
    padding: 16px 24px;
    background: #f5f5f7;
    color: #000;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
    text-align: left;
}

.variant-btn:hover {
    background: #e5e5e5;
    border-color: #000;
    transform: translateX(8px);
}

.variant-btn span {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 22px;
    background: #0071e3;
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
    text-decoration: none;
    border-radius: 980px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #0077ed;
}

/* Footer */
.footer {
    padding: 40px 0;
    background: #f5f5f7;
    border-top: 1px solid #d2d2d7;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.footer-links a {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copy {
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 1068px) {
    .hero-headline { font-size: 64px; }
    .section-headline { font-size: 48px; }
    .section-description { font-size: 21px; }
    .book-container { grid-template-columns: 1fr; gap: 40px; }
    .gallery-grid-preview { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
    .hero-headline { font-size: 48px; }
    .hero-tagline { font-size: 21px; }
    .section-headline { font-size: 32px; }
    .section-description { font-size: 17px; }
    .book-title { font-size: 32px; }
    .nav-menu { gap: 24px; }
}

/* Page Transitions */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .nav-content {
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .nav-logo img {
        height: 30px !important;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .nav-menu a[href="book-instruction.html"]::before {
        content: "Reality";
    }
    .nav-menu a[href="book-instruction.html"] {
        font-size: 0;
    }
    .nav-menu a[href="book-instruction.html"]::before {
        font-size: 0.85rem;
    }
    
    .nav-menu a[href="book-burial.html"]::before {
        content: "Burial";
    }
    .nav-menu a[href="book-burial.html"] {
        font-size: 0;
    }
    .nav-menu a[href="book-burial.html"]::before {
        font-size: 0.85rem;
    }
}

/* Better logo alignment */
.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    display: block;
}

@media (max-width: 768px) {
    .nav-logo img {
        height: 40px !important;
    }
}

/* Smooth Scroll Animations */
html {
    scroll-behavior: smooth;
}

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations to sections */
section, .book-section, .preview-section {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth image hover */
img {
    transition: transform 0.4s ease, filter 0.4s ease;
}

img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Smooth button transitions */
button, .btn, a.btn, .variant-btn, .btn-order {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover, .btn:hover, a.btn:hover, .variant-btn:hover, .btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Nav smooth appear */
.nav-bar {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth card hover */
.book-option, .preview-item {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.book-option:hover, .preview-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Video smooth fade in */
video {
    animation: fadeIn 1s ease-out;
    transition: opacity 0.5s ease;
}

/* Text smooth appear */
h1, h2, h3 {
    animation: fadeInUp 0.7s ease-out;
}

p {
    animation: fadeInUp 0.8s ease-out;
}

/* Link smooth transitions */
a {
    transition: all 0.3s ease;
}

/* Smooth page transitions */
body {
    animation: fadeIn 0.5s ease-out;
}

/* Hero section parallax effect */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-video, .hero-section video {
    transition: transform 0.5s ease-out;
}

/* Stagger animations for multiple items */
.preview-item:nth-child(1) {
    animation-delay: 0.1s;
}

.preview-item:nth-child(2) {
    animation-delay: 0.2s;
}

.preview-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* Form inputs smooth focus */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Smooth opacity on scroll */
@media (prefers-reduced-motion: no-preference) {
    [data-animate] {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    [data-animate].animated {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
