@custom-variant dark (&:is(.dark *));

:root {
  --font-size: 14px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #030213;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
  
  /* Custom gradient for the landing page */
  --grad: linear-gradient(90deg, #0DC7F8 0%, #30DBD7 50%, #71FCA1 100%);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-switch-background: var(--switch-background);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
}

/**
 * Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
 */
@layer base {
  :where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
    h1 {
      font-size: var(--text-2xl);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h2 {
      font-size: var(--text-xl);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h3 {
      font-size: var(--text-lg);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    h4 {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    p {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    label {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    button {
      font-size: var(--text-base);
      font-weight: var(--font-weight-medium);
      line-height: 1.5;
    }

    input {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }
  }
}

html {
  font-size: var(--font-size);
}

/* Custom styles for the landing page */
@layer components {
  .gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  .btn {
    height: 48px;
    padding: 0 20px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
  }
  
  .btn-primary {
    background: var(--grad);
    color: #000;
  }
  
  .btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 0 24px rgba(49, 219, 215, 0.35);
  }
  
  .btn-ghost {
    background: transparent;
    border: 1px solid #30DBD7;
    color: transparent;
    background-image: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
  }
  
  .btn-ghost:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
  }
}

/* 그라데이션 텍스트 */
.gradient-text {
  background: linear-gradient(90deg, #0DC7F8, #71FCA1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === Highlight: IMG 기반 인터랙션 확정 버전 === */

/* 배경 이미지: 아래에서 위로, 투명도 0 -> 0.5 */
#highlight .highlight-img {
  transform: translateY(100px);
  opacity: 0;
  transition:
    transform 1.2s cubic-bezier(0.25,0.46,0.45,0.94),
    opacity 1.2s cubic-bezier(0.25,0.46,0.45,0.94);
}
#highlight.is-visible .highlight-img {
  transform: translateY(0);
  opacity: 1; /* TSX의 motion opacity 0.5 */
}

/* 텍스트/버튼: 아래에서 위로 페이드 인 */
.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* 순차 지연 */
.delay-1 { transition-delay: .3s; }
.delay-2 { transition-delay: .6s; }

/* 오버레이(어둡게) — highlight 섹션 직계 자식인 absolute inset-0에 적용 */
#highlight > .absolute.inset-0 {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.6) 100%
  );
}


/* 기본: 데스크톱에서는 비율 유지(잘림 최소화) */
#highlight { 
  min-height: clamp(560px, 80vh, 900px); /* 반응형 최소 높이 */
}
#highlight .highlight-img {
  object-fit: cover;     
  object-position: center;   /* 필요시 포커스 위치 조정 */
}

/* 태블릿 이하는 꽉 채우기(잘림 감수하고 임팩트 유지) */
@media (max-width: 1024px) {
  #highlight { min-height: 85vh; }
  #highlight .highlight-img {
    object-fit: cover;           /* 화면을 꽉 채우게 */
    object-position: center top; /* 중요한 영역이 위쪽이면 top으로 */
  }
}

/* 모바일: 더 과감하게 채우고 텍스트 가독성 보강 */
@media (max-width: 640px) {
  #highlight { min-height: 95vh; }
  #highlight .highlight-img {
    object-fit: cover;
    object-position: center;     /* 필요시 left/30% center 등으로 조절 가능 */
  }
  /* 오버레이가 너무 어두우면 살짝 완화 (선택) */
  #highlight > .absolute.inset-0 {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.45) 0%,
      rgba(0,0,0,0.4) 50%,
      rgba(0,0,0,0.55) 100%
    );
  }
}

/* 보조: 큰 화면에서 살짝 여백 튜닝 원하면 사용(선택) */
/* @media (min-width: 1024px){ .highlight-section{ padding-top: 8rem; padding-bottom: 8rem; } } */
