/* ========================================
   Terra Furnishings — Global Styles
   ======================================== */

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

:root {
  /* Color Tokens */
  --primary: #18709c;
  --primary-hover: #fc8505;
  --primary-container: #5a9ab8;
  --primary-fixed: #b8d8e8;
  --on-primary: #ffffff;
  --on-primary-container: #d0eaf5;

  --secondary: #6b6358;
  --secondary-container: #f0e8db;

  --tertiary: #705c30;
  --tertiary-container: #c4a66a;

  --surface: #faf6f0;
  --surface-container: #f0ece4;
  --surface-container-high: #eae6de;
  --surface-dim: #dbd7cf;
  --on-surface: #2e3230;
  --on-surface-variant: #4a4e4a;

  --outline: #74796e;
  --outline-variant: #c4c8bc;

  --background: #faf6f0;

  --error: #b83230;

  /* Typography */
  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto,
    'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR',
    'Malgun Gothic', sans-serif;

  /* Spacing */
  --nav-height: 100px;
  --max-width: 1536px;
  --px: 32px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

::selection {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

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

ul {
  list-style: none;
}

input {
  font-family: inherit;
}


/* ========================================
   Main Content
   ======================================== */
.main {
  padding-top: var(--nav-height);
}


/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal--left {
  transform: translateX(-80px) translateY(0);
}

.reveal--right {
  transform: translateX(80px) translateY(0);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.stagger-child {
  opacity: 0;
  transform: translateY(50px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stagger-child.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* ========================================
   Iris / Aperture Scroll Animation
   ======================================== */
.hero-scroll-wrapper {
  height: 250vh;
  position: relative;
}

.hero--iris {
  position: sticky;
  top: 0;
  clip-path: circle(8% at 50% 50%);
  will-change: clip-path;
}

/* Scroll hint arrow */
.hero__scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  z-index: 5;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll-hint .material-symbols-outlined {
  font-size: 36px;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50%      { transform: translateX(-50%) translateY(10px); opacity: 1; }
}


/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  width: 100%;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform, filter;
  transform-origin: center center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.1s linear;
}

.hero__content {
  position: relative;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  will-change: opacity, transform;
}

.hero__tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 16px;
  color: var(--primary-fixed);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  font-size: 0.875rem;
}

.hero__title {
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 5.5rem);
  max-width: 768px;
  margin-bottom: 32px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero__desc {
  font-weight: 500;
  font-size: 1.25rem;
  max-width: 576px;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.hero__buttons {
  display: flex;
  gap: 16px;
}

.btn-primary {
  padding: 16px 32px;
  background-color: var(--primary);
  color: var(--on-primary);
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.btn-ghost {
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero__indicators {
  position: absolute;
  bottom: 40px;
  right: 32px;
  display: flex;
  gap: 8px;
}

.hero__indicator {
  width: 48px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.hero__indicator-fill {
  display: block;
  height: 100%;
  width: 33%;
  background: #fff;
}


/* ========================================
   Section: Workspace Anatomy (Categories)
   ======================================== */
.categories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px var(--px);
}

.categories__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}

.categories__title {
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.categories__subtitle {
  color: var(--secondary);
  font-weight: 500;
}

.categories__explore {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  transition: gap 0.3s ease;
}

.categories__explore:hover {
  gap: 12px;
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.category-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.category-card:hover .category-card__img {
  transform: scale(1.05);
}

.category-card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%);
}

.category-card__text {
  position: absolute;
  bottom: 32px;
  left: 32px;
  color: #fff;
}

.category-card__name {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.category-card__desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}


/* ========================================
   Section: Designer Spotlight
   ======================================== */
.designer {
  background-color: var(--surface-container);
  padding: 128px 0;
}

.designer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.designer__image-wrapper {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.designer__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.designer__image-glow {
  position: absolute;
  bottom: -32px;
  right: -32px;
  width: 256px;
  height: 256px;
  background: rgba(112, 92, 48, 0.2);
  border-radius: 50%;
  filter: blur(48px);
}

.designer__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.designer__badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(196, 166, 106, 0.3);
  color: var(--tertiary);
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  align-self: flex-start;
}

.designer__title {
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.designer__quote {
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.designer__bio {
  color: var(--secondary);
  line-height: 1.7;
}

.designer__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: 24px;
}

.designer__cta-line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.designer__cta:hover .designer__cta-line {
  width: 64px;
}


/* ========================================
   Section: Terra Magazine
   ======================================== */
.magazine {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px var(--px);
}

.magazine__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 64px;
  gap: 24px;
}

.magazine__title {
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

.magazine__tags {
  display: flex;
  gap: 16px;
}

.magazine__tag {
  padding: 8px 24px;
  border: 1px solid var(--outline-variant);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.magazine__tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.magazine__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.article-card__image-wrapper {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 24px;
}

.article-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card__img {
  transform: scale(1.05);
}

.article-card__category {
  display: block;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--tertiary);
  margin-bottom: 12px;
}

.article-card__title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 16px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.article-card:hover .article-card__title {
  color: var(--primary);
}

.article-card__excerpt {
  color: var(--secondary);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: var(--surface);
  width: 100%;
  border-top: 1px solid #f5f5f4;
  border-radius: 24px 24px 0 0;
  margin-top: 80px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 48px;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer__brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tertiary);
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

.footer__brand-desc {
  color: #78716c;
  font-weight: 500;
  margin-bottom: 24px;
  max-width: 320px;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__contact p {
  color: #a8a29e;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0;
}

.footer__contact a {
  color: #a8a29e;
  transition: color 0.2s ease;
}

.footer__contact a:hover {
  color: var(--tertiary);
}

.footer__col-title {
  /* 색을 명시하지 않으면 페이지 본문 색을 물려받아, 어두운 테마 페이지
     (회사소개·인증현황: body color #e2e2e2)에서 밝은 푸터 위에 흐리게 보인다.
     메인페이지(.site-footer__heading)와 같은 값으로 고정. */
  color: var(--on-surface);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  margin-bottom: 24px;
}

.footer__col-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__col-link {
  color: #78716c;
  font-weight: 500;
  transition: color 0.2s ease;
}

a.footer__col-link:hover {
  color: var(--tertiary);
}


.footer__bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #78716c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.footer__bottom-links {
  display: flex;
  gap: 32px;
}

/* 「스타기업육성사업」 안내 — 별도 띠가 아니라 푸터 맨 아랫줄에 함께 표시 */
.footer__bottom {
  border-top: 1px solid #eceae6;
  /* 아랫줄 전체(안내 문구 + 모바일 버전 보기)를 구분선에서 16px 더 내림 */
  padding-top: 36px;
  padding-bottom: 32px;
}

.footer__grant-inline {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #4a4a4a;
  line-height: 1.6;
}

.footer__grant-inline strong {
  color: #e8762b;
  font-weight: 700;
}

.footer__bottom-link {
  color: #78716c;
  transition: color 0.2s ease;
}

.footer__bottom-link:hover {
  color: var(--primary);
}


/* ========================================
   Material Symbols Override
   ======================================== */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .designer__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .magazine__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --px: 20px;
  }

  .hero {
    height: 600px;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__buttons {
    flex-direction: column;
  }

  .categories__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .categories__grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    height: 350px;
  }

  .designer__title {
    font-size: 2rem;
  }

  .magazine__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .magazine__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
