/* ============================================================
   LookTake Design System
   세련된 라이프스타일 + 캐주얼 SNS 톤
   ============================================================ */

/* ---- Fonts ----
   Pretendard — 본문/헤드라인 (jsdelivr 공식 CDN, Google Fonts엔 미호스팅)
               Figma에선 Noto Sans KR로 대체 사용 (Pretendard 미지원)
   Inter      — LookTake 워드마크 전용 (Extra Bold 800, letter-spacing -0.04em)
   Fraunces   — 디스플레이 세리프, 영문 슬로건 포인트 (Google Fonts)
*/
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@600;700;800;900&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&display=swap");

/* ============================================================
   1. FOUNDATION TOKENS
   ============================================================ */
:root {
    /* ---------- Brand ---------- */
    --brand-500: #f96302;
    --brand-400: #ff8228;
    --brand-grad: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 100%);
    --brand-grad-hover: linear-gradient(135deg, #e55502 0%, #f07520 100%);

    /* Brand alpha */
    --brand-a05: rgba(249, 99, 2, 0.05);
    --brand-a10: rgba(249, 99, 2, 0.1);
    --brand-a20: rgba(249, 99, 2, 0.2);
    --brand-a30: rgba(249, 99, 2, 0.3);
    --brand-a40: rgba(249, 99, 2, 0.4);
    --brand-a60: rgba(249, 99, 2, 0.6);

    /* ---------- Surfaces ---------- */
    --bg-page: #fafafa;
    --bg-section: #f8f9fa;
    --bg-tint: #fff7f1; /* warm peach for accent sections */
    --bg-dark: #3a3a3a;
    --bg-darker: #2a2a2a;
    --surface: #ffffff;

    /* ---------- Text ---------- */
    --text-primary: #1a1a1a;
    --text-body: #333;
    --text-muted: #666;
    --text-strong: #262626;
    --text-subtle: #999;
    --text-on-brand: #ffffff;

    /* ---------- Borders ---------- */
    --border-subtle: rgba(0, 0, 0, 0.05);
    --border-soft: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.18);

    /* ---------- Typography ---------- */
    --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    --font-display: "Fraunces", "Pretendard", Georgia, serif;
    --font-brand: "Inter", -apple-system, BlinkMacSystemFont, sans-serif; /* LookTake wordmark */

    /* Type scale (clamp for fluid sizing) */
    --fs-display: clamp(2.75rem, 6vw, 4.5rem); /* hero h1 */
    --fs-h1: clamp(2.25rem, 4.5vw, 3.5rem); /* section h2 */
    --fs-h2: clamp(1.75rem, 3vw, 2.25rem);
    --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
    --fs-h4: 1.125rem;
    --fs-body-lg: 1.125rem;
    --fs-body: 1rem;
    --fs-body-sm: 0.9rem;
    --fs-caption: 0.8rem;
    --fs-eyebrow: 0.75rem;

    /* Line heights */
    --lh-tight: 1.1;
    --lh-snug: 1.25;
    --lh-normal: 1.5;
    --lh-relaxed: 1.65;

    /* Weights */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* Letter spacing */
    --ls-tight: -0.03em;
    --ls-snug: -0.015em;
    --ls-normal: 0;
    --ls-wide: 0.04em;
    --ls-wider: 0.08em;

    /* ---------- Spacing scale (8px base) ---------- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;

    /* Section padding (vertical rhythm) */
    --section-pad-y: clamp(4rem, 8vw, 7rem);

    /* ---------- Radius ---------- */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-3xl: 36px;
    --radius-pill: 9999px;
    --radius-circle: 50%;

    /* ---------- Shadows (more restrained for refined feel) ---------- */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.12);
    --shadow-phone: 0 30px 60px rgba(0, 0, 0, 0.18);

    --shadow-brand-sm: 0 4px 14px rgba(249, 99, 2, 0.22);
    --shadow-brand-md: 0 8px 24px rgba(249, 99, 2, 0.28);
    --shadow-brand-lg: 0 14px 36px rgba(249, 99, 2, 0.32);

    /* ---------- Motion ---------- */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --transition-base: all var(--duration-base) var(--ease-out);

    /* ---------- Layout ---------- */
    --container-max: 1200px;
    --container-narrow: 960px;
    --container-pad: 20px;
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--text-body);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   3. TYPOGRAPHY UTILITIES
   ============================================================ */
.t-display {
    font-family: var(--font-sans);
    font-size: var(--fs-display);
    font-weight: var(--fw-extrabold);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    color: var(--text-primary);
}

.t-display-serif {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: 500;
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-snug);
    color: var(--text-primary);
    font-style: normal;
}

.t-h1 {
    font-family: var(--font-sans);
    font-size: var(--fs-h1);
    font-weight: var(--fw-extrabold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-tight);
    color: var(--text-primary);
}

