/* =====================================================
   Namu Landing Page — Premium Zen Edition
   Elevated, sophisticated, calm aesthetic
   ===================================================== */

/* =====================================================
   CSS Custom Properties (Design Tokens)
   ===================================================== */
:root {
    /* Colors - Refined palette */
    --color-bg: #FDFCFA;
    --color-bg-warm: #F8F5F0;
    --color-bg-deep: #EDE8E0;

    /* Accent colors */
    --color-sage: #7D9A8C;
    --color-sage-light: #A8C4B8;
    --color-sage-deep: #5C7A6C;
    --color-warmth: #E8C4A8;
    --color-warmth-subtle: rgba(232, 196, 168, 0.15);

    /* Text */
    --color-ink: #1A1A1A;
    --color-ink-soft: #4A4A4A;
    --color-ink-muted: #8A8A8A;
    --color-ink-ghost: #C5C5C5;

    /* Effects */
    --color-glow: rgba(125, 154, 140, 0.3);
    --color-glass: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 8px 48px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 24px 80px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 60px var(--color-glow);

    /* Typography - Per brief specifications */
    --font-serif: 'New York', Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Spacing scale */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-2xl: 96px;
    --space-3xl: 128px;

    /* Layout */
    --max-width: 1200px;
    --content-width: 680px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.6s;
    --duration-slower: 1.2s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-bg);
    overflow-x: hidden;
}

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

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

/* =====================================================
   Ambient Background
   ===================================================== */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float-slow 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-sage-light) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-warmth) 0%, transparent 70%);
    bottom: 20%;
    left: -150px;
    animation-delay: -7s;
    opacity: 0.3;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-sage) 0%, transparent 70%);
    bottom: -100px;
    right: 20%;
    animation-delay: -14s;
    opacity: 0.25;
}

@keyframes float-slow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* =====================================================
   Typography
   ===================================================== */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.section-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-sage);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    color: var(--color-ink);
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow: visible;
}

@media (min-width: 900px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
        padding: var(--space-xl) var(--space-2xl);
    }
}

.hero-content {
    max-width: 560px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-ink-soft);
    margin-bottom: var(--space-lg);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-sage);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.title-word {
    display: block;
    color: var(--color-ink);
}

.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-deep) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--color-ink-soft);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    max-width: 400px;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-ink);
    color: white;
    border-radius: 14px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out-soft);
    box-shadow: var(--shadow-medium);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.cta-button:active {
    transform: translateY(0);
}

.apple-icon {
    flex-shrink: 0;
}

/* Phone Mockup */
.hero-phone {
    display: none;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
}

@media (min-width: 900px) {
    .hero-phone {
        display: flex;
    }
}

.phone-frame {
    position: relative;
    width: 280px;
    perspective: 1000px;
    overflow: visible;
}

.phone-screen {
    background: var(--color-ink);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-elevated);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform var(--duration-slow) var(--ease-out-expo);
    position: relative;
    z-index: 2;
}

.phone-frame:hover .phone-screen {
    transform: rotateY(0) rotateX(0);
}

.screen-img {
    border-radius: 32px;
    width: 100%;
}

.phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, var(--color-glow) 0%, transparent 60%);
    z-index: 1;
    opacity: 0.7;
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-ink-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-dot {
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {

    0%,
    100% {
        cy: 8;
    }

    50% {
        cy: 16;
    }
}

/* =====================================================
   Philosophy Section
   ===================================================== */
.philosophy {
    padding: var(--space-3xl) var(--space-md);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-warm) 100%);
}

.philosophy-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 768px) {
    .philosophy-container {
        grid-template-columns: 1fr 1fr;
    }
}

.philosophy-text {
    max-width: 480px;
}

.philosophy-line {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.4;
    color: var(--color-ink-muted);
    margin-bottom: var(--space-md);
}

.philosophy-line:last-child {
    margin-bottom: 0;
}

.philosophy-accent {
    color: var(--color-sage);
    font-weight: 700;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fade-in-up 0.8s var(--ease-out-expo) forwards;
}

.fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.25s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zen Circle (Ensō) */
.philosophy-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.zen-circle {
    width: 200px;
    height: 200px;
}

.ensō {
    width: 100%;
    height: 100%;
    color: var(--color-sage);
    animation: draw-enso 3s var(--ease-out-expo) forwards;
}

@keyframes draw-enso {
    from {
        stroke-dashoffset: 502;
    }

    to {
        stroke-dashoffset: 50;
    }
}

