/* =========================================================
   DESG | DESIGNER GYU
   gyuyeon.me(Framer 재현본) 레이아웃을 1440px 기준 실측값으로 재현.
   809px 이하는 모바일 레이아웃 (Framer 기본 Phone 브레이크포인트).
   ========================================================= */

:root {
  --red: #ED1C24;
  --white: #FFFFFF;
  --ink: #262626;          /* 커서 원(레퍼런스 triangulaire 값) */
  --red-tint: rgba(237, 28, 36, 0.35); /* Works 썸네일 hover 오버레이 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --side: 20px;            /* 좌우 여백 */
  --hd-h: 64px;            /* 헤더 높이 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--red);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word;
  transition: background-color .6s ease, color .6s ease;
}
/* 드래그(텍스트 선택) 색: 흰 배경에선 레드 바탕+흰 글자, 레드 배경(소개 포커스)에선 반대로 */
::selection { background: var(--red); color: var(--white); }
html.is-focus ::selection { background: var(--white); color: var(--red); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   Header
   ========================================================= */
.hd {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hd-h); overflow: hidden;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 36px; background: var(--white);
  transition: background-color .6s ease;
}
.hd__nav { display: flex; gap: 32px; font-size: 16px; line-height: 1.6; font-weight: 600; }
.hd__nav a, .m-menu__nav a { position: relative; }
.hd__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.hd__nav a:hover::after, .hd__nav a[aria-current="page"]::after { transform: scaleX(1); }
.hd__logo { display: block; width: 38px; height: 38px; }
.hd__logo img { width: 38px; height: 38px; transition: filter .6s ease; }
.hd__sns { justify-self: end; display: flex; align-items: center; gap: 16px; }
.hd__sns-icon { display: block; width: 24px; height: 24px; color: var(--red); }
.hd__sns-icon svg { display: block; width: 24px; height: 24px; }
.hd__menu { display: none; }
.m-menu { display: none; }

/* =========================================================
   Footer
   ========================================================= */
.ft { margin: 0 var(--side); border-top: 3px solid currentColor; padding-bottom: 160px; }

/* =========================================================
   홈 소개 포커스: 소개 글(.about)이 화면 가운데 구간(위 25%~아래 40%)에 들어오면
   배경을 레드로 반전해 소개 내용에 집중시키고, 벗어나면 흰 배경으로 돌아온다 (main.js가 html.is-focus 토글)
   ========================================================= */
html.is-focus body { background: var(--red); color: var(--white); }
html.is-focus .hd { background: var(--red); }
html.is-focus .hd__logo img { filter: brightness(0) invert(1); }
html.is-focus .hd__sns-icon { color: var(--white); }
html.is-focus .hd__menu span { background: var(--white); }
.hd__sns-icon { transition: color .6s ease; }
.ft__mark { margin-top: 23px; font-size: 16.1vw; line-height: 1.19; font-weight: 400; white-space: nowrap; }
.ft__mark-m { display: none; }
.ft__cols { display: grid; grid-template-columns: 1fr 1fr; margin-top: 25px; }
.ft__title { font-size: clamp(44px, 6.67vw, 96px); line-height: 1.1; font-weight: 400; text-transform: uppercase; }
.ft__links { margin-top: 34px; display: grid; gap: 9.5px; font-size: 22px; line-height: 1.43; justify-items: start; }
.ft__links a, .hd__sns a { transition: opacity .2s ease; }
.ft__links a:hover, .hd__sns a:hover { opacity: .6; }
.ft__copy { margin-top: 99px; font-size: 20px; line-height: 1.2; }

main { padding-top: var(--hd-h); }

/* =========================================================
   Home
   ========================================================= */
.hero { margin: 0 var(--side); aspect-ratio: 1400 / 788; overflow: hidden; }
.hero video { width: 100%; height: 100%; object-fit: cover; }
.big-links { margin-top: 195px; display: flex; flex-direction: column; align-items: center; }
.big-links a { font-size: 100px; line-height: 1.1; font-weight: 700; transition: color .3s ease; }
.big-links a:hover { color: #FBC7C9; }
.about { margin: 410px var(--side) 200px; text-align: center; font-size: 13px; line-height: 1.5; }
.about__block { display: grid; gap: 4.5px; }
.about__block p:first-child { margin-bottom: 5px; }
.about__block + .about__block { margin-top: 48px; }

/* =========================================================
   Works
   ========================================================= */
.works { padding: calc(var(--hd-h) + 51px) var(--side) 114px; }
.works__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(20px, 3.9vw, 56px); }
@media (min-width: 810px) and (max-width: 1199px) { .works__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.card__media { position: absolute; inset: 0; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__over {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  padding: 0 20px; background: var(--red-tint); color: var(--white);
  font-size: 14px; line-height: 1.4; text-align: center; opacity: 0; transition: opacity .3s ease;
}
.card:hover .card__over, .card:focus-visible .card__over { opacity: 1; }

/* =========================================================
   Detail
   ========================================================= */
.detail { padding: calc(var(--hd-h) + 9px) var(--side) 117px; }
.detail__back { display: inline-block; font-size: 20px; line-height: 1.2; }
.detail__head { display: grid; grid-template-columns: minmax(0, 1080fr) minmax(0, 260fr); column-gap: 60px; margin-top: 48px; }
.detail__title { font-size: 30px; line-height: 1.2; font-weight: 700; }
.detail__desc { margin-top: 54px; display: grid; gap: .4em; font-size: 18px; line-height: 1.4; }
.detail__meta dt { font-size: 14px; line-height: 1.6; }
.detail__meta dd { margin-top: 10px; font-size: 18px; line-height: 1.4; }
.detail__meta dd + dt { margin-top: 25px; }
.detail__media { margin-top: 60px; }
.detail__media img, .detail__media video { width: 100%; height: auto; }

/* =========================================================
   Talk
   ========================================================= */
.talk { width: min(700px, calc(100% - var(--side) * 2)); margin: 0 auto; padding: calc(var(--hd-h) + 97px) 0 150px; }
.talk__title { font-size: 60px; line-height: 1.2; font-weight: 700; }
.talk__intro { margin-top: 40px; font-size: 16px; line-height: 1.6; }
.talk__form { margin-top: 59px; display: grid; gap: 20px; }
.field { display: grid; gap: 6px; font-size: 16px; line-height: 1.6; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--red); border-radius: 0; background: transparent;
  color: var(--red); font: inherit; padding: 4px 0; outline: none;
}
.field input { height: 34px; }
.field textarea { height: 82px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-width: 2px; }
.talk__status { font-size: 14px; text-align: center; }
.talk__status:empty { display: none; }
.talk__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* 스팸 방지용 숨김 칸 */
.talk__submit:disabled { opacity: .6; cursor: progress; }
.talk__submit {
  justify-self: center; width: 127px; height: 37px; border: 0; border-radius: 0;
  background: var(--red); color: var(--white); font-size: 12px; transition: opacity .2s ease;
}
.talk__submit:hover { opacity: .85; }

/* =========================================================
   Mobile (≤ 809px)
   ========================================================= */
@media (max-width: 809px) {
  :root { --hd-h: 62px; }
  .hd { grid-template-columns: 1fr auto; padding: 0 var(--side); }
  .hd__nav, .hd__sns { display: none; }
  .hd__menu {
    display: grid; align-content: center; gap: 5px; width: 24px; height: 24px; padding: 0;
    border: 0; background: none; justify-self: end;
  }
  .hd__menu span { display: block; height: 2px; background: var(--red); transition: transform .3s ease, opacity .3s ease; }
  .hd__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hd__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .hd__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .m-menu {
    display: block; position: fixed; inset: var(--hd-h) 0 auto 0; z-index: 49; background: var(--white);
    padding: 15px var(--side) 30px; transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .m-menu.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .25s ease, transform .25s ease; }
  .m-menu__nav { display: grid; gap: 18px; font-size: 16px; line-height: 1.6; font-weight: 600; justify-items: start; }
  .m-menu__nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
  .m-menu__sns { margin-top: 24px; display: flex; align-items: center; gap: 24px; }

  .hero { aspect-ratio: 350 / 467; }
  .big-links { margin-top: 97px; }
  .big-links a { font-size: 50px; }
  .about { margin: 161px var(--side) 80px; text-align: left; font-size: 14px; }
  .about__block { gap: 8px; }
  .about__block p:first-child { margin-bottom: 8px; }
  .about__block + .about__block { margin-top: 44px; }

  .ft__mark { margin-top: 27px; line-height: 1; }
  .ft__mark-d { display: none; }
  .ft__mark-m { display: inline; }
  .ft__cols { grid-template-columns: 1fr; margin-top: 28px; }
  .ft__cols > div + div { margin-top: 49px; }
  .ft__title { font-size: 44px; text-transform: none; }
  .ft__links { margin-top: 19px; gap: 8.5px; font-size: 15px; }
  .ft__copy { margin-top: 46px; font-size: 13px; }
  .ft { padding-bottom: 80px; }

  .works { padding: calc(var(--hd-h) + 20px) var(--side) 91px; }
  .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .card__over { padding: 0 12px; }

  .detail { padding-top: var(--hd-h); }
  .detail__back { display: block; width: max-content; margin: 0 auto; }
  .detail__head { grid-template-columns: 1fr; margin-top: 43px; }
  .detail__title { font-size: 22px; }
  .detail__desc { font-size: 15px; }
  .detail__meta { margin-top: 32px; }
  .detail__meta dd { margin-top: 11px; font-size: 15px; }
  .detail__meta dd + dt { margin-top: 24px; }
  .detail__media { margin-top: 40px; }

  .talk { padding-top: calc(var(--hd-h) + 60px); padding-bottom: 102px; }
  .talk__title { font-size: 40px; }
  .talk__intro, .field { font-size: 15px; }
}

/* =========================================================
   커서 (동작·크기·속도는 triangulaire.com/projects/brand-content 기준, 색은 사이트에 맞게 조정)
   - 기본 마우스 포인터는 그대로 보이고, 그 위에 원이 따라다닌다 (평소 19px, 링크·버튼·이미지 위 95px)
   - 원 안에서는 흰색 ↔ 레드가 서로 뒤바뀐다 (흰 배경 → 레드, 레드 글자·면 → 흰색)
     원 두 겹을 같은 위치에 겹쳐 만든다:
       .cursor-base  흰색 + difference : 흰색 → 검정, 레드 → 청록
       .cursor       레드 + screen     : 검정 → 레드, 청록 → 거의 흰색(#EEE6E0)
   - 이미지·영상과 겹치는 부분: 반전 대신 반투명 유리(뒤를 살짝 흐림, 테두리·그림자 없음)
     원이 이미지 경계에 걸치면 겹친 쪽은 유리, 바깥쪽은 레드 (반전 원을 이미지보다 아래 층에 두어 처리)
   - 마우스가 없는 기기(터치)에서는 표시하지 않음
   ========================================================= */
.cursor, .cursor-base {
  position: fixed; top: 0; left: 0; width: 95px; height: 95px; margin: -47.5px 0 0 -47.5px;
  border-radius: 50%; pointer-events: none;
  transform: translate3d(-200px, -200px, 0) scale(.2); will-change: transform;
  opacity: 0; transition: opacity .3s ease;
}
/* 층 순서: 본문 글자 < 반전 원(1) < 이미지 상자(2) < 헤더(50, 안에 헤더 전용 반전 원) */
.cursor-base { z-index: 1; background: var(--white); mix-blend-mode: difference; }
.cursor { z-index: 1; background: var(--red); mix-blend-mode: screen; }
/* 헤더 전용 반전 원: 헤더 요소 안에 들어가 헤더 상자(overflow: hidden)로 잘린다 → 헤더 배경과 같은 경계라 이음새 없음 */
.cursor-base.is-top, .cursor.is-top { position: absolute; z-index: 1; }
.hero, .card, .detail__media { position: relative; z-index: 2; }
.detail__media { overflow: hidden; }
/* 유리: 이미지 상자 안에 원 모양으로 들어감 (위치·크기는 main.js). 흐림은 쓰지 않음 */
.cursor-glass {
  position: absolute; z-index: 3; display: none; pointer-events: none; border-radius: 50%;
  opacity: 0; transition: opacity .3s ease;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: saturate(150%) brightness(1.06) contrast(.96);
          backdrop-filter: saturate(150%) brightness(1.06) contrast(.96);
}
.cursor.is-visible, .cursor-base.is-visible, .cursor-glass.is-visible { opacity: 1; }
/* 페이지 전환 중: 레드 패널(99980) 위로 반전 원을 올리고, 헤더 전용 원은 숨김(두 번 반전 방지) */
html.pt-on .cursor:not(.is-top), html.pt-on .cursor-base:not(.is-top),
html.is-arriving .cursor:not(.is-top), html.is-arriving .cursor-base:not(.is-top) { z-index: 99995; }
html.pt-on .is-top, html.is-arriving .is-top { visibility: hidden; }
.media { position: relative; }
.rgb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.rgb-canvas.is-on { opacity: 1; }

/* =========================================================
   페이지 전환 (레퍼런스: triangulaire.com)
   원형 → 사각형: 윗변이 볼록한 호인 면이 아래에서 올라오며 위에 닿을수록 펴져 사각형이 됨
   도형은 main.js가 SVG path로 그린다 (곡면 깊이·시간은 main.js 상단 CURVE / COVER_MS / LEAVE_MS)
   ========================================================= */
.pt { position: fixed; inset: 0; z-index: 99980; pointer-events: none; visibility: hidden; color: var(--white); }
.pt.is-active, html.is-arriving .pt { visibility: visible; pointer-events: auto; }
.pt__shape { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pt__shape path { fill: var(--red); }
html.is-arriving .pt__shape { background: var(--red); } /* 스크립트가 도형을 그리기 전 첫 화면 */
html.is-arriving, html.is-arriving body { background: var(--red); } /* 다음 페이지가 그려지기 전 흰 화면 깜빡임 방지 */
html.is-arriving body > *:not(.pt):not(script):not(.cursor):not(.cursor-base) { visibility: hidden; }
.pt__title {
  position: absolute; left: 50%; top: 50%; width: calc(100% - 40px); transform: translate(-50%, -40%);
  text-align: center; font-size: clamp(26px, 3.4vw, 48px); line-height: 1.2; font-weight: 700; text-transform: uppercase;
  opacity: 0; transition: opacity .18s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
}
.pt.show-title .pt__title { opacity: 1; transform: translate(-50%, -50%); }

@media (prefers-reduced-motion: reduce) {
  .pt__title { transition: none !important; }
  .cursor { display: none; }
}
