/* ============================================================
   LEDF — Shared Design System
   Dark Premium · Cyan-extended palette
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Surfaces */
    --color-bg: #070708;
    --color-bg-elev: #0c0d10;
    --color-surface: #111316;
    --color-surface-2: #16181d;
    --color-surface-hover: #1b1e24;

    /* Lines */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);

    /* Text */
    --color-text: #f4f5f7;
    --color-text-muted: #9a9ca3;
    --color-text-faint: #62646b;

    /* Accent (cyan kept, extended toward blue/violet) */
    --color-accent: #0ea5e9;
    --color-accent-light: #38bdf8;
    --color-accent-deep: #2563eb;
    --color-violet: #7c5cff;

    /* Gradients & glows */
    --grad-accent: linear-gradient(120deg, #5fd0ff 0%, #0ea5e9 45%, #6366f1 100%);
    --grad-line: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    --glow-accent: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 18px 50px -20px rgba(14, 165, 233, 0.55);
    --glow-soft: 0 24px 60px -30px rgba(0, 0, 0, 0.9);

    /* Type — Paperlogy across the whole site */
    --font-family: "Paperlogy", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
    --font-mono: "Paperlogy", "Apple SD Gothic Neo", sans-serif;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(56, 189, 248, 0.28);
    color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
    background: #23262d;
    border-radius: 10px;
    border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: #2f333c; }

:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 3px;
    border-radius: 2px;
}

img { max-width: 100%; }

/* ============================================================
   Ambient background (injected by site.js)
   ============================================================ */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(14, 165, 233, 0.16), transparent 60%),
        radial-gradient(55% 45% at 10% 100%, rgba(124, 92, 255, 0.14), transparent 60%),
        radial-gradient(40% 35% at 50% 50%, rgba(37, 99, 235, 0.06), transparent 70%);
    opacity: 0;
    transition: opacity 1.2s ease;
}
.site-bg.ready { opacity: 1; }

/* fine LED grid texture */
.site-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(80% 80% at 50% 30%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(80% 80% at 50% 30%, #000 0%, transparent 75%);
}

.site-grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 2000;
    background: var(--grad-accent);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.6);
    transition: width 0.1s linear;
}

/* ============================================================
   Navigation (shared)
   ============================================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    padding: 22px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(7, 7, 8, 0.85) 0%, rgba(7, 7, 8, 0) 100%);
    transition: padding 0.35s var(--ease-out), background 0.35s ease;
}

nav.scrolled {
    padding: 14px 48px;
    background: rgba(8, 9, 11, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.nav-logo { display: inline-flex; align-items: center; position: relative; }
.nav-logo img {
    height: 20px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
    transition: opacity 0.45s ease;
}
/* colour-true glow layers: blurred copies of the logo itself,
   so white parts glow white and the red mark glows red */
.nav-logo::before,
.nav-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("ledf-logo-white.png") center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}
.nav-logo::before { filter: blur(3px) saturate(160%) brightness(1.2); }
.nav-logo::after  { filter: blur(8px) saturate(170%) brightness(1.3); }
.nav-logo:hover img { opacity: 1; }
.nav-logo:hover::before { animation: logo-glow-a 1.8s ease-in-out infinite; }
.nav-logo:hover::after  { animation: logo-glow-b 1.8s ease-in-out infinite; }
@keyframes logo-glow-a {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 0.7; }
}
@keyframes logo-glow-b {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.55; }
}

.nav-links {
    display: flex;
    gap: 38px;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 4px 0;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 1px;
    width: 100%;
    background: var(--grad-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--color-text); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 7, 8, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 26px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(14px);
    transition: color 0.3s ease;
}
.mobile-menu.active a {
    animation: menuRise 0.5s var(--ease-out) forwards;
}
.mobile-menu.active a:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.active a:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.active a:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.active a:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu.active a:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu a:hover { color: var(--color-accent-light); }

@keyframes menuRise {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Shared utilities
   ============================================================ */

/* gradient text */
.grad {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* section eyebrow with leading gradient bar */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent-light);
    margin-bottom: 16px;
}
.section-label::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--grad-accent);
}

/* Scroll reveal */
.fade-in,
.reveal {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
    will-change: opacity, transform;
}
.fade-in.visible,
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* cursor-follow spotlight for cards */
.glow-card {
    position: relative;
    isolation: isolate;
}
.glow-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.14), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: -1;
}
.glow-card:hover::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .fade-in, .reveal { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   Buttons (shared)
   ============================================================ */
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--color-border-strong);
    border-radius: 100px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.btn-more:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    background: rgba(14, 165, 233, 0.08);
}
.btn-more svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.btn-more:hover svg { transform: translateX(4px); }

.btn-download {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: transparent;
    border: 1px solid var(--color-border-strong);
    border-radius: 100px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    overflow: hidden;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-download::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.btn-download:hover {
    color: #04121d;
    border-color: transparent;
    box-shadow: 0 16px 40px -16px rgba(14, 165, 233, 0.7);
}
.btn-download:hover::before { opacity: 1; }
.btn-download svg { width: 16px; height: 16px; }

/* primary / secondary / submit (used on nurly, contact, rental) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 34px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.3s ease;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: var(--grad-accent);
    color: #04121d;
    border: 1px solid transparent;
    box-shadow: 0 16px 40px -16px rgba(14, 165, 233, 0.6);
}
.btn-primary:hover {
    box-shadow: 0 20px 50px -14px rgba(14, 165, 233, 0.85);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover {
    border-color: var(--color-accent);
    background: rgba(14, 165, 233, 0.08);
}

.btn-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    background: var(--grad-accent);
    color: #04121d;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 100px;
    font-family: inherit;
    box-shadow: 0 16px 40px -16px rgba(14, 165, 233, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 54px -14px rgba(14, 165, 233, 0.85);
}
.btn-submit svg { width: 18px; height: 18px; }

/* KakaoTalk channel button — brand-blue body, real KakaoTalk icon on the left */
.btn-kakao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 30px;
    background: linear-gradient(120deg, #38bdf8 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    border-radius: 100px;
    border: 1px solid transparent;
    box-shadow: 0 14px 36px -14px rgba(37, 99, 235, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}
.btn-kakao:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 20px 50px -14px rgba(37, 99, 235, 0.85);
}
.btn-kakao svg { width: 22px; height: 22px; }

.kakao-cta { margin-top: 32px; text-align: center; }

/* ============================================================
   Responsive — nav
   ============================================================ */
@media (max-width: 1024px) {
    nav { padding: 18px 24px; }
    nav.scrolled { padding: 14px 24px; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
}
