/* =============================================
   DIENPI - Main Stylesheet (Common Styles)
   ============================================= */

/* CSS Variables */
:root {
    --color-primary: #1a1a1a;
    --color-secondary: #c9a962;
    --color-accent: #b8941f;
    --color-white: #ffffff;
    --color-light: #f8f7f5;
    --color-gray: #6b6b6b;
    --color-gray-light: #e5e5e5;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-primary);
    background: var(--color-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s var(--transition-smooth);
}

.skip-link:focus {
    top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    font-size: 1.1rem;
    color: var(--color-gray);
    max-width: 70ch;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: all 0.5s var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--color-gray-light);
    box-shadow: var(--shadow-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    transition: height 0.4s var(--transition-smooth);
}

.header.scrolled .header-inner {
    height: 70px;
}

.logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    transition: color 0.3s var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.4s var(--transition-smooth);
}

/* Header transparent state - light text */
.header .nav-link {
    color: var(--color-white);
}

.header .nav-link:hover,
.header .nav-link.active {
    color: var(--color-secondary);
}

.header .nav-link:hover::after,
.header .nav-link.active::after {
    width: 100%;
}

/* Header scrolled state - dark text */
.header.scrolled .nav-link {
    color: var(--color-primary);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--color-secondary);
}

/* Logo switching */
.logo-light {
    display: block;
    transition: opacity 0.5s var(--transition-smooth);
}

.logo-dark {
    display: none;
    transition: opacity 0.5s var(--transition-smooth);
}

.header.scrolled .logo-light {
    display: none;
}

.header.scrolled .logo-dark {
    display: block;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 6px;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: all 0.3s var(--transition-smooth);
    transform-origin: center;
}

.header.scrolled .nav-toggle span {
    background: var(--color-primary);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translateY(5.5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translateY(-5.5px);
}

/* Mobile Nav Close Button */
.nav-close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--color-gray-light);
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-smooth);
}

.nav-close:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.nav-close svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.nav-close:hover svg {
    color: var(--color-white);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    transition: transform 8s ease-out;
}

.hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.85) 0%,
        rgba(26, 26, 26, 0.6) 50%,
        rgba(26, 26, 26, 0.75) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    padding: 2rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.3s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.5s forwards;
}

.hero-title span {
    display: block;
    color: var(--color-secondary);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.7s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.9s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.hero-scroll svg {
    width: 30px;
    height: 30px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--transition-smooth);
    z-index: -1;
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-primary);
    border-color: var(--color-secondary);
}

.btn-primary:hover {
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    color: var(--color-primary);
    border-color: var(--color-secondary);
}

.btn-dark {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-dark::before {
    background: var(--color-secondary);
}

.btn-dark:hover {
    color: var(--color-primary);
    border-color: var(--color-secondary);
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--transition-smooth);
}

.btn:hover svg {
    transform: translateX(4px);
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: clamp(5rem, 10vw, 10rem) 0;
}

.section-dark {
    background: var(--color-primary);
    color: var(--color-white);
}

.section-light {
    background: var(--color-light);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-description {
    max-width: 700px;
    margin: 0 auto;
}

/* =============================================
   FEATURES / CARDS
   ============================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--color-white);
    padding: 3rem;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--transition-smooth);
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-text {
    font-size: 1rem;
    line-height: 1.8;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    transition: all 0.3s var(--transition-smooth);
}

.social-link:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-logo {
    height: 35px;
    margin-bottom: 1.5rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color 0.3s var(--transition-smooth);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    transition: color 0.3s var(--transition-smooth);
}

.footer-legal a:hover {
    color: var(--color-secondary);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--transition-smooth);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s var(--transition-smooth);
}

/* =============================================
   PLACEHOLDER IMAGES
   ============================================= */
.placeholder-img {
    background: linear-gradient(135deg, var(--color-gray-light) 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =============================================
   RESPONSIVE - TABLET
   ============================================= */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s var(--transition-smooth);
        box-shadow: var(--shadow-strong);
    }

    .nav.active {
        right: 0;
    }

    .nav.active .nav-close {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    /* Mobile: animations from bottom instead of left/right */
    .reveal-left,
    .reveal-right {
        transform: translateY(40px);
    }

    .reveal-left.active,
    .reveal-right.active {
        transform: translateY(0);
    }
}

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        height: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .section {
        padding: 4rem 0;
    }

    .feature-card {
        padding: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

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

    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-gray: #4a4a4a;
        --color-gray-light: #d0d0d0;
    }

    .btn {
        border-width: 3px;
    }

    .nav-link::after {
        height: 3px;
    }
}
