/* ==========================================================================
   INYEON AI — Stylesheet
   This file holds every color, font and layout rule for the whole site.
   Change a value in ":root" below and it updates everywhere on the site.
   ========================================================================== */

/* ---- Fonts (Google Fonts) ------------------------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300&family=Karla:wght@300;400;500;600&family=Noto+Serif+KR:wght@300;500&display=swap");

/* ---- Design tokens --------------------------------------------------------
   All colors use oklch() — supported in every modern browser.
   oklch(lightness chroma hue) is easier to tweak than hex: raise the first
   number to lighten a color, raise the second to make it more vivid.
---------------------------------------------------------------------------- */
:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Karla", ui-sans-serif, system-ui, sans-serif;
  --font-korean: "Noto Serif KR", serif;

  --radius: 0.25rem;

  /* core palette */
  --thread: oklch(0.56 0.23 22);        /* the signature red/vermillion accent */
  --thread-glow: oklch(0.69 0.2 26);    /* lighter version, used for glow text */
  --gold: oklch(0.8 0.11 85);           /* warm gold accent */

  /* semantic colors */
  --background: oklch(0.158 0.026 265);
  --foreground: oklch(0.94 0.012 85);
  --card: oklch(0.205 0.028 265);
  --card-foreground: oklch(0.94 0.012 85);
  --primary: oklch(0.56 0.23 22);
  --primary-foreground: oklch(0.97 0.012 85);
  --muted-foreground: oklch(0.72 0.02 80);
  --border: oklch(0.94 0.012 85 / 12%);

  --gradient-veil: radial-gradient(
    120% 80% at 50% 0%,
    color-mix(in oklab, var(--thread) 22%, transparent),
    transparent 70%
  );
  --shadow-thread: 0 24px 70px -30px color-mix(in oklab, var(--thread) 55%, transparent);
}

/* ---- Reset / base --------------------------------------------------------- */
* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: 72rem; /* 1152px, matches original max-w-6xl */
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-narrow {
  max-width: 48rem; /* matches max-w-3xl */
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-mid {
  max-width: 56rem; /* matches max-w-4xl */
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Reusable text styles -------------------------------------------------- */
.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0;
}

.font-korean {
  font-family: var(--font-korean);
}

.text-thread {
  color: var(--thread);
}

.text-muted {
  color: var(--muted-foreground);
}

.italic {
  font-style: italic;
}

.glow-text {
  color: var(--thread);
  text-shadow: 0 0 40px color-mix(in oklab, var(--thread) 45%, transparent);
}

.thread-rule {
  height: 1px;
  width: 2.5rem;
  background: linear-gradient(to right, transparent, var(--thread), transparent);
  opacity: 0.7;
}

.thread-rule.wide {
  width: 6rem;
  margin: 2rem auto 0;
}

.veil {
  background-image: var(--gradient-veil);
}

/* ---- Buttons --------------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  border-radius: 999px;
  background-color: var(--thread);
  color: var(--primary-foreground);
  padding: 0.9rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-thread);
  transition: transform 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--thread) 50%, transparent);
  color: var(--foreground);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-outline:hover {
  background-color: var(--thread);
  color: var(--primary-foreground);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.logo-mark {
  height: 1.75rem;
  width: 1.75rem;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.logo-korean {
  font-family: var(--font-korean);
  font-size: 0.75rem;
  color: var(--thread);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--foreground);
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  gap: 2rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--foreground);
}

.footer-tagline {
  margin-top: 0.75rem;
  max-width: 20rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a:hover {
  color: var(--foreground);
}

/* ==========================================================================
   SECTIONS — shared layout patterns
   ========================================================================== */
.section {
  padding: 6rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 7rem 0;
  }
}

.section-bordered {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--card) 40%, transparent);
}

.section-tight {
  padding: 5rem 0;
}

@media (min-width: 768px) {
  .section-tight {
    padding: 6rem 0;
  }
}

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--background) 85%, transparent),
    color-mix(in oklab, var(--background) 60%, transparent),
    var(--background)
  );
}

.hero-content {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 10rem 1.25rem 7rem;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 14rem 1.25rem 10rem;
  }
}

.hero h1 {
  margin-top: 1.5rem;
  max-width: 48rem;
  font-size: 3rem;
  line-height: 1.05;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4.5rem;
  }
}

.hero-lead {
  margin-top: 2rem;
  max-width: 34rem;
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero-lead {
    font-size: 1.125rem;
  }
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.hero-cta-note {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
}

/* ---- Page hero (interior pages) --------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-hero-content {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 9rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  .page-hero-content {
    padding: 11rem 1.25rem 6rem;
  }
}

.page-hero h1 {
  margin-top: 1.5rem;
  max-width: 48rem;
  font-size: 2.5rem;
  line-height: 1.08;
}

@media (min-width: 768px) {
  .page-hero h1 {
    font-size: 3.75rem;
  }
}

.page-hero-lead {
  margin-top: 1.75rem;
  max-width: 34rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ---- Meaning / 인연 block --------------------------------------------------- */
.meaning-grid {
  display: grid;
  gap: 2.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

@media (min-width: 768px) {
  .meaning-grid {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 5rem;
    padding: 7rem 1.25rem;
  }
}

.meaning-mark {
  font-family: var(--font-korean);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--thread);
}

@media (min-width: 768px) {
  .meaning-mark {
    font-size: 6rem;
  }
}

.meaning-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.6;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
}