/* =====================================================
   Features Section
   ===================================================== */
.features {
    padding: var(--space-3xl) var(--space-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-lg);
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
    border-radius: 24px;
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out-soft);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--color-sage);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-ink);
}

.feature-desc {
    font-size: 16px;
    color: var(--color-ink-soft);
    line-height: 1.5;
}

/* =====================================================
   Showcase Section — Carousel
   ===================================================== */
.showcase {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-warm);
    overflow: hidden;
}

.showcase-header {
    text-align: center;
    padding: 0 var(--space-md);
    margin-bottom: var(--space-xl);
}

/* Carousel Container */
.carousel {
    position: relative;
    max-width: 100%;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--space-md) 0;
    gap: 0;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Each slide takes full width on mobile, auto on desktop */
.carousel-slide {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    scroll-snap-align: center;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .carousel-track {
        gap: var(--space-md);
        justify-content: center;
        scroll-snap-type: none;
        overflow-x: visible;
        padding: var(--space-md) var(--space-lg);
    }

    .carousel-slide {
        flex: 0 0 auto;
        padding: 0;
    }
}

/* Phone mockup */
.carousel-phone {
    width: 240px;
    max-width: 70vw;
    background: var(--color-ink);
    border-radius: 36px;
    padding: 10px;
    box-shadow: var(--shadow-elevated);
    transition: transform var(--duration-normal) var(--ease-out-soft);
}

.carousel-phone:hover {
    transform: scale(1.02);
}

.carousel-phone img {
    border-radius: 28px;
    width: 100%;
}

.carousel-label {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-ink-muted);
    margin-top: var(--space-xs);
}

/* Dot navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

@media (min-width: 768px) {
    .carousel-dots {
        display: none;
    }
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--color-ink-ghost);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out-soft);
    padding: 0;
}

.carousel-dot:hover {
    background: var(--color-ink-muted);
}

.carousel-dot.active {
    background: var(--color-sage);
    transform: scale(1.2);
}

/* =====================================================
   Quote Section
   ===================================================== */
.quote-section {
    padding: var(--space-3xl) var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
}

.quote {
    max-width: var(--content-width);
    text-align: center;
}

.quote p {
    font-family: var(--font-serif);
    font-size: clamp(24px, 4vw, 36px);
    font-style: italic;
    color: var(--color-ink-soft);
    line-height: 1.5;
}

/* =====================================================
   Final CTA Section
   ===================================================== */
.final-cta {
    padding: var(--space-3xl) var(--space-md);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-deep) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cta-content {
    text-align: center;
    max-width: var(--content-width);
}

.cta-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-warmth-subtle);
    color: var(--color-sage-deep);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: var(--space-md);
}

.cta-title {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: var(--space-sm);
}

.cta-subtitle {
    font-size: 18px;
    color: var(--color-ink-soft);
    margin-bottom: var(--space-lg);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button-large {
    padding: var(--space-md) var(--space-lg);
    font-size: 18px;
    border-radius: 16px;
}

.cta-note {
    margin-top: var(--space-md);
    font-size: 14px;
    color: var(--color-ink-muted);
}


/* =====================================================
   Footer
   ===================================================== */
.footer {
    padding: var(--space-xl) var(--space-md);
    background: var(--color-bg-deep);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (min-width: 600px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xs);
}

@media (min-width: 600px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-ink);
}

.footer-tagline {
    font-size: 14px;
    color: var(--color-ink-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 15px;
    color: var(--color-ink-soft);
    transition: color var(--duration-fast);
}

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

.footer-copyright {
    text-align: center;
    font-size: 13px;
    color: var(--color-ink-muted);
}

/* =====================================================
   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;
    }

    .orb {
        animation: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }

    .phone-glow {
        animation: none;
        opacity: 0.5;
    }

    .float-phone {
        animation: none;
    }
}

/* =====================================================
   Focus States
   ===================================================== */
:focus-visible {
    outline: 2px solid var(--color-sage);
    outline-offset: 4px;
}

.cta-button:focus-visible {
    outline-color: white;
    outline-offset: 4px;
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {

    .ambient-bg,
    .scroll-hint,
    .cta-visual,
    .philosophy-visual {
        display: none;
    }

    body {
        background: white;
    }

    .hero,
    .philosophy,
    .features,
    .showcase,
    .final-cta {
        padding: var(--space-lg);
    }
}