.t-h2 {
    font-family: var(--font-sans);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-snug);
    color: var(--text-primary);
}

.t-h3 {
    font-family: var(--font-sans);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    color: var(--text-primary);
}

.t-h4 {
    font-family: var(--font-sans);
    font-size: var(--fs-h4);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    color: var(--text-primary);
}

.t-body-lg {
    font-size: var(--fs-body-lg);
    line-height: var(--lh-relaxed);
    color: var(--text-muted);
}

.t-body {
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--text-muted);
}

.t-caption {
    font-size: var(--fs-caption);
    color: var(--text-subtle);
}

.t-eyebrow {
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--brand-500);
}

.t-serif {
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 500;
}

.t-italic-serif {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

/* Brand gradient text (for highlight words) */
.t-grad {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   4. PRIMITIVE COMPONENTS
   ============================================================ */

/* ---------- Container ---------- */
.ds-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.ds-container--narrow {
    max-width: var(--container-narrow);
}

/* ---------- Section ---------- */
.ds-section {
    padding: var(--section-pad-y) 0;
    background: var(--surface);
}

.ds-section--alt {
    background: var(--bg-section);
}

.ds-section--tint {
    background: var(--bg-tint);
}

.ds-section--dark {
    background: var(--bg-dark);   /* #3A3A3A */
    color: rgba(255, 255, 255, 0.7);
}

/* Footer 전용 — 더 어두운 배경 */
.ds-section--darker {
    background: var(--bg-darker); /* #2A2A2A */
    color: rgba(255, 255, 255, 0.7);
}

/* v4 페이지 섹션 배경 순서:
   Hero         → --surface   + --bg-tint ambient blob (우측)
   Shop&Try-On  → --bg-section
   SNS Feed     → --surface
   Features     → --bg-section  (흰 카드 위에)
   Social Proof → --surface
   Download CTA → --bg-tint   + 상단 brand 6px accent strip
   Footer       → --bg-darker
   규칙: 같은 배경 2개 연속 금지 */

/* Section header pattern — 기본 좌측 정렬 (v4 기준) */
.ds-section-header {
    text-align: left;
    max-width: 640px;
    margin: 0 0 var(--space-12);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
}

.ds-section-header > * {
    margin: 0;
}

/* 중앙 정렬이 필요한 섹션 (Social Proof 등) */
.ds-section-header--center {
    text-align: center;
    margin: 0 auto var(--space-12);
    align-items: center;
}

/* ---------- Eyebrow tag ---------- */
.ds-eyebrow {
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--brand-500);
    padding: var(--space-2) var(--space-4);
    background: var(--brand-a10);
    border-radius: var(--radius-pill);
}

/* ---------- Buttons ---------- */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: var(--ls-snug);
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.ds-btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--fs-body);
}

/* Primary — 검정 베이스 (라이프스타일 톤, 세련된 마무리) */
.ds-btn--primary {
    background: var(--text-primary);
    color: var(--surface);
}

.ds-btn--primary:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Accent — 브랜드 그라디언트 (강한 강조용 — Hero CTA, 핵심 변환 지점) */
.ds-btn--accent {
    background: var(--brand-grad);
    color: var(--text-on-brand);
    box-shadow: var(--shadow-brand-sm);
}

.ds-btn--accent:hover {
    box-shadow: var(--shadow-brand-md);
    transform: translateY(-1px);
}

.ds-btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.ds-btn--secondary:hover {
    background: var(--text-primary);
    color: var(--surface);
    border-color: var(--text-primary);
}

.ds-btn--ghost {
    background: var(--brand-a10);
    color: var(--brand-500);
}

.ds-btn--ghost:hover {
    background: var(--brand-a20);
}

/* Dark variant — for use on --bg-dark / --bg-darker surfaces */
.ds-btn--on-dark {
    background: var(--surface);
    color: var(--text-primary);
}

.ds-btn--on-dark:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* ---------- Card ---------- */
.ds-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-base);
}

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

.ds-card--flat {
    background: var(--bg-section);
    border: 0;
}

.ds-card--elevated {
    border: 0;
    box-shadow: var(--shadow-md);
}

/* Feature 카드 — 흰 배경 + 하단 brand accent line (v4 기준)
   다크 배경 feature 카드는 사용하지 않음 */
.ds-card--feature {
    background: var(--surface);
    border: 0;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.ds-card--feature::after {
    display: none;
}

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

/* Step 카드 — Shop & Try-On 3단계 */
.ds-card--step {
    background: var(--surface);
    border: 0;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.ds-card--step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Review 카드 */
.ds-card--review {
    background: var(--bg-section);
    border: 0;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-xs);
}

/* ---------- Badge ---------- */
.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-snug);
    border-radius: var(--radius-pill);
    line-height: 1;
}

.ds-badge--brand {
    background: var(--brand-grad);
    color: var(--text-on-brand);
}

.ds-badge--soft {
    background: var(--brand-a10);
    color: var(--brand-500);
}