@media (min-width: 768px) {
  .meaning-text {
    font-size: 1.875rem;
  }
}

.text-link {
  margin-top: 2rem;
  display: inline-block;
  font-size: 0.875rem;
  color: var(--thread);
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---- Section headings -------------------------------------------------------- */
.section h2 {
  margin-top: 1rem;
  font-size: 2.25rem;
}

@media (min-width: 768px) {
  .section h2 {
    font-size: 3rem;
  }
}

/* ---- Card grid (features / community values / support shortcuts) ------------ */
.card-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--border);
  background-color: var(--border);
}

@media (min-width: 768px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid.cols-3-lg {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background-color: var(--background);
  padding: 2rem;
  transition: background-color 0.2s ease;
}

.card:hover,
a.card:hover {
  background-color: var(--card);
}

.card:hover .thread-rule,
a.card:hover .thread-rule {
  width: 5rem;
}

.card h3 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.card p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.card-cta {
  margin-top: 1.5rem;
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--thread);
}

/* ---- Numbered steps list ------------------------------------------------------ */
.steps {
  margin-top: 3.5rem;
}

.step {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .step {
    grid-template-columns: 4rem 1fr 1.4fr;
    align-items: baseline;
    gap: 2.5rem;
  }
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--thread);
}

.step h3 {
  font-size: 1.5rem;
}

.step p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---- FAQ accordion -------------------------------------------------------------- */
.faq-list {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .plus {
  flex-shrink: 0;
  color: var(--thread);
  margin-top: 0.25rem;
  transition: transform 0.2s ease;
}

.faq-item[open] summary .plus {
  transform: rotate(45deg);
}

.faq-item .answer {
  margin-top: 1rem;
  max-width: 48rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---- Legal document body ---------------------------------------------------------- */
.legal-body {
  max-width: 48rem;
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

@media (min-width: 768px) {
  .legal-body {
    padding: 7rem 1.25rem;
  }
}

.legal-body .eyebrow {
  margin-bottom: 3rem;
}

.legal-section {
  margin-top: 3.5rem;
}

.legal-section:first-of-type {
  margin-top: 0;
}

.legal-section h2 {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .legal-section h2 {
    font-size: 1.875rem;
  }
}

.legal-section p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.legal-section ul {
  margin-top: 1.25rem;
}

.legal-section li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
}

.legal-section li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 0.6rem;
  height: 1px;
  width: 1rem;
  background-color: color-mix(in oklab, var(--thread) 70%, transparent);
}

/* ---- Final CTA -------------------------------------------------------------------- */
.final-cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.final-cta-inner {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  padding: 6rem 1.25rem;
  text-align: center;
}

@media (min-width: 768px) {
  .final-cta-inner {
    padding: 8rem 1.25rem;
  }
}

.final-cta-mark {
  font-family: var(--font-korean);
  font-size: 0.875rem;
  letter-spacing: 0.4em;
  color: var(--thread);
}

.final-cta h2 {
  margin-top: 1.5rem;
  font-style: italic;
  font-size: 2.25rem;
}

@media (min-width: 768px) {
  .final-cta h2 {
    font-size: 3.75rem;
  }
}

.final-cta p {
  margin-top: 1.5rem;
  color: var(--muted-foreground);
}

.final-cta .btn-primary {
  margin-top: 2.5rem;
}

.final-cta-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
}

/* ---- Support page contact split --------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 3.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
    padding: 7rem 1.25rem;
  }
}

.contact-col h2 {
  margin-top: 1.5rem;
  font-size: 1.875rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .contact-col h2 {
    font-size: 2.25rem;
  }
}

.contact-col p {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.contact-col.bordered {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

@media (min-width: 768px) {
  .contact-col.bordered {
    padding-left: 3rem;
  }
}

.topic-tags {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topic-tags li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ---- 404 page --------------------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.error-page h1 {
  font-size: 4.5rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.error-page h2 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.error-page p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---- Utility spacing --------------------------------------------------------------- */
.mt-lg { margin-top: 3.5rem; }
.text-center { text-align: center; }

/* ==========================================================================
   FEATURED ON — badge carousel
   ========================================================================== */
.carousel-wrapper {
  position: relative;
  margin-top: 3.5rem;
}

.badge-carousel {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 0.5rem 2.5rem;
  scrollbar-width: none;
}

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

.badge-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  opacity: 0.75;
  filter: grayscale(0.3);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.badge-item:hover {
  opacity: 1;
  filter: grayscale(0);
}

.badge-item img {
  height: 2.5rem;
  width: auto;
  display: block;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.carousel-nav:hover {
  background-color: var(--thread);
  border-color: var(--thread);
  color: var(--primary-foreground);
}

.carousel-nav.prev { left: -0.5rem; }
.carousel-nav.next { right: -0.5rem; }

@media (min-width: 768px) {
  .carousel-nav.prev { left: -1.25rem; }
  .carousel-nav.next { right: -1.25rem; }
}

/* ==========================================================================
   FOOTER — social icons
   ========================================================================== */
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.footer-social a:hover {
  color: var(--thread);
  border-color: color-mix(in oklab, var(--thread) 50%, transparent);
  background-color: color-mix(in oklab, var(--thread) 10%, transparent);
}

.footer-social svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}