.ds-badge--neutral {
    background: var(--surface);
    color: var(--text-strong);
    border: 1px solid var(--border-soft);
}

/* ---------- Icon container (replaces colorful feature icons) ---------- */
.ds-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--brand-a10);
    color: var(--brand-500);
    flex-shrink: 0;
}

.ds-icon-box--filled {
    background: var(--brand-grad);
    color: var(--text-on-brand);
    box-shadow: var(--shadow-brand-sm);
}

.ds-icon-box--outline {
    background: var(--surface);
    border: 1px solid var(--border-soft);
}

.ds-icon-box .material-icons,
.ds-icon-box svg {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* ---------- Avatar ---------- */
.ds-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-section);
}

.ds-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ds-avatar--sm { width: 32px; height: 32px; }
.ds-avatar--lg { width: 56px; height: 56px; }

/* ---------- Divider ---------- */
.ds-divider {
    height: 1px;
    background: var(--border-soft);
    border: 0;
    margin: 0;
}

/* ---------- Wordmark Lockup ----------
   LookTake 워드마크: Inter Extra Bold 800, letter-spacing -0.04em
   컬러: 밝은 배경 → var(--text-primary) 단색
         다크 배경  → #ffffff
   gradient 텍스트는 사용하지 않음 (브랜드 오렌지는 포인트 강조에만)
*/
.ds-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-decoration: none;
    line-height: 1;
}

.ds-lockup__text {
    font-family: var(--font-brand);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text-primary);
}

/* 다크 배경 위에서 */
.ds-on-dark .ds-lockup__text {
    color: #ffffff;
}

.ds-lockup--footer .ds-lockup__text { font-size: 1.5rem; }
.ds-lockup--inline .ds-lockup__text { font-size: 1rem; }

/* ---------- Phone Mockup ---------- */
.ds-phone {
    width: 280px;
    height: 560px;
    background: #000;
    border-radius: var(--radius-3xl);
    padding: 8px;
    box-shadow: var(--shadow-phone);
    overflow: hidden;
    flex-shrink: 0;
}

.ds-phone--sm {
    width: 220px;
    height: 440px;
    border-radius: var(--radius-2xl);
    padding: 6px;
}

.ds-phone__screen {
    width: 100%;
    height: 100%;
    background: var(--surface);
    border-radius: calc(var(--radius-3xl) - 8px);
    overflow: hidden;
    position: relative;
}

.ds-phone--sm .ds-phone__screen {
    border-radius: calc(var(--radius-2xl) - 6px);
}

/* ---------- Avatar Stack ---------- */
.ds-avatar-stack {
    display: inline-flex;
    align-items: center;
}

.ds-avatar-stack .ds-avatar {
    border: 2px solid var(--surface);
    margin-left: -10px;
}

.ds-avatar-stack .ds-avatar:first-child {
    margin-left: 0;
}

/* ---------- Inline Link ---------- */
.ds-link {
    color: var(--brand-500);
    text-decoration: none;
    font-weight: var(--fw-semibold);
    border-bottom: 1px solid var(--brand-a30);
    transition: var(--transition-base);
}

.ds-link:hover {
    color: var(--brand-400);
    border-bottom-color: var(--brand-400);
}

.ds-link--quiet {
    color: var(--text-primary);
    border-bottom-color: var(--border-strong);
}

.ds-link--quiet:hover {
    color: var(--brand-500);
    border-bottom-color: var(--brand-500);
}

/* ---------- Step List (numbered / checklist) ---------- */
.ds-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.ds-list__item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.ds-list__bullet {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    background: var(--text-primary);
    color: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-bold);
    font-size: var(--fs-body-sm);
    line-height: 1;
}

.ds-list__bullet--brand {
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand-sm);
}

.ds-list__bullet--check::before {
    content: '✓';
    font-size: 1rem;
}

.ds-list__content {
    padding-top: 4px;
    flex: 1;
}

.ds-list__title {
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
}

.ds-list__desc {
    color: var(--text-muted);
    margin: 0;
    font-size: var(--fs-body-sm);
}

/* ---------- Dark surface adaptations ---------- */
.ds-on-dark {
    color: rgba(255, 255, 255, 0.7);
}

.ds-on-dark .t-h1,
.ds-on-dark .t-h2,
.ds-on-dark .t-h3,
.ds-on-dark .t-h4,
.ds-on-dark h1,
.ds-on-dark h2,
.ds-on-dark h3,
.ds-on-dark h4 {
    color: #fff;
}

.ds-on-dark .ds-eyebrow {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ds-on-dark .ds-link {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.ds-on-dark .ds-link:hover {
    color: var(--brand-400);
    border-bottom-color: var(--brand-400);
}

.ds-on-dark .ds-list__bullet {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================================
   5. ACCESSIBILITY
   ============================================================ */
:where(a, button):focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

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